[Darwin, PPC, Mode Iterators 5/n] Update macho_low.
Replace the define_expand and two define_insns with a single @macho_low_<mode> and update callers. gcc/ChangeLog: 2019-09-29 Iain Sandoe <iain@sandoe.co.uk> * config/darwin.c (gen_macho_low):Amend to include the mode argument. (machopic_indirect_data_reference): Amend gen_macho_low call to include mode argument * config/rs6000/rs6000.c (emit_move): Likewise. Amend a comment. * config/rs6000/darwin.md (@macho_low_<mode>): New, replaces the macho_high expander and two define_insn entries. From-SVN: r276271
This commit is contained in:
parent
c4770ba091
commit
7a40dd5a26
@ -1,3 +1,13 @@
|
||||
2019-09-29 Iain Sandoe <iain@sandoe.co.uk>
|
||||
|
||||
* config/darwin.c (gen_macho_low):Amend to include the mode
|
||||
argument.
|
||||
(machopic_indirect_data_reference): Amend gen_macho_low call
|
||||
to include mode argument
|
||||
* config/rs6000/rs6000.c (emit_move): Likewise. Amend a comment.
|
||||
* config/rs6000/darwin.md (@macho_low_<mode>): New, replaces
|
||||
the macho_high expander and two define_insn entries.
|
||||
|
||||
2019-09-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR bootstrap/90543
|
||||
|
@ -110,7 +110,7 @@ section * darwin_sections[NUM_DARWIN_SECTIONS];
|
||||
/* While we transition to using in-tests instead of ifdef'd code. */
|
||||
#if !HAVE_lo_sum
|
||||
#define gen_macho_high(m,a,b) (a)
|
||||
#define gen_macho_low(a,b,c) (a)
|
||||
#define gen_macho_low(m,a,b,c) (a)
|
||||
#endif
|
||||
|
||||
/* True if we're setting __attribute__ ((ms_struct)). */
|
||||
@ -656,7 +656,7 @@ machopic_indirect_data_reference (rtx orig, rtx reg)
|
||||
/* Create a new register for CSE opportunities. */
|
||||
rtx hi_reg = (!can_create_pseudo_p () ? reg : gen_reg_rtx (Pmode));
|
||||
emit_insn (gen_macho_high (Pmode, hi_reg, orig));
|
||||
emit_insn (gen_macho_low (reg, hi_reg, orig));
|
||||
emit_insn (gen_macho_low (Pmode, reg, hi_reg, orig));
|
||||
return reg;
|
||||
}
|
||||
else if (DARWIN_X86)
|
||||
|
@ -158,32 +158,11 @@ You should have received a copy of the GNU General Public License
|
||||
"TARGET_MACHO && (DEFAULT_ABI == ABI_DARWIN)"
|
||||
"lis %0,ha16(%1)")
|
||||
|
||||
(define_expand "macho_low"
|
||||
[(set (match_operand 0 "")
|
||||
(lo_sum (match_operand 1 "")
|
||||
(match_operand 2 "")))]
|
||||
"TARGET_MACHO"
|
||||
{
|
||||
if (TARGET_64BIT)
|
||||
emit_insn (gen_macho_low_di (operands[0], operands[1], operands[2]));
|
||||
else
|
||||
emit_insn (gen_macho_low_si (operands[0], operands[1], operands[2]));
|
||||
|
||||
DONE;
|
||||
})
|
||||
|
||||
(define_insn "macho_low_si"
|
||||
[(set (match_operand:SI 0 "gpc_reg_operand" "=r")
|
||||
(lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b")
|
||||
(define_insn "@macho_low_<mode>"
|
||||
[(set (match_operand:P 0 "gpc_reg_operand" "=r")
|
||||
(lo_sum:P (match_operand:P 1 "gpc_reg_operand" "b")
|
||||
(match_operand 2 "" "")))]
|
||||
"TARGET_MACHO && ! TARGET_64BIT"
|
||||
"la %0,lo16(%2)(%1)")
|
||||
|
||||
(define_insn "macho_low_di"
|
||||
[(set (match_operand:DI 0 "gpc_reg_operand" "=r")
|
||||
(lo_sum:DI (match_operand:DI 1 "gpc_reg_operand" "b")
|
||||
(match_operand 2 "" "")))]
|
||||
"TARGET_MACHO && TARGET_64BIT"
|
||||
"TARGET_MACHO && (DEFAULT_ABI == ABI_DARWIN)"
|
||||
"la %0,lo16(%2)(%1)")
|
||||
|
||||
(define_split
|
||||
|
@ -9682,6 +9682,8 @@ rs6000_emit_move (rtx dest, rtx source, machine_mode mode)
|
||||
if (DEFAULT_ABI == ABI_DARWIN)
|
||||
{
|
||||
#if TARGET_MACHO
|
||||
/* This is not PIC code, but could require the subset of
|
||||
indirections used by mdynamic-no-pic. */
|
||||
if (MACHO_DYNAMIC_NO_PIC_P)
|
||||
{
|
||||
/* Take care of any required data indirection. */
|
||||
@ -9693,7 +9695,8 @@ rs6000_emit_move (rtx dest, rtx source, machine_mode mode)
|
||||
}
|
||||
#endif
|
||||
emit_insn (gen_macho_high (Pmode, target, operands[1]));
|
||||
emit_insn (gen_macho_low (operands[0], target, operands[1]));
|
||||
emit_insn (gen_macho_low (Pmode, operands[0],
|
||||
target, operands[1]));
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user