comparison src/cpu/ppc/vm/ppc.ad @ 17793:c668f307a4c0

8031319: PPC64: Some fixes in ppc and aix coding. Reviewed-by: kvn
author goetz
date Tue, 07 Jan 2014 17:24:59 +0100
parents ad3b94907eed
children 0c521b3f32dd
comparison
equal deleted inserted replaced
17792:4345c6a92f35 17793:c668f307a4c0
632 /*R29_H, R29*/ 632 /*R29_H, R29*/
633 /*R30_H, R30*/ 633 /*R30_H, R30*/
634 R31_H, R31 634 R31_H, R31
635 ); 635 );
636 636
637 // 64 bit registers used excluding r19.
638 // Used to hold the TOC to avoid collisions with expanded DynamicCall 637 // Used to hold the TOC to avoid collisions with expanded DynamicCall
639 // which uses r19 as inline cache internally and expanded LeafCall which uses 638 // which uses r19 as inline cache internally and expanded LeafCall which uses
640 // r2, r11 and r12 internally. 639 // r2, r11 and r12 internally.
641 reg_class bits64_constant_table_base( 640 reg_class bits64_constant_table_base(
642 /*R0_H, R0*/ // R0 641 /*R0_H, R0*/ // R0
1419 long offset = Assembler::align_addr(bytes, frame::alignment_in_bytes); 1418 long offset = Assembler::align_addr(bytes, frame::alignment_in_bytes);
1420 ciMethod *currMethod = C -> method(); 1419 ciMethod *currMethod = C -> method();
1421 1420
1422 // Optimized version for most common case. 1421 // Optimized version for most common case.
1423 if (UsePower6SchedulerPPC64 && 1422 if (UsePower6SchedulerPPC64 &&
1424 !method_is_frameless && Assembler::is_simm((int)(-(_abi(lr) + offset)), 16) && 1423 !method_is_frameless && Assembler::is_simm((int)(-offset), 16) &&
1425 !(false /* ConstantsALot TODO: PPC port*/)) { 1424 !(false /* ConstantsALot TODO: PPC port*/)) {
1426 ___(or) mr(callers_sp, R1_SP); 1425 ___(or) mr(callers_sp, R1_SP);
1427 ___(addi) addi(R1_SP, R1_SP, -offset); 1426 ___(std) std(return_pc, _abi(lr), R1_SP);
1428 ___stop; // Emulator won't recognize dependency. 1427 ___(stdu) stdu(R1_SP, -offset, R1_SP);
1429 ___(std) std(return_pc, _abi(lr) + offset, R1_SP);
1430 ___(std) std(callers_sp, 0, R1_SP);
1431 return; 1428 return;
1432 } 1429 }
1433 1430
1434 if (!method_is_frameless) { 1431 if (!method_is_frameless) {
1435 // Get callers sp. 1432 // Get callers sp.
1470 ___(std) std(return_pc, _abi(lr), callers_sp); 1467 ___(std) std(return_pc, _abi(lr), callers_sp);
1471 } 1468 }
1472 } 1469 }
1473 #undef ___ 1470 #undef ___
1474 #undef ___stop 1471 #undef ___stop
1472 #undef ___advance
1475 1473
1476 uint MachPrologNode::size(PhaseRegAlloc *ra_) const { 1474 uint MachPrologNode::size(PhaseRegAlloc *ra_) const {
1477 // Variable size. determine dynamically. 1475 // Variable size. determine dynamically.
1478 return MachNode::size(ra_); 1476 return MachNode::size(ra_);
1479 } 1477 }
2851 #if 0 // TODO: PPC port 2849 #if 0 // TODO: PPC port
2852 // Check CMSCollectorCardTableModRefBSExt::_requires_release and do the 2850 // Check CMSCollectorCardTableModRefBSExt::_requires_release and do the
2853 // StoreStore barrier conditionally. 2851 // StoreStore barrier conditionally.
2854 __ lwz(R0, 0, $releaseFieldAddr$$Register); 2852 __ lwz(R0, 0, $releaseFieldAddr$$Register);
2855 __ cmpwi(CCR0, R0, 0); 2853 __ cmpwi(CCR0, R0, 0);
2856 __ beq_predict_taken(CCR0, skip_release); 2854 __ beq_predict_taken(CCR0, skip_storestore);
2857 #endif 2855 #endif
2858 __ li(R0, 0); 2856 __ li(R0, 0);
2859 __ membar(Assembler::StoreStore); 2857 __ membar(Assembler::StoreStore);
2860 #if 0 // TODO: PPC port 2858 #if 0 // TODO: PPC port
2861 __ bind(skip_storestore); 2859 __ bind(skip_storestore);
3516 __ cmpd(CCR0, R11_scratch1, R12_scratch2); 3514 __ cmpd(CCR0, R11_scratch1, R12_scratch2);
3517 __ asm_assert_eq("backlink changed", 0x8000); 3515 __ asm_assert_eq("backlink changed", 0x8000);
3518 #endif 3516 #endif
3519 // If fails should store backlink before unextending. 3517 // If fails should store backlink before unextending.
3520 3518
3521 if (ra_->C->env()->failing()) 3519 if (ra_->C->env()->failing()) {
3522 return; 3520 return;
3521 }
3523 %} 3522 %}
3524 3523
3525 // Second node of expanded dynamic call - the call. 3524 // Second node of expanded dynamic call - the call.
3526 enc_class enc_java_dynamic_call_sched(method meth) %{ 3525 enc_class enc_java_dynamic_call_sched(method meth) %{
3527 // TODO: PPC port $archOpcode(ppc64Opcode_bl); 3526 // TODO: PPC port $archOpcode(ppc64Opcode_bl);
3938 3937
3939 // Is this instruction a non-matching short branch variant of some 3938 // Is this instruction a non-matching short branch variant of some
3940 // long branch? Not required. 3939 // long branch? Not required.
3941 ins_attrib ins_short_branch(0); 3940 ins_attrib ins_short_branch(0);
3942 3941
3943 // This instruction does implicit checks at the given machine-instruction offset
3944 // (optional attribute).
3945 ins_attrib ins_implicit_check_offset(-1); // TODO: PPC port
3946
3947 ins_attrib ins_implicit_check_follows_matched_true_path(true);
3948 ins_attrib ins_is_TrapBasedCheckNode(true); 3942 ins_attrib ins_is_TrapBasedCheckNode(true);
3949 3943
3950 // Number of constants. 3944 // Number of constants.
3951 // This instruction uses the given number of constants 3945 // This instruction uses the given number of constants
3952 // (optional attribute). 3946 // (optional attribute).