< prev index next >

src/cpu/ppc/vm/ppc.ad

Print this page
rev 12107 : 8168318: PPC64: Use cmpldi instead of li/cmpld
Reviewed-by: goetz


11218       // Node got flipped during fixup flow.
11219       assert($cmp$$cmpcode == 0x2 , "must be equal(0xA) or notEqual(0x2)");
11220       __ trap_null_check($value$$Register, Assembler::traptoGreaterThanUnsigned);
11221     }
11222   %}
11223   ins_pipe(pipe_class_trap);
11224 %}
11225 
11226 // Compare Pointers
11227 instruct cmpP_reg_reg(flagsReg crx, iRegP_N2P src1, iRegP_N2P src2) %{
11228   match(Set crx (CmpP src1 src2));
11229   format %{ "CMPLD   $crx, $src1, $src2 \t// ptr" %}
11230   size(4);
11231   ins_encode %{
11232     // TODO: PPC port $archOpcode(ppc64Opcode_cmpl);
11233     __ cmpld($crx$$CondRegister, $src1$$Register, $src2$$Register);
11234   %}
11235   ins_pipe(pipe_class_compare);
11236 %}
11237 












11238 // Used in postalloc expand.
11239 instruct cmpP_reg_imm16(flagsReg crx, iRegPsrc src1, immL16 src2) %{
11240   // This match rule prevents reordering of node before a safepoint.
11241   // This only makes sense if this instructions is used exclusively
11242   // for the expansion of EncodeP!
11243   match(Set crx (CmpP src1 src2));
11244   predicate(false);
11245 
11246   format %{ "CMPDI   $crx, $src1, $src2" %}
11247   size(4);
11248   ins_encode %{
11249     // TODO: PPC port $archOpcode(ppc64Opcode_cmpi);
11250     __ cmpdi($crx$$CondRegister, $src1$$Register, $src2$$constant);
11251   %}
11252   ins_pipe(pipe_class_compare);
11253 %}
11254 
11255 //----------Float Compares----------------------------------------------------
11256 
11257 instruct cmpFUnordered_reg_reg(flagsReg crx, regF src1, regF src2) %{




11218       // Node got flipped during fixup flow.
11219       assert($cmp$$cmpcode == 0x2 , "must be equal(0xA) or notEqual(0x2)");
11220       __ trap_null_check($value$$Register, Assembler::traptoGreaterThanUnsigned);
11221     }
11222   %}
11223   ins_pipe(pipe_class_trap);
11224 %}
11225 
11226 // Compare Pointers
11227 instruct cmpP_reg_reg(flagsReg crx, iRegP_N2P src1, iRegP_N2P src2) %{
11228   match(Set crx (CmpP src1 src2));
11229   format %{ "CMPLD   $crx, $src1, $src2 \t// ptr" %}
11230   size(4);
11231   ins_encode %{
11232     // TODO: PPC port $archOpcode(ppc64Opcode_cmpl);
11233     __ cmpld($crx$$CondRegister, $src1$$Register, $src2$$Register);
11234   %}
11235   ins_pipe(pipe_class_compare);
11236 %}
11237 
11238 
11239 instruct cmpP_reg_null(flagsReg crx, iRegP_N2P src1, immP_0or1 src2) %{
11240   match(Set crx (CmpP src1 src2));
11241   format %{ "CMPLDI   $crx, $src1, $src2 \t// ptr" %}
11242   size(4);
11243   ins_encode %{
11244     // TODO: PPC port $archOpcode(ppc64Opcode_cmpl);
11245     __ cmpldi($crx$$CondRegister, $src1$$Register, (int)((short)($src2$$constant & 0xFFFF)));
11246   %}
11247   ins_pipe(pipe_class_compare);
11248 %}
11249 
11250 // Used in postalloc expand.
11251 instruct cmpP_reg_imm16(flagsReg crx, iRegPsrc src1, immL16 src2) %{
11252   // This match rule prevents reordering of node before a safepoint.
11253   // This only makes sense if this instructions is used exclusively
11254   // for the expansion of EncodeP!
11255   match(Set crx (CmpP src1 src2));
11256   predicate(false);
11257 
11258   format %{ "CMPDI   $crx, $src1, $src2" %}
11259   size(4);
11260   ins_encode %{
11261     // TODO: PPC port $archOpcode(ppc64Opcode_cmpi);
11262     __ cmpdi($crx$$CondRegister, $src1$$Register, $src2$$constant);
11263   %}
11264   ins_pipe(pipe_class_compare);
11265 %}
11266 
11267 //----------Float Compares----------------------------------------------------
11268 
11269 instruct cmpFUnordered_reg_reg(flagsReg crx, regF src1, regF src2) %{


< prev index next >