+2013-05-13 Kai Tietz <ktietz@redhat.com>
+
+ PR target/56975
+ * config/i386/cygming.h (TARGET_PECOFF): Define as true.
+ * config/i386/i386.h (TARGET_PECOFF): Define by default
+ as false.
+ (PIC_OFFSET_TABLE_REGNUM): Use TARGET_PECOFF.
+ * config/i386/i386.c (ix86_option_override_internal):
+ Likewise.
+ (ix86_expand_prologue): Likewise.
+ (ix86_expand_split_stack_prologue): Likewise.
+ (legitimate_pic_address_disp_p): Likewise.
+ (legitimize_pic_address): Likewise.
+ (legitimize_tls_address): Likewise.
+ (legitimize_pe_coff_symbol): Likewise.
+ (output_pic_addr_const): Likewise.
+ (construct_plt_address): Likewise.
+ (ix86_expand_call): Likewise.
+ (x86_output_mi_thunk): Likewise.
+ (x86_function_profiler): Likewise.
+
2013-05-13 Sofiane Naci <sofiane.naci@arm.com>
* config/aarch64/aarch64-simd.md (aarch64_simd_mov<mode>): Group
use of rip-relative addressing. This eliminates fixups that
would otherwise be needed if this object is to be placed in a
DLL, and is essentially just as efficient as direct addressing. */
- if (TARGET_64BIT && (TARGET_RDOS || DEFAULT_ABI == MS_ABI))
+ if (TARGET_64BIT && (TARGET_RDOS || TARGET_PECOFF))
ix86_cmodel = CM_MEDIUM_PIC, flag_pic = 1;
else if (TARGET_64BIT)
ix86_cmodel = flag_pic ? CM_SMALL_PIC : CM_SMALL;
pic_reg_used = false;
/* We don't use pic-register for pe-coff target. */
if (pic_offset_table_rtx
- && DEFAULT_ABI != MS_ABI
+ && !TARGET_PECOFF
&& (df_regs_ever_live_p (REAL_PIC_OFFSET_TABLE_REGNUM)
|| crtl->profile))
{
}
if ((ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
- && DEFAULT_ABI != MS_ABI)
+ && !TARGET_PECOFF)
{
HOST_WIDE_INT argval;
|| (TARGET_DLLIMPORT_DECL_ATTRIBUTES && SYMBOL_REF_DLLIMPORT_P (op0)))
return false;
- if (DEFAULT_ABI == MS_ABI)
+ if (TARGET_PECOFF)
{
if (is_imported_p (op0))
return true;
if ((GET_CODE (XVECEXP (disp, 0, 0)) == SYMBOL_REF
|| GET_CODE (XVECEXP (disp, 0, 0)) == LABEL_REF)
&& !TARGET_64BIT)
- return DEFAULT_ABI != MS_ABI && gotoff_operand (XVECEXP (disp, 0, 0), Pmode);
+ return !TARGET_PECOFF && gotoff_operand (XVECEXP (disp, 0, 0), Pmode);
return false;
case UNSPEC_GOTTPOFF:
case UNSPEC_GOTNTPOFF:
if (TARGET_64BIT && legitimate_pic_address_disp_p (addr))
new_rtx = addr;
- else if (TARGET_64BIT && DEFAULT_ABI != MS_ABI
+ else if (TARGET_64BIT && !TARGET_PECOFF
&& ix86_cmodel != CM_SMALL_PIC && gotoff_operand (addr, Pmode))
{
rtx tmpreg;
else
new_rtx = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, tmpreg);
}
- else if (!TARGET_64BIT && DEFAULT_ABI != MS_ABI && gotoff_operand (addr, Pmode))
+ else if (!TARGET_64BIT && !TARGET_PECOFF && gotoff_operand (addr, Pmode))
{
/* This symbol may be referenced via a displacement from the PIC
base address (@GOTOFF). */
/* For x64 PE-COFF there is no GOT table. So we use address
directly. */
- if (TARGET_64BIT && DEFAULT_ABI == MS_ABI)
+ if (TARGET_64BIT && TARGET_PECOFF)
{
new_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_PCREL);
new_rtx = gen_rtx_CONST (Pmode, new_rtx);
/* Check first to see if this is a constant offset from a @GOTOFF
symbol reference. */
- if (DEFAULT_ABI != MS_ABI && gotoff_operand (op0, Pmode)
+ if (!TARGET_PECOFF && gotoff_operand (op0, Pmode)
&& CONST_INT_P (op1))
{
if (!TARGET_64BIT)
if (!TARGET_64BIT)
{
- if (flag_pic && DEFAULT_ABI != MS_ABI)
+ if (flag_pic && !TARGET_PECOFF)
pic = pic_offset_table_rtx;
else
{
static rtx
legitimize_pe_coff_symbol (rtx addr, bool inreg)
{
- if (DEFAULT_ABI != MS_ABI)
+ if (!TARGET_PECOFF)
return NULL_RTX;
if (TARGET_DLLIMPORT_DECL_ATTRIBUTES)
#endif
assemble_name (file, name);
}
- if (!TARGET_MACHO && !(TARGET_64BIT && DEFAULT_ABI == MS_ABI)
+ if (!TARGET_MACHO && !(TARGET_64BIT && TARGET_PECOFF)
&& code == 'P' && ! SYMBOL_REF_LOCAL_P (x))
fputs ("@PLT", file);
break;
rtx tmp, unspec;
gcc_assert (GET_CODE (symbol) == SYMBOL_REF);
- gcc_assert (ix86_cmodel == CM_LARGE_PIC && DEFAULT_ABI != MS_ABI);
+ gcc_assert (ix86_cmodel == CM_LARGE_PIC && !TARGET_PECOFF);
gcc_assert (Pmode == DImode);
tmp = gen_reg_rtx (Pmode);
}
if (ix86_cmodel == CM_LARGE_PIC
- && DEFAULT_ABI != MS_ABI
+ && !TARGET_PECOFF
&& MEM_P (fnaddr)
&& GET_CODE (XEXP (fnaddr, 0)) == SYMBOL_REF
&& !local_symbolic_operand (XEXP (fnaddr, 0), VOIDmode))
if (TARGET_64BIT)
{
if (!flag_pic || targetm.binds_local_p (function)
- || DEFAULT_ABI == MS_ABI)
+ || TARGET_PECOFF)
;
else
{
fprintf (file, "\tleaq\t%sP%d(%%rip),%%r11\n", LPREFIX, labelno);
#endif
- if (DEFAULT_ABI == SYSV_ABI && flag_pic)
+ if (!TARGET_PECOFF && flag_pic)
fprintf (file, "\tcall\t*%s@GOTPCREL(%%rip)\n", mcount_name);
else
fprintf (file, "\tcall\t%s\n", mcount_name);