Commit befa8711 by Iain Sandoe Committed by Iain Sandoe

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
parent 375eb99a
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> 2019-04-19 Segher Boessenkool <segher@kernel.crashing.org>
PR tree-optimization/88055 PR tree-optimization/88055
......
...@@ -12445,15 +12445,18 @@ ...@@ -12445,15 +12445,18 @@
[(unspec [(const_int 0)] UNSPEC_GRP_END_NOP)] [(unspec [(const_int 0)] UNSPEC_GRP_END_NOP)]
"" ""
{ {
if (rs6000_tune == PROCESSOR_POWER6) operands[0] = gen_rtx_REG (Pmode,
return "ori 1,1,0"; rs6000_tune == PROCESSOR_POWER6 ? 1 : 2);
return "ori 2,2,0"; return "ori %0,%0,0";
}) })
(define_insn "speculation_barrier" (define_insn "speculation_barrier"
[(unspec_volatile:BLK [(const_int 0)] UNSPECV_SPEC_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 ;; Define the subtract-one-and-jump insns, starting with the template
;; so loop.c knows what to generate. ;; so loop.c knows what to generate.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment