aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2019-04-21 08:25:44 +0000
committerIain Sandoe <iains@gcc.gnu.org>2019-04-21 08:25:44 +0000
commitbefa87119968e13dfadacaec91c81aebce2fcf16 (patch)
tree281da1a9d7aa83f57fb11f0d7a5c4006384bc1a1 /gcc
parent375eb99a558e4e90ddba2cda1b3066d3cabf80bc (diff)
downloadgcc-befa87119968e13dfadacaec91c81aebce2fcf16.zip
gcc-befa87119968e13dfadacaec91c81aebce2fcf16.tar.gz
gcc-befa87119968e13dfadacaec91c81aebce2fcf16.tar.bz2
Fix test fails on powerpc-darwin.
The current implementation of “speculation_barrier” and “group_end_nop” insns emit hard-wired register names which causes tests using them to fail on Darwin, at least, which uses “rNN” instead of “NN”. The patch makes the register names for these insns use the operand output mechanism to substitute the appropriate variant when needed. gcc/ 2019-04-21 Iain Sandoe <iain@sandoe.co.uk> * config/rs6000/rs6000.md (group_end_nop): Emit insn register names using operand format, rather than hard-wired. (speculation_barrier): Likewise. From-SVN: r270480
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/rs6000/rs6000.md11
2 files changed, 13 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 493aaeb..8b09eec 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
+
+ * config/rs6000/rs6000.md (group_end_nop): Emit insn register
+ names using operand format, rather than hard-wired.
+ (speculation_barrier): Likewise.
+
2019-04-19 Segher Boessenkool <segher@kernel.crashing.org>
PR tree-optimization/88055
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 6feaa10..ad80592 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -12445,15 +12445,18 @@
[(unspec [(const_int 0)] UNSPEC_GRP_END_NOP)]
""
{
- if (rs6000_tune == PROCESSOR_POWER6)
- return "ori 1,1,0";
- return "ori 2,2,0";
+ operands[0] = gen_rtx_REG (Pmode,
+ rs6000_tune == PROCESSOR_POWER6 ? 1 : 2);
+ return "ori %0,%0,0";
})
(define_insn "speculation_barrier"
[(unspec_volatile:BLK [(const_int 0)] UNSPECV_SPEC_BARRIER)]
""
- "ori 31,31,0")
+{
+ operands[0] = gen_rtx_REG (Pmode, 31);
+ return "ori %0,%0,0";
+})
;; Define the subtract-one-and-jump insns, starting with the template
;; so loop.c knows what to generate.