1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/CodeGen/ARM/cmse-expand-bxns-ret.mir
Momchil Velikov 1bc07f6217 Re-commit: [ARM] CMSE code generation
This patch implements the final bits of CMSE code generation:

* emit special linker symbols

* restrict parameter passing to no use memory

* emit BXNS and BLXNS instructions for returns from non-secure entry
  functions, and non-secure function calls, respectively

* emit code to save/restore secure floating-point state around calls
  to non-secure functions

* emit code to save/restore non-secure floating-pointy state upon
  entry to non-secure entry function, and return to non-secure state

* emit code to clobber registers not used for arguments and returns

* when switching to no-secure state

Patch by Momchil Velikov, Bradley Smith, Javed Absar, David Green,
possibly others.

Differential Revision: https://reviews.llvm.org/D76518
2020-05-14 16:46:16 +01:00

27 lines
609 B
YAML

# RUN: llc -mcpu=cortex-m33 -run-pass=arm-pseudo %s -o - | FileCheck %s
--- |
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "thumbv8m.main-arm-none-eabi"
define hidden void @foo() local_unnamed_addr #0 {
entry:
ret void
}
...
---
name: foo
alignment: 2
tracksRegLiveness: true
frameInfo:
maxCallFrameSize: 0
body: |
bb.0.entry:
tBXNS_RET
...
# CHECK-LABEL: name: foo
# CHECK: bb.0.entry:
# CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
# CHECK: bb.1.entry:
# CHECK-NEXT: successors: %bb.2(0x80000000)