8170328: PPC64: Use andis instead of lis/and

Fri, 25 Nov 2016 11:15:12 -0200

author
mdoerr
date
Fri, 25 Nov 2016 11:15:12 -0200
changeset 8905
7c3dc80542b6
parent 8904
75f5e49c6187
child 8906
584eac5794ff

8170328: PPC64: Use andis instead of lis/and
Reviewed-by: goetz, mdoerr
Contributed-by: Igor Nunes <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 27 12:22:28 2016 +0200
     1.2 +++ b/src/cpu/ppc/vm/ppc.ad	Fri Nov 25 11:15:12 2016 -0200
     1.3 @@ -8889,6 +8889,19 @@
     1.4    ins_pipe(pipe_class_default);
     1.5  %}
     1.6  
     1.7 +// Left shifted Immediate And
     1.8 +instruct andI_reg_immIhi16(iRegIdst dst, iRegIsrc src1, immIhi16  src2, flagsRegCR0 cr0) %{
     1.9 +  match(Set dst (AndI src1 src2));
    1.10 +  effect(KILL cr0);
    1.11 +  format %{ "ANDIS   $dst, $src1, $src2.hi" %}
    1.12 +  size(4);
    1.13 +  ins_encode %{
    1.14 +    // TODO: PPC port $archOpcode(ppc64Opcode_andis_);
    1.15 +    __ andis_($dst$$Register, $src1$$Register, (int)((unsigned short)(($src2$$constant & 0xFFFF0000) >> 16)));
    1.16 +  %}
    1.17 +  ins_pipe(pipe_class_default);
    1.18 +%}
    1.19 +
    1.20  // Immediate And
    1.21  instruct andI_reg_uimm16(iRegIdst dst, iRegIsrc src1, uimmI16 src2, flagsRegCR0 cr0) %{
    1.22    match(Set dst (AndI src1 src2));

mercurial