mirror of git://gcc.gnu.org/git/gcc.git
ia64.c (ia64_expand_load_address): Force destination to be DImode register.
* config/ia64/ia64.c (ia64_expand_load_address): Force destination to be DImode register. Merge load_symptr. * config/ia64/ia64.md (load_symptr): Remove. From-SVN: r66808
This commit is contained in:
parent
2adb9af1f8
commit
ae49d6e592
|
@ -1,3 +1,9 @@
|
||||||
|
2003-05-14 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* config/ia64/ia64.c (ia64_expand_load_address): Force destination
|
||||||
|
to be DImode register. Merge load_symptr.
|
||||||
|
* config/ia64/ia64.md (load_symptr): Remove.
|
||||||
|
|
||||||
2003-05-14 Richard Henderson <rth@redhat.com>
|
2003-05-14 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
* rtl.h (TREE_CONSTANT_POOL_ADDRESS_P): Rename from
|
* rtl.h (TREE_CONSTANT_POOL_ADDRESS_P): Rename from
|
||||||
|
|
|
@ -1099,6 +1099,13 @@ ia64_expand_load_address (dest, src)
|
||||||
if (GET_CODE (dest) != REG)
|
if (GET_CODE (dest) != REG)
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
|
/* ILP32 mode still loads 64-bits of data from the GOT. This avoids
|
||||||
|
having to pointer-extend the value afterward. Other forms of address
|
||||||
|
computation below are also more natural to compute as 64-bit quantities.
|
||||||
|
If we've been given an SImode destination register, change it. */
|
||||||
|
if (GET_MODE (dest) != Pmode)
|
||||||
|
dest = gen_rtx_REG (Pmode, REGNO (dest));
|
||||||
|
|
||||||
if (TARGET_AUTO_PIC)
|
if (TARGET_AUTO_PIC)
|
||||||
{
|
{
|
||||||
emit_insn (gen_load_gprel64 (dest, src));
|
emit_insn (gen_load_gprel64 (dest, src));
|
||||||
|
@ -1129,11 +1136,20 @@ ia64_expand_load_address (dest, src)
|
||||||
lo = ((ofs & 0x3fff) ^ 0x2000) - 0x2000;
|
lo = ((ofs & 0x3fff) ^ 0x2000) - 0x2000;
|
||||||
hi = ofs - lo;
|
hi = ofs - lo;
|
||||||
|
|
||||||
emit_insn (gen_load_symptr (dest, plus_constant (sym, hi), dest));
|
ia64_expand_load_address (dest, plus_constant (sym, hi));
|
||||||
emit_insn (gen_adddi3 (dest, dest, GEN_INT (lo)));
|
emit_insn (gen_adddi3 (dest, dest, GEN_INT (lo)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
emit_insn (gen_load_symptr (dest, src, dest));
|
{
|
||||||
|
rtx tmp;
|
||||||
|
|
||||||
|
tmp = gen_rtx_HIGH (Pmode, src);
|
||||||
|
tmp = gen_rtx_PLUS (Pmode, tmp, pic_offset_table_rtx);
|
||||||
|
emit_insn (gen_rtx_SET (VOIDmode, dest, tmp));
|
||||||
|
|
||||||
|
tmp = gen_rtx_LO_SUM (GET_MODE (dest), dest, src);
|
||||||
|
emit_insn (gen_rtx_SET (VOIDmode, dest, tmp));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static GTY(()) rtx gen_tls_tga;
|
static GTY(()) rtx gen_tls_tga;
|
||||||
|
|
|
@ -410,17 +410,6 @@
|
||||||
operands[3] = pic_offset_table_rtx;
|
operands[3] = pic_offset_table_rtx;
|
||||||
})
|
})
|
||||||
|
|
||||||
(define_expand "load_symptr"
|
|
||||||
[(set (match_operand:DI 2 "register_operand" "")
|
|
||||||
(plus:DI (high:DI (match_operand:DI 1 "got_symbolic_operand" ""))
|
|
||||||
(match_dup 3)))
|
|
||||||
(set (match_operand:DI 0 "register_operand" "")
|
|
||||||
(lo_sum:DI (match_dup 2) (match_dup 1)))]
|
|
||||||
""
|
|
||||||
{
|
|
||||||
operands[3] = pic_offset_table_rtx;
|
|
||||||
})
|
|
||||||
|
|
||||||
(define_insn "*load_symptr_high"
|
(define_insn "*load_symptr_high"
|
||||||
[(set (match_operand:DI 0 "register_operand" "=r")
|
[(set (match_operand:DI 0 "register_operand" "=r")
|
||||||
(plus:DI (high:DI (match_operand 1 "got_symbolic_operand" "s"))
|
(plus:DI (high:DI (match_operand 1 "got_symbolic_operand" "s"))
|
||||||
|
|
Loading…
Reference in New Issue