Mercurial > hg > graal-jvmci-8
comparison 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 |
comparison
equal
deleted
inserted
replaced
17803:31e80afe3fed | 17804:fd1b9f02cc91 |
---|---|
2410 // TOP_IJAVA_FRAME_ABI. | 2410 // TOP_IJAVA_FRAME_ABI. |
2411 // FIXME: assert that we really have a TOP_IJAVA_FRAME here! | 2411 // FIXME: assert that we really have a TOP_IJAVA_FRAME here! |
2412 #ifdef CC_INTERP | 2412 #ifdef CC_INTERP |
2413 ld(tmp1/*pc*/, _top_ijava_frame_abi(frame_manager_lr), sp); | 2413 ld(tmp1/*pc*/, _top_ijava_frame_abi(frame_manager_lr), sp); |
2414 #else | 2414 #else |
2415 Unimplemented(); | 2415 address entry = pc(); |
2416 load_const_optimized(tmp1, entry); | |
2416 #endif | 2417 #endif |
2417 | 2418 |
2418 set_last_Java_frame(/*sp=*/sp, /*pc=*/tmp1); | 2419 set_last_Java_frame(/*sp=*/sp, /*pc=*/tmp1); |
2419 } | 2420 } |
2420 | 2421 |
2467 if (UseCompressedClassPointers) { | 2468 if (UseCompressedClassPointers) { |
2468 encode_klass_not_null(ck, klass); | 2469 encode_klass_not_null(ck, klass); |
2469 stw(ck, oopDesc::klass_offset_in_bytes(), dst_oop); | 2470 stw(ck, oopDesc::klass_offset_in_bytes(), dst_oop); |
2470 } else { | 2471 } else { |
2471 std(klass, oopDesc::klass_offset_in_bytes(), dst_oop); | 2472 std(klass, oopDesc::klass_offset_in_bytes(), dst_oop); |
2473 } | |
2474 } | |
2475 | |
2476 void MacroAssembler::store_klass_gap(Register dst_oop, Register val) { | |
2477 if (UseCompressedClassPointers) { | |
2478 if (val == noreg) { | |
2479 val = R0; | |
2480 li(val, 0); | |
2481 } | |
2482 stw(val, oopDesc::klass_gap_offset_in_bytes(), dst_oop); // klass gap if compressed | |
2472 } | 2483 } |
2473 } | 2484 } |
2474 | 2485 |
2475 int MacroAssembler::instr_size_for_decode_klass_not_null() { | 2486 int MacroAssembler::instr_size_for_decode_klass_not_null() { |
2476 if (!UseCompressedClassPointers) return 0; | 2487 if (!UseCompressedClassPointers) return 0; |
3141 } | 3152 } |
3142 BLOCK_COMMENT("} zap memory region"); | 3153 BLOCK_COMMENT("} zap memory region"); |
3143 } | 3154 } |
3144 | 3155 |
3145 #endif // !PRODUCT | 3156 #endif // !PRODUCT |
3157 | |
3158 SkipIfEqualZero::SkipIfEqualZero(MacroAssembler* masm, Register temp, const bool* flag_addr) : _masm(masm), _label() { | |
3159 int simm16_offset = masm->load_const_optimized(temp, (address)flag_addr, R0, true); | |
3160 assert(sizeof(bool) == 1, "PowerPC ABI"); | |
3161 masm->lbz(temp, simm16_offset, temp); | |
3162 masm->cmpwi(CCR0, temp, 0); | |
3163 masm->beq(CCR0, _label); | |
3164 } | |
3165 | |
3166 SkipIfEqualZero::~SkipIfEqualZero() { | |
3167 _masm->bind(_label); | |
3168 } |