Mercurial > hg > graal-compiler
diff src/cpu/ppc/vm/macroAssembler_ppc.cpp @ 17804:fd1b9f02cc91
8036976: PPC64: implement the template interpreter
Reviewed-by: kvn, coleenp
Contributed-by: axel.siebenborn@sap.com, martin.doerr@sap.com
author | goetz |
---|---|
date | Mon, 10 Mar 2014 12:58:02 +0100 |
parents | 31e80afe3fed |
children | 92aa6797d639 71a71b0bc844 |
line wrap: on
line diff
--- a/src/cpu/ppc/vm/macroAssembler_ppc.cpp Thu Mar 06 10:55:28 2014 -0800 +++ b/src/cpu/ppc/vm/macroAssembler_ppc.cpp Mon Mar 10 12:58:02 2014 +0100 @@ -2412,7 +2412,8 @@ #ifdef CC_INTERP ld(tmp1/*pc*/, _top_ijava_frame_abi(frame_manager_lr), sp); #else - Unimplemented(); + address entry = pc(); + load_const_optimized(tmp1, entry); #endif set_last_Java_frame(/*sp=*/sp, /*pc=*/tmp1); @@ -2472,6 +2473,16 @@ } } +void MacroAssembler::store_klass_gap(Register dst_oop, Register val) { + if (UseCompressedClassPointers) { + if (val == noreg) { + val = R0; + li(val, 0); + } + stw(val, oopDesc::klass_gap_offset_in_bytes(), dst_oop); // klass gap if compressed + } +} + int MacroAssembler::instr_size_for_decode_klass_not_null() { if (!UseCompressedClassPointers) return 0; int num_instrs = 1; // shift or move @@ -3143,3 +3154,15 @@ } #endif // !PRODUCT + +SkipIfEqualZero::SkipIfEqualZero(MacroAssembler* masm, Register temp, const bool* flag_addr) : _masm(masm), _label() { + int simm16_offset = masm->load_const_optimized(temp, (address)flag_addr, R0, true); + assert(sizeof(bool) == 1, "PowerPC ABI"); + masm->lbz(temp, simm16_offset, temp); + masm->cmpwi(CCR0, temp, 0); + masm->beq(CCR0, _label); +} + +SkipIfEqualZero::~SkipIfEqualZero() { + _masm->bind(_label); +}