diff options
| author | 2012-07-24 11:19:23 -0700 | |
|---|---|---|
| committer | 2012-09-15 04:15:18 -0700 | |
| commit | d54a23d0bfe93e4b0d14d857ac9cc0d317a1c4bb (patch) | |
| tree | a2bc66329e88b608fd94aff2d6065a0fe5dbce86 /src/compiler_llvm/gbc_expander.cc | |
| parent | 554e6078db25b192c5f9a2e69671d05c43338283 (diff) | |
Implement copy/const/check_suspend intrinsic for expander.
Change-Id: Ia9dd1d62dee00dd2f172c3a8ba5732e9d3df35aa
Diffstat (limited to 'src/compiler_llvm/gbc_expander.cc')
| -rw-r--r-- | src/compiler_llvm/gbc_expander.cc | 53 |
1 files changed, 18 insertions, 35 deletions
diff --git a/src/compiler_llvm/gbc_expander.cc b/src/compiler_llvm/gbc_expander.cc index 8fd6c18737..fa8bceab8b 100644 --- a/src/compiler_llvm/gbc_expander.cc +++ b/src/compiler_llvm/gbc_expander.cc @@ -1083,12 +1083,9 @@ GBCExpanderPass::ExpandIntrinsic(IntrinsicHelper::IntrinsicId intr_id, case IntrinsicHelper::GetCurrentThread: { return irb_.Runtime().EmitGetCurrentThread(); } - case IntrinsicHelper::TestSuspend: { - Expand_TestSuspend(call_inst); - return NULL; - } + case IntrinsicHelper::TestSuspend: case IntrinsicHelper::CheckSuspend: { - UNIMPLEMENTED(FATAL); + Expand_TestSuspend(call_inst); return NULL; } case IntrinsicHelper::MarkGCCard: { @@ -1955,24 +1952,20 @@ GBCExpanderPass::ExpandIntrinsic(IntrinsicHelper::IntrinsicId intr_id, } //==- Const ------------------------------------------------------------==// - case greenland::IntrinsicHelper::ConstInt: { - UNIMPLEMENTED(FATAL); - return NULL; - } - case greenland::IntrinsicHelper::ConstObj: { - UNIMPLEMENTED(FATAL); - return NULL; - } + case greenland::IntrinsicHelper::ConstInt: case greenland::IntrinsicHelper::ConstLong: { - UNIMPLEMENTED(FATAL); - return NULL; + return call_inst.getArgOperand(0); } case greenland::IntrinsicHelper::ConstFloat: { - UNIMPLEMENTED(FATAL); - return NULL; + return irb_.CreateBitCast(call_inst.getArgOperand(0), + irb_.getJFloatTy()); } case greenland::IntrinsicHelper::ConstDouble: { - UNIMPLEMENTED(FATAL); + return irb_.CreateBitCast(call_inst.getArgOperand(0), + irb_.getJDoubleTy()); + } + case greenland::IntrinsicHelper::ConstObj: { + LOG(FATAL) << "ConstObj should not occur at all"; return NULL; } @@ -1983,25 +1976,15 @@ GBCExpanderPass::ExpandIntrinsic(IntrinsicHelper::IntrinsicId intr_id, } //==- Copy -------------------------------------------------------------==// - case greenland::IntrinsicHelper::CopyInt: { - UNIMPLEMENTED(FATAL); - return NULL; + case greenland::IntrinsicHelper::CopyInt: + case greenland::IntrinsicHelper::CopyFloat: + case greenland::IntrinsicHelper::CopyLong: + case greenland::IntrinsicHelper::CopyDouble: { + return call_inst.getArgOperand(0); } case greenland::IntrinsicHelper::CopyObj: { - UNIMPLEMENTED(FATAL); - return NULL; - } - case greenland::IntrinsicHelper::CopyFloat: { - UNIMPLEMENTED(FATAL); - return NULL; - } - case greenland::IntrinsicHelper::CopyLong: { - UNIMPLEMENTED(FATAL); - return NULL; - } - case greenland::IntrinsicHelper::CopyDouble: { - UNIMPLEMENTED(FATAL); - return NULL; + // TODO: Update the shadow frame slots. + return call_inst.getArgOperand(0); } //==- Shift ------------------------------------------------------------==// |