Blame SOURCES/8170328-pr3466-rh1498321.patch

045ef6
# HG changeset patch
045ef6
# User mdoerr
045ef6
# Date 1480079712 7200
045ef6
#      Fri Nov 25 11:15:12 2016 -0200
045ef6
# Node ID 3c499a0ba92b1affb3f473c6502e374f4785aba9
045ef6
# Parent  9b9d9e11c04d5e5f64829d34752e5c94b1c7d911
045ef6
8170328, PR3466, RH1498321: PPC64: Use andis instead of lis/and
045ef6
Reviewed-by: goetz, mdoerr
045ef6
Contributed-by: Igor Nunes <igor.nunes@eldorado.org.br>
045ef6
045ef6
diff --git a/src/cpu/ppc/vm/ppc.ad b/src/cpu/ppc/vm/ppc.ad
045ef6
--- openjdk/hotspot/src/cpu/ppc/vm/ppc.ad
045ef6
+++ openjdk/hotspot/src/cpu/ppc/vm/ppc.ad
045ef6
@@ -8889,6 +8889,19 @@
045ef6
   ins_pipe(pipe_class_default);
045ef6
 %}
045ef6
 
045ef6
+// Left shifted Immediate And
045ef6
+instruct andI_reg_immIhi16(iRegIdst dst, iRegIsrc src1, immIhi16  src2, flagsRegCR0 cr0) %{
045ef6
+  match(Set dst (AndI src1 src2));
045ef6
+  effect(KILL cr0);
045ef6
+  format %{ "ANDIS   $dst, $src1, $src2.hi" %}
045ef6
+  size(4);
045ef6
+  ins_encode %{
045ef6
+    // TODO: PPC port $archOpcode(ppc64Opcode_andis_);
045ef6
+    __ andis_($dst$$Register, $src1$$Register, (int)((unsigned short)(($src2$$constant & 0xFFFF0000) >> 16)));
045ef6
+  %}
045ef6
+  ins_pipe(pipe_class_default);
045ef6
+%}
045ef6
+
045ef6
 // Immediate And
045ef6
 instruct andI_reg_uimm16(iRegIdst dst, iRegIsrc src1, uimmI16 src2, flagsRegCR0 cr0) %{
045ef6
   match(Set dst (AndI src1 src2));