[aarch64-port-dev ] Fix order of fcseld operands

Andrew Haley aph at redhat.com
Wed Oct 9 06:00:08 PDT 2013


In HotSpot, a CMoveNode is (Condition, IfFalse, IfTrue).
In Aarch64, the corresponding insn is csel(dest, IfTrue, IfFalse, Condition).

This is very confusing.  Fixed thusly.

Andrew.



# HG changeset patch
# User aph
# Date 1381323341 -3600
# Node ID 408a7b0091c5eb62f1a9e48e031a78c6f29e6c15
# Parent  10b833f09e6a617fbc95fb3ca648bf0bc2c9b39e
Fix order of fcseld operands

diff -r 10b833f09e6a -r 408a7b0091c5 src/cpu/aarch64/vm/aarch64.ad
--- a/src/cpu/aarch64/vm/aarch64.ad	Wed Oct 09 13:43:36 2013 +0100
+++ b/src/cpu/aarch64/vm/aarch64.ad	Wed Oct 09 13:55:41 2013 +0100
@@ -6438,8 +6438,8 @@
   ins_encode %{
     Assembler::Condition cond = (Assembler::Condition)$cmp$$cmpcode;
     __ fcsels(as_FloatRegister($dst$$reg),
+              as_FloatRegister($src2$$reg),
               as_FloatRegister($src1$$reg),
-              as_FloatRegister($src2$$reg),
               cond);
   %}

@@ -6456,8 +6456,8 @@
   ins_encode %{
     Assembler::Condition cond = (Assembler::Condition)$cmp$$cmpcode;
     __ fcsels(as_FloatRegister($dst$$reg),
+              as_FloatRegister($src2$$reg),
               as_FloatRegister($src1$$reg),
-              as_FloatRegister($src2$$reg),
               cond);
   %}

@@ -6474,8 +6474,8 @@
   ins_encode %{
     Assembler::Condition cond = (Assembler::Condition)$cmp$$cmpcode;
     __ fcseld(as_FloatRegister($dst$$reg),
+              as_FloatRegister($src2$$reg),
               as_FloatRegister($src1$$reg),
-              as_FloatRegister($src2$$reg),
               cond);
   %}

@@ -6492,8 +6492,8 @@
   ins_encode %{
     Assembler::Condition cond = (Assembler::Condition)$cmp$$cmpcode;
     __ fcseld(as_FloatRegister($dst$$reg),
+              as_FloatRegister($src2$$reg),
               as_FloatRegister($src1$$reg),
-              as_FloatRegister($src2$$reg),
               cond);
   %}




More information about the aarch64-port-dev mailing list