mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-27 23:16:01 +08:00
sh.c (prepare_move_operands): Handle the address constant which is a tls symbolic address plus a constant.
* config/sh/sh.c (prepare_move_operands): Handle the address constant which is a tls symbolic address plus a constant. From-SVN: r105736
This commit is contained in:
parent
de19a50ee4
commit
6058b2fa2c
@ -1,3 +1,8 @@
|
||||
2005-10-21 Kaz Kojima <kkojima@gcc.gnu.org>
|
||||
|
||||
* config/sh/sh.c (prepare_move_operands): Handle the address
|
||||
constant which is a tls symbolic address plus a constant.
|
||||
|
||||
2005-10-21 Andrew Pinski <pinskia@physics.uc.edu>
|
||||
|
||||
PR driver/24473
|
||||
|
@ -1238,11 +1238,21 @@ prepare_move_operands (rtx operands[], enum machine_mode mode)
|
||||
|
||||
if (mode == Pmode || mode == ptr_mode)
|
||||
{
|
||||
rtx op0, op1;
|
||||
rtx op0, op1, opc;
|
||||
enum tls_model tls_kind;
|
||||
|
||||
op0 = operands[0];
|
||||
op1 = operands[1];
|
||||
if (GET_CODE (op1) == CONST
|
||||
&& GET_CODE (XEXP (op1, 0)) == PLUS
|
||||
&& tls_symbolic_operand (XEXP (XEXP (op1, 0), 0), Pmode))
|
||||
{
|
||||
opc = XEXP (XEXP (op1, 0), 1);
|
||||
op1 = XEXP (XEXP (op1, 0), 0);
|
||||
}
|
||||
else
|
||||
opc = NULL_RTX;
|
||||
|
||||
if ((tls_kind = tls_symbolic_operand (op1, Pmode)))
|
||||
{
|
||||
rtx tga_op1, tga_ret, tmp, tmp2;
|
||||
@ -1308,6 +1318,8 @@ prepare_move_operands (rtx operands[], enum machine_mode mode)
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
}
|
||||
if (opc)
|
||||
emit_insn (gen_addsi3 (op1, op1, force_reg (SImode, opc)));
|
||||
operands[1] = op1;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user