// Data barrier
BUILTIN(__builtin_arm_dmb, "vUi", "nc")
BUILTIN(__builtin_arm_dsb, "vUi", "nc")
+BUILTIN(__builtin_arm_isb, "vUi", "nc")
// MSVC
LANGBUILTIN(__yield, "v", "", ALL_MS_LANGUAGES)
if (CheckNeonBuiltinFunctionCall(BuiltinID, TheCall))
return true;
- // For NEON intrinsics which take an immediate value as part of the
- // instruction, range check them here.
+ // For intrinsics which take an immediate value as part of the instruction,
+ // range check them here.
unsigned i = 0, l = 0, u = 0;
switch (BuiltinID) {
default: return false;
case ARM::BI__builtin_arm_vcvtr_f:
case ARM::BI__builtin_arm_vcvtr_d: i = 1; u = 1; break;
case ARM::BI__builtin_arm_dmb:
- case ARM::BI__builtin_arm_dsb: l = 0; u = 15; break;
+ case ARM::BI__builtin_arm_dsb:
+ case ARM::BI__builtin_arm_isb: l = 0; u = 15; break;
}
// FIXME: VFP Intrinsics should error if VFP not present.
void test_barrier() {
__builtin_arm_dmb(1); //CHECK: call {{.*}} @llvm.arm.dmb(i32 1)
__builtin_arm_dsb(2); //CHECK: call {{.*}} @llvm.arm.dsb(i32 2)
+ __builtin_arm_isb(3); //CHECK: call {{.*}} @llvm.arm.isb(i32 3)
}
// CHECK: call {{.*}} @llvm.arm.rbit(i32 %a)
*ptr = '0'; // expected-error {{incomplete type 'void' is not assignable}}
}
+void test3() {
+ __builtin_arm_dsb(16); // expected-error {{argument should be a value from 0 to 15}}
+ __builtin_arm_dmb(17); // expected-error {{argument should be a value from 0 to 15}}
+ __builtin_arm_isb(18); // expected-error {{argument should be a value from 0 to 15}}
+}
+
#endif