brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 2b86529 Raw
34 lines · c
1// REQUIRES: arm-registered-target2 3// RUN: %clang_cc1 -triple thumbv7-linux-gnueabihf -emit-llvm -o - %s | FileCheck --check-prefix THUMB %s4// RUN: %clang_cc1 -triple thumbv7eb-linux-gnueabihf -emit-llvm -o - %s | FileCheck --check-prefix THUMB %s5// RUN: %clang -target armv7-linux-gnueabihf -mthumb -S -emit-llvm -o - %s | FileCheck --check-prefix THUMB-CLANG %s6// RUN: %clang_cc1 -triple armv7-linux-gnueabihf -emit-llvm -o - %s | FileCheck --check-prefix ARM %s7// RUN: %clang_cc1 -triple armv7eb-linux-gnueabihf -emit-llvm -o - %s | FileCheck --check-prefix ARM %s8 9void t1() {}10 11 __attribute__((target("no-thumb-mode")))12void t2() {}13 14 __attribute__((target("thumb-mode")))15void t3() {}16 17// THUMB: void @t1() [[ThumbAttr:#[0-7]]]18// THUMB: void @t2() [[NoThumbAttr:#[0-7]]]19// THUMB: void @t3() [[ThumbAttr:#[0-7]]]20// THUMB: attributes [[ThumbAttr]] = { {{.*}} "target-features"="+armv7-a,+thumb-mode"21// THUMB: attributes [[NoThumbAttr]] = { {{.*}} "target-features"="+armv7-a,-thumb-mode"22//23// THUMB-CLANG: void @t1() [[ThumbAttr:#[0-7]]]24// THUMB-CLANG: void @t2() [[NoThumbAttr:#[0-7]]]25// THUMB-CLANG: void @t3() [[ThumbAttr:#[0-7]]]26// THUMB-CLANG: attributes [[ThumbAttr]] = { {{.*}} "target-features"="{{.*}}+thumb-mode27// THUMB-CLANG: attributes [[NoThumbAttr]] = { {{.*}} "target-features"="{{.*}}-thumb-mode28 29// ARM: void @t1() [[NoThumbAtr:#[0-7]]]30// ARM: void @t2() [[NoThumbAttr:#[0-7]]]31// ARM: void @t3() [[ThumbAttr:#[0-7]]]32// ARM: attributes [[NoThumbAttr]] = { {{.*}} "target-features"="+armv7-a,-thumb-mode"33// ARM: attributes [[ThumbAttr]] = { {{.*}} "target-features"="+armv7-a,+thumb-mode"34