rs6000.c (rs6000_emit_set_long_const): Shorten sequence for DImode constants >= 0x80000000UL <= 0xFFFFFFFFUL by 1 insn.
* config/rs6000/rs6000.c (rs6000_emit_set_long_const): Shorten sequence for DImode constants >= 0x80000000UL <= 0xFFFFFFFFUL by 1 insn. (num_insns_constant_wide): Adjust for that change. From-SVN: r155770
This commit is contained in:
parent
f2ff577a33
commit
7234a61566
@ -1,3 +1,10 @@
|
||||
2010-01-09 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config/rs6000/rs6000.c (rs6000_emit_set_long_const): Shorten
|
||||
sequence for DImode constants >= 0x80000000UL <= 0xFFFFFFFFUL by
|
||||
1 insn.
|
||||
(num_insns_constant_wide): Adjust for that change.
|
||||
|
||||
2010-01-09 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
PR debug/42631
|
||||
|
@ -3794,6 +3794,8 @@ num_insns_constant_wide (HOST_WIDE_INT value)
|
||||
|
||||
if (low == 0)
|
||||
return num_insns_constant_wide (high) + 1;
|
||||
else if (high == 0)
|
||||
return num_insns_constant_wide (low) + 1;
|
||||
else
|
||||
return (num_insns_constant_wide (high)
|
||||
+ num_insns_constant_wide (low) + 1);
|
||||
@ -6143,6 +6145,20 @@ rs6000_emit_set_long_const (rtx dest, HOST_WIDE_INT c1, HOST_WIDE_INT c2)
|
||||
gen_rtx_IOR (DImode, copy_rtx (dest),
|
||||
GEN_INT (ud1)));
|
||||
}
|
||||
else if (ud3 == 0 && ud4 == 0)
|
||||
{
|
||||
gcc_assert (ud2 & 0x8000);
|
||||
emit_move_insn (dest, GEN_INT (((ud2 << 16) ^ 0x80000000)
|
||||
- 0x80000000));
|
||||
if (ud1 != 0)
|
||||
emit_move_insn (copy_rtx (dest),
|
||||
gen_rtx_IOR (DImode, copy_rtx (dest),
|
||||
GEN_INT (ud1)));
|
||||
emit_move_insn (copy_rtx (dest),
|
||||
gen_rtx_ZERO_EXTEND (DImode,
|
||||
gen_lowpart (SImode,
|
||||
copy_rtx (dest))));
|
||||
}
|
||||
else if ((ud4 == 0xffff && (ud3 & 0x8000))
|
||||
|| (ud4 == 0 && ! (ud3 & 0x8000)))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user