diff options
author | Yunzhong Gao <Yunzhong.Gao@sony.com> | 2016-09-02 23:16:06 +0000 |
---|---|---|
committer | Yunzhong Gao <Yunzhong.Gao@sony.com> | 2016-09-02 23:16:06 +0000 |
commit | f4903a3675a9b0c66ea3a1ddc713e2465a273745 (patch) | |
tree | a4ebc80de31a30b4da2efd3ff769a25befd37d1b /clang/test/CodeGen/ms-inline-asm.c | |
parent | 27ea29b3b74900be58b77eb148b61fe7f6d8d97f (diff) | |
download | bcm5719-llvm-f4903a3675a9b0c66ea3a1ddc713e2465a273745.tar.gz bcm5719-llvm-f4903a3675a9b0c66ea3a1ddc713e2465a273745.zip |
(clang part) Implement MASM-flavor intel syntax behavior for inline MS asm block.
Clang tests for verifying the following syntaxes:
1. 0xNN and NNh are accepted as valid hexadecimal numbers, but 0xNNh is not.
0xNN and NNh may come with optional U or L suffix.
2. NNb is accepted as a valid binary (base-2) number, but 0bNN is not.
NNb may come with optional U or L suffix.
Differential Revision: https://reviews.llvm.org/D22112
llvm-svn: 280556
Diffstat (limited to 'clang/test/CodeGen/ms-inline-asm.c')
-rw-r--r-- | clang/test/CodeGen/ms-inline-asm.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/clang/test/CodeGen/ms-inline-asm.c b/clang/test/CodeGen/ms-inline-asm.c index ad9e4f361b7..0be89f25aa7 100644 --- a/clang/test/CodeGen/ms-inline-asm.c +++ b/clang/test/CodeGen/ms-inline-asm.c @@ -47,7 +47,7 @@ void t6(void) { void t7() { __asm { - int 0x2c ; } asm comments are fun! }{ + int 0x2cU ; } asm comments are fun! }{ } __asm { { @@ -56,7 +56,7 @@ void t7() { } __asm {} // CHECK: t7 -// CHECK: call void asm sideeffect inteldialect "int $$0x2c", "~{dirflag},~{fpsr},~{flags}"() +// CHECK: call void asm sideeffect inteldialect "int $$0x2cU", "~{dirflag},~{fpsr},~{flags}"() // CHECK: call void asm sideeffect inteldialect "", "~{dirflag},~{fpsr},~{flags}"() } @@ -171,8 +171,8 @@ void t17() { // CHECK: t17 __asm _emit 0x4A // CHECK: .byte 0x4A - __asm _emit 0x43 -// CHECK: .byte 0x43 + __asm _emit 0x43L +// CHECK: .byte 0x43L __asm _emit 0x4B // CHECK: .byte 0x4B __asm _EMIT 0x4B @@ -219,11 +219,11 @@ void t20() { void t21() { __asm { __asm push ebx - __asm mov ebx, 0x07 + __asm mov ebx, 07H __asm pop ebx } // CHECK: t21 -// CHECK: call void asm sideeffect inteldialect "push ebx\0A\09mov ebx, $$0x07\0A\09pop ebx", "~{ebx},~{esp},~{dirflag},~{fpsr},~{flags}"() +// CHECK: call void asm sideeffect inteldialect "push ebx\0A\09mov ebx, $$07H\0A\09pop ebx", "~{ebx},~{esp},~{dirflag},~{fpsr},~{flags}"() } extern void t22_helper(int x); @@ -262,15 +262,15 @@ void t24() { void t25() { // CHECK: t25 __asm mov eax, 0ffffffffh -// CHECK: mov eax, $$4294967295 - __asm mov eax, 0fh +// CHECK: mov eax, $$0ffffffffh + __asm mov eax, 0fhU // CHECK: mov eax, $$15 __asm mov eax, 0a2h +// CHECK: mov eax, $$0a2h + __asm mov eax, 10100010b +// CHECK: mov eax, $$10100010b + __asm mov eax, 10100010BU // CHECK: mov eax, $$162 - __asm mov eax, 0xa2h -// CHECK: mov eax, $$0xa2h - __asm mov eax, 0xa2 -// CHECK: mov eax, $$0xa2 // CHECK: "~{eax},~{dirflag},~{fpsr},~{flags}"() } |