diff options
| author | Yi Kong <Yi.Kong@arm.com> | 2014-07-14 15:20:09 +0000 |
|---|---|---|
| committer | Yi Kong <Yi.Kong@arm.com> | 2014-07-14 15:20:09 +0000 |
| commit | 4d5e23f53a68937e3108293a5b408f2790b309e8 (patch) | |
| tree | 78c588046cd036a5165b79c8010e2771324048ee /clang/lib/CodeGen | |
| parent | 41ffa5d1ba1f85c5ee0524124c8c616383cd8412 (diff) | |
| download | bcm5719-llvm-4d5e23f53a68937e3108293a5b408f2790b309e8.tar.gz bcm5719-llvm-4d5e23f53a68937e3108293a5b408f2790b309e8.zip | |
ARM: Implement __builtin_arm_nop intrinsic
This patch implements __builtin_arm_nop intrinsic for AArch32 and AArch64,
which generates hint 0x0, the alias of NOP instruction.
This intrinsic is necessary to implement ACLE __nop intrinsic.
Differential Revision: http://reviews.llvm.org/D4495
llvm-svn: 212947
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGBuiltin.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index 4fd98bc1fd1..0f1a146c051 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -3040,6 +3040,9 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID, unsigned HintID = static_cast<unsigned>(-1); switch (BuiltinID) { default: break; + case ARM::BI__builtin_arm_nop: + HintID = 0; + break; case ARM::BI__builtin_arm_yield: case ARM::BI__yield: HintID = 1; @@ -3804,6 +3807,9 @@ Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID, unsigned HintID = static_cast<unsigned>(-1); switch (BuiltinID) { default: break; + case AArch64::BI__builtin_arm_nop: + HintID = 0; + break; case AArch64::BI__builtin_arm_yield: HintID = 1; break; |

