Wire up sema checking for __builtin_arm_usat and __builtin_arm_ssat immediates.

llvm-svn: 109814
This commit is contained in:
Nate Begeman 2010-07-29 22:48:34 +00:00
parent c4a96c0e8c
commit 1194bd2bd8
3 changed files with 7 additions and 1 deletions

View File

@ -17,8 +17,12 @@
// In libgcc
BUILTIN(__clear_cache, "v.", "")
BUILTIN(__builtin_thread_pointer, "v*", "")
// Saturating arithmetic
BUILTIN(__builtin_arm_qadd, "iii", "nc")
BUILTIN(__builtin_arm_qsub, "iii", "nc")
BUILTIN(__builtin_arm_ssat, "iiUi", "nc")
BUILTIN(__builtin_arm_usat, "UiUiUi", "nc")
// NEON
#define GET_NEON_BUILTINS

View File

@ -1062,7 +1062,7 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID,
}
// Determine the type of this overloaded NEON intrinsic.
assert(BuiltinID > ARM::BI__builtin_thread_pointer);
assert(BuiltinID > ARM::BI__builtin_arm_usat);
llvm::SmallVector<Value*, 4> Ops;
for (unsigned i = 0, e = E->getNumArgs() - 1; i != e; i++)

View File

@ -298,6 +298,8 @@ bool Sema::CheckARMBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
unsigned i = 0, l = 0, u = 0;
switch (BuiltinID) {
default: return false;
case ARM::BI__builtin_arm_ssat: i = 1; l = 1; u = 31; break;
case ARM::BI__builtin_arm_usat: i = 1; u = 31; break;
#define GET_NEON_IMMEDIATE_CHECK
#include "clang/Basic/arm_neon.inc"
#undef GET_NEON_IMMEDIATE_CHECK