if (REGNO (x) == from)
{
if (! *reg)
- *reg = gen_reg_rtx (Pmode);
+ *reg = pic_offset_table_rtx = gen_reg_rtx (Pmode);
return *reg;
}
"
{
operands[2] = rs6000_got_register (operands[1]);
- if (flag_pic > 1)
- {
- emit_insn (gen_movsi_got_large (operands[0], operands[1], operands[2]));
- DONE;
- }
}")
-(define_insn "*movsi_got_internal1"
+(define_insn "*movsi_got_internal"
[(set (match_operand:SI 0 "register_operand" "=r")
(unspec [(match_operand:SI 1 "got_operand" "")
(match_operand:SI 2 "register_operand" "b")] 8))]
"{l|lwz} %0,%a1@got(%2)"
[(set_attr "type" "load")])
-(define_expand "movsi_got_large"
- [(set (match_dup 3)
- (unspec [(match_operand:SI 1 "got_operand" "")] 9))
- (set (match_dup 3)
- (unspec [(match_dup 1)
- (match_dup 3)] 10))
- (set (match_operand:SI 0 "register_operand" "")
- (mem:SI (plus:SI (match_dup 3)
- (match_operand:SI 2 "register_operand" ""))))]
- "(DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS) && flag_pic > 1"
- "
-{
- if (reload_completed || reload_in_progress)
- abort ();
-
- operands[3] = gen_reg_rtx (SImode);
-}")
-
-(define_insn "*movsi_got_internal2_high"
- [(set (match_operand:SI 0 "register_operand" "=b")
- (unspec [(match_operand:SI 1 "got_operand" "")] 9))]
- "(DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS) && flag_pic > 1"
- "{cau|addis} %0,0,%1@got@ha")
-
-(define_insn "*movsi_got_internal2_losum"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (unspec [(match_operand:SI 1 "got_operand" "")
- (match_operand:SI 2 "register_operand" "b")] 10))]
- "(DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS) && flag_pic > 1"
- "{cal %0,%a1@got@l(%2)|addi %0,%2,%a1@got@l}")
-
;; For SI, we special-case integers that can't be loaded in one insn. We
;; do the load 16-bits at a time. We could do this by loading from memory,
;; and this is even supposed to be faster, but it is simpler not to get
}
if ((DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS)
- && flag_pic && got_operand (operands[1], SImode))
+ && flag_pic == 1 && got_operand (operands[1], SImode))
{
emit_insn (gen_movsi_got (operands[0], operands[1]));
DONE;
else \
error ("Bad value for -msdata=%s", rs6000_sdata_name); \
} \
+ else if (TARGET_SDATA && TARGET_EABI) \
+ { \
+ rs6000_sdata = SDATA_EABI; \
+ rs6000_sdata_name = "eabi"; \
+ } \
else if (TARGET_SDATA) \
- rs6000_sdata = (TARGET_EABI) ? SDATA_EABI : SDATA_SYSV; \
+ { \
+ rs6000_sdata = SDATA_SYSV; \
+ rs6000_sdata_name = "sysv"; \
+ } \
else if (DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS) \
{ \
rs6000_sdata = SDATA_DATA; \
+ rs6000_sdata_name = "data"; \
target_flags |= MASK_SDATA; \
} \
else \
- rs6000_sdata = SDATA_NONE; \
+ { \
+ rs6000_sdata = SDATA_NONE; \
+ rs6000_sdata_name = "none"; \
+ } \
\
if (TARGET_RELOCATABLE && \
(rs6000_sdata == SDATA_EABI || rs6000_sdata == SDATA_SYSV)) \
{ \
rs6000_sdata = SDATA_DATA; \
- error ("-mrelocatable and -msdata are incompatible."); \
+ error ("-mrelocatable and -msdata=%s are incompatible.", \
+ rs6000_sdata_name); \
} \
\
- if (TARGET_SDATA && DEFAULT_ABI != ABI_V4 \
- && DEFAULT_ABI != ABI_SOLARIS) \
+ else if (flag_pic && \
+ (rs6000_sdata == SDATA_EABI || rs6000_sdata == SDATA_SYSV)) \
+ { \
+ rs6000_sdata = SDATA_DATA; \
+ error ("-f%s and -msdata=%s are incompatible.", \
+ (flag_pic > 1) ? "PIC" : "pic", \
+ rs6000_sdata_name); \
+ } \
+ \
+ if (TARGET_SDATA && DEFAULT_ABI != ABI_V4 && DEFAULT_ABI != ABI_SOLARIS) \
{ \
target_flags &= ~MASK_SDATA; \
error ("-msdata and -mcall-%s are incompatible.", rs6000_abi_name); \
target_flags |= MASK_LITTLE_ENDIAN; \
error ("-mcall-nt must be little endian"); \
} \
+ \
+ /* Treat -fPIC the same as -mrelocatable */ \
+ if (flag_pic > 1) \
+ target_flags |= MASK_RELOCATABLE; \
+ \
+ else if (TARGET_RELOCATABLE) \
+ flag_pic = 2; \
+ \
} while (0)
/* Default ABI to compile code for */
# Build libgcc.a with different options.
MULTILIB_OPTIONS = msoft-float \
- mrelocatable \
+ mrelocatable-lib \
mlittle/mbig \
- mcall-sysv-noeabi/mcall-sysv-eabi/mcall-aix/mcall-solaris
+ mcall-sysv-noeabi/mcall-sysv-eabi/mcall-aix
MULTILIB_DIRNAMES = nof \
rel \
le be \
- cs ce ca sol
+ cs ce ca
MULTILIB_MATCHES = mlittle=mlittle-endian \
+ mlittle=mcall-solaris \
mbig=mbig-endian \
mbig=mcall-linux \
msoft-float=mcpu?403 \
msoft-float=mcpu?860 \
mcall-sysv-noeabi=mcall-linux \
mcall-sysv-eabi=meabi \
- mcall-sysv-noeabi=mno-eabi
-
-MULTILIB_EXCEPTIONS = *mrelocatable*/*mcall-sysv-noeabi* \
- *mrelocatable*/*mcall-solaris* \
- *mbig*/*mcall-solaris* \
- *mlittle*/*mcall-solaris*
+ mcall-sysv-noeabi=mno-eabi \
+ mcall-sysv-noeabi=mcall-solaris \
+ mrelocatable-lib=mrelocatable \
+ mrelocatable-lib=fpic \
+ mrelocatable-lib=fPIC \
+ mrelocatable-lib=shared
LIBGCC = stmp-multilib stmp-crt
INSTALL_LIBGCC = install-multilib install-crt