X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FMC%2FAsmParser%2Ffloating-literals.s;h=6578e32ce822ef87c13ba8e79614e3f25342ff24;hb=0e9c68e6bc8768143308b0162e900ba8bd10dc01;hp=b8e6e3cc80061b529e8cee19e730f687564edb67;hpb=4f2afe3d399eb9485dc605f3cc3a6382dcae757a;p=oota-llvm.git diff --git a/test/MC/AsmParser/floating-literals.s b/test/MC/AsmParser/floating-literals.s index b8e6e3cc800..6578e32ce82 100644 --- a/test/MC/AsmParser/floating-literals.s +++ b/test/MC/AsmParser/floating-literals.s @@ -1,10 +1,23 @@ -# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s +# RUN: not llvm-mc -triple i386-unknown-unknown %s 2> /dev/null | FileCheck %s +# RUN: not llvm-mc -triple i386-unknown-unknown %s 2>&1 > /dev/null| FileCheck %s --check-prefix=CHECK-ERROR # CHECK: .long 1067412619 # CHECK: .long 1075000115 # CHECK: .long 1077936128 # CHECK: .long 1082549862 .single 1.2455, +2.3, 3, + 4.2 + +# CHECK: .long 2139095040 +.single InFinIty + +# CHECK: .long 4286578688 +.single -iNf + +# CHECK: .long 2147483647 +.single nAN + +# CHECK: .long 1067928519 +.float 1.307 # CHECK: .quad 4617315517961601024 # CHECK: .quad 4597526701198935065 @@ -30,3 +43,40 @@ // APFloat should reject these with an error, not crash: //.double -1.2e+ //.double -1.2e + +# CHECK: .long 1310177520 +.float 0x12f7.1ep+17 +# CHECK: .long 1084227584 +.float 0x.ap+3 +# CHECK: .quad 4602678819172646912 +.double 0x2.p-2 +# CHECK: .long 1094713344 +.float 0x3p2 +# CHECK: .long 872284160 +.float 0x7fp-30 +# CHECK: .long 3212836864 +.float -0x1.0p0 + +# CHECK-ERROR: invalid hexadecimal floating-point constant: expected at least one exponent digit +# CHECK-ERROR: unexpected token in directive +.float 0xa.apa + +# CHECK-ERROR: invalid hexadecimal floating-point constant: expected at least one exponent digit +# CHECK-ERROR: unexpected token in directive +.double -0x1.2p+ + +# CHECK-ERROR: invalid hexadecimal floating-point constant: expected at least one exponent digit +# CHECK-ERROR: unexpected token in directive +.double -0x1.2p + +# CHECK-ERROR: invalid hexadecimal floating-point constant: expected at least one significand digit +# CHECK-ERROR: unexpected token in directive +.float 0xp2 + +# CHECK-ERROR: invalid hexadecimal floating-point constant: expected at least one significand digit +# CHECK-ERROR: unexpected token in directive +.float 0x.p5 + +# CHECK-ERROR: error: invalid hexadecimal floating-point constant: expected exponent part 'p' +# CHECK-ERROR: unexpected token in directive +.float 0x1.2