aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/i386/i386.c11
2 files changed, 18 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bc2fd58..06e0074 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2011-07-26 Uros Bizjak <ubizjak@gmail.com>
+ H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/47369
+ PR target/49853
+ * config/i386/i386.c (ix86_expand_move): Call convert_to_mode
+ if legitimize_tls_address returned operand in wrong mode. Allow
+ SImode and DImode symbolic operand for PIC. Call convert_to_mode
+ if legitimize_pic_address returned operand in wrong mode.
+
2011-07-26 Martin Jambor <mjambor@suse.cz>
* tree-sra.c (tree_non_mode_aligned_mem_p): Strip conversions and
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 3668357..429cd62 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -15028,11 +15028,14 @@ ix86_expand_move (enum machine_mode mode, rtx operands[])
op0, 1, OPTAB_DIRECT);
if (tmp == op0)
return;
+ if (GET_MODE (tmp) != mode)
+ op1 = convert_to_mode (mode, tmp, 1);
}
}
if ((flag_pic || MACHOPIC_INDIRECT)
- && mode == Pmode && symbolic_operand (op1, Pmode))
+ && (mode == SImode || mode == DImode)
+ && symbolic_operand (op1, mode))
{
if (TARGET_MACHO && !TARGET_64BIT)
{
@@ -15073,13 +15076,15 @@ ix86_expand_move (enum machine_mode mode, rtx operands[])
else
{
if (MEM_P (op0))
- op1 = force_reg (Pmode, op1);
- else if (!TARGET_64BIT || !x86_64_movabs_operand (op1, Pmode))
+ op1 = force_reg (mode, op1);
+ else if (!TARGET_64BIT || !x86_64_movabs_operand (op1, mode))
{
rtx reg = can_create_pseudo_p () ? NULL_RTX : op0;
op1 = legitimize_pic_address (op1, reg);
if (op0 == op1)
return;
+ if (GET_MODE (op1) != mode)
+ op1 = convert_to_mode (mode, op1, 1);
}
}
}