[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / mips-inline-asm.c
blob56281061fcaaae93c058203873d2ff5b61e4c5a3
1 // REQUIRES: mips-registered-target
2 // RUN: %clang_cc1 -triple mips-linux-gnu -emit-llvm -o - %s | FileCheck %s
4 int data;
6 void m () {
7 asm("lw $1, %0" :: "m"(data));
8 // CHECK: call void asm sideeffect "lw $$1, $0", "*m,~{$1}"(ptr elementtype(i32) @data)
11 void ZC () {
12 asm("ll $1, %0" :: "ZC"(data));
13 // CHECK: call void asm sideeffect "ll $$1, $0", "*^ZC,~{$1}"(ptr elementtype(i32) @data)
16 void R () {
17 asm("lw $1, %0" :: "R"(data));
18 // CHECK: call void asm sideeffect "lw $$1, $0", "*R,~{$1}"(ptr elementtype(i32) @data)
21 int additionalClobberedRegisters () {
22 int temp0;
23 asm volatile(
24 "mfhi %[temp0], $ac1 \n\t"
25 : [temp0]"=&r"(temp0)
27 : "memory", "t0", "t1", "$ac1hi", "$ac1lo", "$ac2hi", "$ac2lo", "$ac3hi", "$ac3lo"
29 return 0;
30 // CHECK: call i32 asm sideeffect "mfhi $0, $$ac1 \0A\09", "=&r,~{memory},~{$8},~{$9},~{$ac1hi},~{$ac1lo},~{$ac2hi},~{$ac2lo},~{$ac3hi},~{$ac3lo},~{$1}"