Momchil Velikov 600d123c6f [ARM][CMSE] Add CMSE header and builtins
This is patch C2 as mentioned in RFC
http://lists.llvm.org/pipermail/cfe-dev/2019-March/061834.html

This adds CMSE builtin functions, and introduces arm_cmse.h header which has
useful macros, functions, and data types for end-users of CMSE.

Patch by Javed Absar.

Diferential Revision: https://reviews.llvm.org/D70817
2019-12-12 15:01:14 +00:00

21 lines
568 B
C

// RUN: %clang_cc1 -triple thumbv8m.base-none-eabi -O1 -emit-llvm %s -o - | FileCheck %s
int test_cmse_TT(void *p){
return __builtin_arm_cmse_TT(p);
// CHECK: call i32 @llvm.arm.cmse.tt(i8* %{{.*}})
}
int test_cmse_TTT(void *p){
return __builtin_arm_cmse_TTT(p);
// CHECK: call i32 @llvm.arm.cmse.ttt(i8* %{{.*}})
}
int test_cmse_TTA(void *p){
return __builtin_arm_cmse_TTA(p);
// CHECK: call i32 @llvm.arm.cmse.tta(i8* %{{.*}})
}
int test_cmse_TTAT(void *p){
return __builtin_arm_cmse_TTAT(p);
// CHECK: call i32 @llvm.arm.cmse.ttat(i8* %{{.*}})
}