diff options
author | Daniel Sanders <daniel.sanders@imgtec.com> | 2015-03-30 13:47:23 +0000 |
---|---|---|
committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2015-03-30 13:47:23 +0000 |
commit | 48fa39e4a1ad5e9670482530fba50ae288076e84 (patch) | |
tree | 00d5aa8865600882db556ab75632d021bcf1b185 /clang/test/CodeGen/mips-inline-asm.c | |
parent | b8d76fb7ca255e7885d754a4df8c4715a4aa7a3f (diff) | |
download | bcm5719-llvm-48fa39e4a1ad5e9670482530fba50ae288076e84.tar.gz bcm5719-llvm-48fa39e4a1ad5e9670482530fba50ae288076e84.zip |
[mips] Add support for 'ZC' inline assembly memory constraint.
Summary: Also add tests for 'R' and 'm'.
Reviewers: atanasyan
Reviewed By: atanasyan
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D8449
llvm-svn: 233542
Diffstat (limited to 'clang/test/CodeGen/mips-inline-asm.c')
-rw-r--r-- | clang/test/CodeGen/mips-inline-asm.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/CodeGen/mips-inline-asm.c b/clang/test/CodeGen/mips-inline-asm.c new file mode 100644 index 00000000000..2cfa41c98de --- /dev/null +++ b/clang/test/CodeGen/mips-inline-asm.c @@ -0,0 +1,19 @@ +// REQUIRES: mips-registered-target +// RUN: %clang_cc1 -triple mips-linux-gnu -emit-llvm -o - %s | FileCheck %s + +int data; + +void m () { + asm("lw $1, %0" :: "m"(data)); + // CHECK: call void asm sideeffect "lw $$1, $0", "*m,~{$1}"(i32* @data) +} + +void ZC () { + asm("ll $1, %0" :: "ZC"(data)); + // CHECK: call void asm sideeffect "ll $$1, $0", "*^ZC,~{$1}"(i32* @data) +} + +void R () { + asm("lw $1, %0" :: "R"(data)); + // CHECK: call void asm sideeffect "lw $$1, $0", "*R,~{$1}"(i32* @data) +} |