[aarch64-port-dev ] Do not allow constant operands in xchg

Andrew Haley aph at redhat.com
Wed Aug 21 10:27:50 PDT 2013


Fix a minor thinko.

Andrew.


# HG changeset patch
# User aph
# Date 1377105920 -3600
# Node ID f1e3cda176010e3dd204938a661fb3b4e773f7d0
# Parent  4405de290d7ae4f77eeff6866ae65b6bfd32b253
Do not allow constant operands in xchg

diff -r 4405de290d7a -r f1e3cda17601 src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp
--- a/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp	Wed Aug 21 16:34:04 2013 +0100
+++ b/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp	Wed Aug 21 18:25:20 2013 +0100
@@ -1303,7 +1303,10 @@
   src.load_item();
   off.load_nonconstant();

-  if (! (value.is_constant() && can_inline_as_constant(x->value()))) {
+  // We can cope with a constant increment in an xadd
+  if (! (x->is_add()
+	 && value.is_constant()
+	 && can_inline_as_constant(x->value()))) {
     value.load_item();
   }




More information about the aarch64-port-dev mailing list