Thu, 27 Oct 2016 12:22:28 +0200
8168318: PPC64: Use cmpldi instead of li/cmpld
Reviewed-by: goetz
Contributed-by: igor.nunes@eldorado.org.br
src/cpu/ppc/vm/ppc.ad | file | annotate | diff | comparison | revisions |
1.1 --- a/src/cpu/ppc/vm/ppc.ad Thu Oct 12 16:29:52 2017 +0100 1.2 +++ b/src/cpu/ppc/vm/ppc.ad Thu Oct 27 12:22:28 2016 +0200 1.3 @@ -10571,6 +10571,17 @@ 1.4 ins_pipe(pipe_class_compare); 1.5 %} 1.6 1.7 +instruct cmpP_reg_null(flagsReg crx, iRegP_N2P src1, immP_0or1 src2) %{ 1.8 + match(Set crx (CmpP src1 src2)); 1.9 + format %{ "CMPLDI $crx, $src1, $src2 \t// ptr" %} 1.10 + size(4); 1.11 + ins_encode %{ 1.12 + // TODO: PPC port $archOpcode(ppc64Opcode_cmpl); 1.13 + __ cmpldi($crx$$CondRegister, $src1$$Register, (int)((short)($src2$$constant & 0xFFFF))); 1.14 + %} 1.15 + ins_pipe(pipe_class_compare); 1.16 +%} 1.17 + 1.18 // Used in postalloc expand. 1.19 instruct cmpP_reg_imm16(flagsReg crx, iRegPsrc src1, immL16 src2) %{ 1.20 // This match rule prevents reordering of node before a safepoint.