+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
/* 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)). */
/* 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)
"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")
- (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")
+(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"
+ "TARGET_MACHO && (DEFAULT_ABI == ABI_DARWIN)"
"la %0,lo16(%2)(%1)")
(define_split
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. */
}
#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;
}