diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-10-14 02:33:26 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-10-14 02:33:26 +0000 |
commit | bbbdcd453d22258cb4dd217eddf016668fcebf84 (patch) | |
tree | ea56c8202a8f47594ca62fb4d655f01927163a42 /test/MC/ARM/simple-fp-encoding.ll | |
parent | 946a2740a54fe2cd57509999384239101bf5b9df (diff) |
Add support for vmov.f64/.f32 encoding. There's a bit of a hack going on
here. The f32 in FCONSTS is handled as a double instead of a float in the
code. So the encoding of the immediate into the instruction isn't exactly in
line with the documentation in that regard. But given that we know it's handled
as a double, it doesn't cause any harm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116471 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/ARM/simple-fp-encoding.ll')
-rw-r--r-- | test/MC/ARM/simple-fp-encoding.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/MC/ARM/simple-fp-encoding.ll b/test/MC/ARM/simple-fp-encoding.ll index 84ccb6d005..99b479bc77 100644 --- a/test/MC/ARM/simple-fp-encoding.ll +++ b/test/MC/ARM/simple-fp-encoding.ll @@ -352,3 +352,19 @@ entry: } declare void @llvm.arm.set.fpscr(i32) nounwind + + +define double @f102() nounwind readnone { +entry: +; CHECK: f102 +; CHECK: vmov.f64 d16, #3.000000e+00 @ encoding: [0x08,0x0b,0xf0,0xee] + ret double 3.000000e+00 +} + +define float @f103(float %a) nounwind readnone { +entry: +; CHECK: f103 +; CHECK: vmov.f32 s0, #3.000000e+00 @ encoding: [0x08,0x0a,0xb0,0xee] + %add = fadd float %a, 3.000000e+00 + ret float %add +} |