Skip to content

Commit 7ca6a92

Browse files
author
uros
committed
* config/i386/i386.c (ix86_split_long_move): Do not handle
address used for LEA in a special way. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@252984 138bc75d-0d04-0410-961f-82ee72b054a4
1 parent b22b732 commit 7ca6a92

File tree

2 files changed

+10
-36
lines changed

2 files changed

+10
-36
lines changed

gcc/ChangeLog

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
2017-09-17 Segher Boessenkool <[email protected]>
1+
2017-09-19 Uros Bizjak <[email protected]>
2+
3+
* config/i386/i386.c (ix86_split_long_move): Do not handle
4+
address used for LEA in a special way.
5+
6+
2017-09-19 Segher Boessenkool <[email protected]>
27

38
* simplify-rtx.c (simplify_binary_operation_1): Fix typo in comment.
49

5-
2017-09-18 Martin Sebor <[email protected]>
10+
2017-09-19 Martin Sebor <[email protected]>
611

712
PR c/81854
813
* cgraphunit.c (handle_alias_pairs): Reject aliases between functions

gcc/config/i386/i386.c

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -26706,7 +26706,7 @@ ix86_split_long_move (rtx operands[])
2670626706
Do an lea to the last part and use only one colliding move. */
2670726707
else if (collisions > 1)
2670826708
{
26709-
rtx base, addr, tls_base = NULL_RTX;
26709+
rtx base, addr;
2671026710

2671126711
collisions = 1;
2671226712

@@ -26723,44 +26723,13 @@ ix86_split_long_move (rtx operands[])
2672326723
struct ix86_address parts;
2672426724
int ok = ix86_decompose_address (addr, &parts);
2672526725
gcc_assert (ok);
26726-
if (parts.seg == DEFAULT_TLS_SEG_REG)
26727-
{
26728-
/* It is not valid to use %gs: or %fs: in
26729-
lea though, so we need to remove it from the
26730-
address used for lea and add it to each individual
26731-
memory loads instead. */
26732-
addr = copy_rtx (addr);
26733-
rtx *x = &addr;
26734-
while (GET_CODE (*x) == PLUS)
26735-
{
26736-
for (i = 0; i < 2; i++)
26737-
{
26738-
rtx u = XEXP (*x, i);
26739-
if (GET_CODE (u) == ZERO_EXTEND)
26740-
u = XEXP (u, 0);
26741-
if (GET_CODE (u) == UNSPEC
26742-
&& XINT (u, 1) == UNSPEC_TP)
26743-
{
26744-
tls_base = XEXP (*x, i);
26745-
*x = XEXP (*x, 1 - i);
26746-
break;
26747-
}
26748-
}
26749-
if (tls_base)
26750-
break;
26751-
x = &XEXP (*x, 0);
26752-
}
26753-
gcc_assert (tls_base);
26754-
}
26726+
/* It is not valid to use %gs: or %fs: in lea. */
26727+
gcc_assert (parts.seg == ADDR_SPACE_GENERIC);
2675526728
}
2675626729
emit_insn (gen_rtx_SET (base, addr));
26757-
if (tls_base)
26758-
base = gen_rtx_PLUS (GET_MODE (base), base, tls_base);
2675926730
part[1][0] = replace_equiv_address (part[1][0], base);
2676026731
for (i = 1; i < nparts; i++)
2676126732
{
26762-
if (tls_base)
26763-
base = copy_rtx (base);
2676426733
tmp = plus_constant (Pmode, base, UNITS_PER_WORD * i);
2676526734
part[1][i] = replace_equiv_address (part[1][i], tmp);
2676626735
}

0 commit comments

Comments
 (0)