diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-05-12 11:18:42 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-05-12 11:18:42 +0000 |
commit | a3dd0eb93c764905dac919851bca12517e7e8757 (patch) | |
tree | 2d2edfea317679374856e61fbb22bee2e0540c9a /test/MC/AsmParser | |
parent | 1cce5bf8ef9ee3dc157ae5d8778f84a7a0d1d8b9 (diff) | |
download | external_llvm-a3dd0eb93c764905dac919851bca12517e7e8757.zip external_llvm-a3dd0eb93c764905dac919851bca12517e7e8757.tar.gz external_llvm-a3dd0eb93c764905dac919851bca12517e7e8757.tar.bz2 |
AsmParser: Add support for .ifb and .ifnb directives.
Based on a patch from PaX Team.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156705 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/AsmParser')
-rw-r--r-- | test/MC/AsmParser/ifb.s | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/test/MC/AsmParser/ifb.s b/test/MC/AsmParser/ifb.s new file mode 100644 index 0000000..48d69f4 --- /dev/null +++ b/test/MC/AsmParser/ifb.s @@ -0,0 +1,67 @@ +# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s + +defined: + +# CHECK-NOT: .byte 0 +# CHECK: .byte 1 +.ifb + .byte 1 +.else + .byte 0 +.endif + +# CHECK-NOT: .byte 0 +# CHECK: .byte 1 +.ifb defined + .byte 0 +.else + .byte 1 +.endif + +# CHECK-NOT: .byte 0 +# CHECK: .byte 1 +.ifb undefined + .byte 0 +.else + .byte 1 +.endif + +# CHECK-NOT: .byte 0 +# CHECK: .byte 1 +.ifb "" + .byte 0 +.else + .byte 1 +.endif + +# CHECK-NOT: .byte 0 +# CHECK: .byte 1 +.ifnb + .byte 0 +.else + .byte 1 +.endif + +# CHECK-NOT: .byte 0 +# CHECK: .byte 1 +.ifnb defined + .byte 1 +.else + .byte 0 +.endif + +# CHECK-NOT: .byte 0 +# CHECK: .byte 1 +.ifnb undefined + .byte 1 +.else + .byte 0 +.endif + +# CHECK-NOT: .byte 0 +# CHECK: .byte 1 +.ifnb "" + .byte 1 +.else + .byte 0 +.endif |