summaryrefslogtreecommitdiff
path: root/test/CodeGen/mips-inline-asm.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:44:14 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:44:14 +0000
commit2b6b257f4e5503a7a2675bdb8735693db769f75c (patch)
treee85e046ae7003fe3bcc8b5454cd0fa3f7407b470 /test/CodeGen/mips-inline-asm.c
parentb4348ed0b7e90c0831b925fbee00b5f179a99796 (diff)
Notes
Diffstat (limited to 'test/CodeGen/mips-inline-asm.c')
-rw-r--r--test/CodeGen/mips-inline-asm.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/mips-inline-asm.c b/test/CodeGen/mips-inline-asm.c
index 2cfa41c98de7..fa38663f387d 100644
--- a/test/CodeGen/mips-inline-asm.c
+++ b/test/CodeGen/mips-inline-asm.c
@@ -17,3 +17,15 @@ void R () {
asm("lw $1, %0" :: "R"(data));
// CHECK: call void asm sideeffect "lw $$1, $0", "*R,~{$1}"(i32* @data)
}
+
+int additionalClobberedRegisters () {
+ int temp0;
+ asm volatile(
+ "mfhi %[temp0], $ac1 \n\t"
+ : [temp0]"=&r"(temp0)
+ :
+ : "memory", "t0", "t1", "$ac1hi", "$ac1lo", "$ac2hi", "$ac2lo", "$ac3hi", "$ac3lo"
+ );
+ return 0;
+ // CHECK: call i32 asm sideeffect "mfhi $0, $$ac1 \0A\09", "=&r,~{memory},~{$8},~{$9},~{$ac1hi},~{$ac1lo},~{$ac2hi},~{$ac2lo},~{$ac3hi},~{$ac3lo},~{$1}"
+}