mirror of https://github.com/microsoft/clang.git
arm_acle: Add mappings for dbg intrinsic
This completes all ACLE hint intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216453 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
982f0de813
commit
e2b32bc8dd
|
@ -66,6 +66,10 @@ static __inline__ void __attribute__((always_inline, nodebug)) __yield(void) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if __ARM_32BIT_STATE
|
||||||
|
#define __dbg(t) __builtin_arm_dbg(t)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* 8.5 Swap */
|
/* 8.5 Swap */
|
||||||
static __inline__ uint32_t __attribute__((always_inline, nodebug))
|
static __inline__ uint32_t __attribute__((always_inline, nodebug))
|
||||||
__swp(uint32_t x, volatile uint32_t *p) {
|
__swp(uint32_t x, volatile uint32_t *p) {
|
||||||
|
|
|
@ -62,6 +62,14 @@ void test_sevl(void) {
|
||||||
__sevl();
|
__sevl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if __ARM_32BIT_STATE
|
||||||
|
// AArch32-LABEL: test_dbg
|
||||||
|
// AArch32: call void @llvm.arm.dbg(i32 0)
|
||||||
|
void test_dbg(void) {
|
||||||
|
__dbg(0);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* 8.5 Swap */
|
/* 8.5 Swap */
|
||||||
// ARM-LABEL: test_swp
|
// ARM-LABEL: test_swp
|
||||||
// AArch32: call i32 @llvm.arm.ldrex
|
// AArch32: call i32 @llvm.arm.ldrex
|
||||||
|
|
|
@ -37,3 +37,12 @@ int32_t test_usat_const_diag(int32_t t, const int32_t v) {
|
||||||
void test_pldx_const_diag(int32_t i) {
|
void test_pldx_const_diag(int32_t i) {
|
||||||
__pldx(i, 0, 0, 0); // expected-error-re {{argument to {{.*}} must be a constant integer}}
|
__pldx(i, 0, 0, 0); // expected-error-re {{argument to {{.*}} must be a constant integer}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* DBG intrinsic
|
||||||
|
* First argument for DBG intrinsic must be compile-time constant,
|
||||||
|
* otherwise an error should be raised.
|
||||||
|
*/
|
||||||
|
void test_dbg_const_diag(unsigned int t) {
|
||||||
|
__dbg(t); // expected-error-re {{argument to {{.*}} must be a constant integer}}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue