changeset 8597:7c3dc80542b6

8170328: PPC64: Use andis instead of lis/and Reviewed-by: goetz, mdoerr Contributed-by: Igor Nunes <igor.nunes@eldorado.org.br>
author mdoerr
date Fri, 25 Nov 2016 11:15:12 -0200
parents 75f5e49c6187
children 584eac5794ff
files src/cpu/ppc/vm/ppc.ad
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/ppc/vm/ppc.ad	Thu Oct 27 12:22:28 2016 +0200
+++ b/src/cpu/ppc/vm/ppc.ad	Fri Nov 25 11:15:12 2016 -0200
@@ -8889,6 +8889,19 @@
   ins_pipe(pipe_class_default);
 %}
 
+// Left shifted Immediate And
+instruct andI_reg_immIhi16(iRegIdst dst, iRegIsrc src1, immIhi16  src2, flagsRegCR0 cr0) %{
+  match(Set dst (AndI src1 src2));
+  effect(KILL cr0);
+  format %{ "ANDIS   $dst, $src1, $src2.hi" %}
+  size(4);
+  ins_encode %{
+    // TODO: PPC port $archOpcode(ppc64Opcode_andis_);
+    __ andis_($dst$$Register, $src1$$Register, (int)((unsigned short)(($src2$$constant & 0xFFFF0000) >> 16)));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
 // Immediate And
 instruct andI_reg_uimm16(iRegIdst dst, iRegIsrc src1, uimmI16 src2, flagsRegCR0 cr0) %{
   match(Set dst (AndI src1 src2));