From 17d94e279e43c02833628a455a97d78cd8aafb5e Mon Sep 17 00:00:00 2001 From: Dean Michael Berris Date: Thu, 8 Sep 2016 00:19:04 +0000 Subject: [XRay] ARM 32-bit no-Thumb support in LLVM This is a port of XRay to ARM 32-bit, without Thumb support yet. The XRay instrumentation support is moving up to AsmPrinter. This is one of 3 commits to different repositories of XRay ARM port. The other 2 are: 1. https://reviews.llvm.org/D23932 (Clang test) 2. https://reviews.llvm.org/D23933 (compiler-rt) Differential Revision: https://reviews.llvm.org/D23931 llvm-svn: 280888 --- .../ARM/xray-armv6-attribute-instrumentation.ll | 24 ++++++++++++++++++++++ .../ARM/xray-armv7-attribute-instrumentation.ll | 24 ++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 llvm/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll create mode 100644 llvm/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll (limited to 'llvm/test/CodeGen') diff --git a/llvm/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll b/llvm/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll new file mode 100644 index 00000000000..c89c21e44a9 --- /dev/null +++ b/llvm/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll @@ -0,0 +1,24 @@ +; RUN: llc -filetype=asm -o - -mtriple=armv6-unknown-linux-gnu < %s | FileCheck %s + +define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-always" { +; CHECK-LABEL: Lxray_sled_0: +; CHECK-NEXT: b #20 +; CHECK-NEXT: mov r0, r0 +; CHECK-NEXT: mov r0, r0 +; CHECK-NEXT: mov r0, r0 +; CHECK-NEXT: mov r0, r0 +; CHECK-NEXT: mov r0, r0 +; CHECK-NEXT: mov r0, r0 +; CHECK-LABEL: Ltmp0: + ret i32 0 +; CHECK-LABEL: Lxray_sled_1: +; CHECK-NEXT: b #20 +; CHECK-NEXT: mov r0, r0 +; CHECK-NEXT: mov r0, r0 +; CHECK-NEXT: mov r0, r0 +; CHECK-NEXT: mov r0, r0 +; CHECK-NEXT: mov r0, r0 +; CHECK-NEXT: mov r0, r0 +; CHECK-LABEL: Ltmp1: +; CHECK-NEXT: bx lr +} diff --git a/llvm/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll b/llvm/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll new file mode 100644 index 00000000000..842d9bc2a56 --- /dev/null +++ b/llvm/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll @@ -0,0 +1,24 @@ +; RUN: llc -filetype=asm -o - -mtriple=armv7-unknown-linux-gnu < %s | FileCheck %s + +define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-always" { +; CHECK-LABEL: Lxray_sled_0: +; CHECK-NEXT: b #20 +; CHECK-NEXT: nop +; CHECK-NEXT: nop +; CHECK-NEXT: nop +; CHECK-NEXT: nop +; CHECK-NEXT: nop +; CHECK-NEXT: nop +; CHECK-LABEL: Ltmp0: + ret i32 0 +; CHECK-LABEL: Lxray_sled_1: +; CHECK-NEXT: b #20 +; CHECK-NEXT: nop +; CHECK-NEXT: nop +; CHECK-NEXT: nop +; CHECK-NEXT: nop +; CHECK-NEXT: nop +; CHECK-NEXT: nop +; CHECK-LABEL: Ltmp1: +; CHECK-NEXT: bx lr +} -- cgit v1.2.3