Commit 54c2fc72 by James E Wilson Committed by Eric Botcazou

re PR bootstrap/10983 ([SPARC64] ICE in verify_wide_reg, at flow.c:551, while compiling libjava)

	PR bootstrap/10983
	* combine.c (make_extraction): Use gen_lowpart_for_combine
	when extracting from a REG and not in the destination of a SET.

Co-Authored-By: Eric Botcazou <ebotcazou@libertysurf.fr>

From-SVN: r67916
parent 7e7de68b
2003-06-13 Jim Wilson <wilson@tuliptree.org>
Eric Botcazou <ebotcazou@libertysurf.fr>
PR bootstrap/10983
* combine.c (make_extraction): Use gen_lowpart_for_combine
when extracting from a REG and not in the destination of a SET.
2003-06-13 Doug Evans <dje@sebabeach.org> 2003-06-13 Doug Evans <dje@sebabeach.org>
* tsystem.h (abort): Declare in inhibit_libc case to remove build * tsystem.h (abort): Declare in inhibit_libc case to remove build
......
...@@ -6139,30 +6139,35 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos, ...@@ -6139,30 +6139,35 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos,
} }
else if (GET_CODE (inner) == REG) else if (GET_CODE (inner) == REG)
{ {
/* We can't call gen_lowpart_for_combine here since we always want
a SUBREG and it would sometimes return a new hard register. */
if (tmode != inner_mode) if (tmode != inner_mode)
{ {
HOST_WIDE_INT final_word = pos / BITS_PER_WORD; if (in_dest)
{
if (WORDS_BIG_ENDIAN /* We can't call gen_lowpart_for_combine here since we always want
&& GET_MODE_SIZE (inner_mode) > UNITS_PER_WORD) a SUBREG and it would sometimes return a new hard register. */
final_word = ((GET_MODE_SIZE (inner_mode) HOST_WIDE_INT final_word = pos / BITS_PER_WORD;
- GET_MODE_SIZE (tmode))
/ UNITS_PER_WORD) - final_word; if (WORDS_BIG_ENDIAN
&& GET_MODE_SIZE (inner_mode) > UNITS_PER_WORD)
final_word *= UNITS_PER_WORD; final_word = ((GET_MODE_SIZE (inner_mode)
if (BYTES_BIG_ENDIAN && - GET_MODE_SIZE (tmode))
GET_MODE_SIZE (inner_mode) > GET_MODE_SIZE (tmode)) / UNITS_PER_WORD) - final_word;
final_word += (GET_MODE_SIZE (inner_mode)
- GET_MODE_SIZE (tmode)) % UNITS_PER_WORD; final_word *= UNITS_PER_WORD;
if (BYTES_BIG_ENDIAN &&
/* Avoid creating invalid subregs, for example when GET_MODE_SIZE (inner_mode) > GET_MODE_SIZE (tmode))
simplifying (x>>32)&255. */ final_word += (GET_MODE_SIZE (inner_mode)
if (final_word >= GET_MODE_SIZE (inner_mode)) - GET_MODE_SIZE (tmode)) % UNITS_PER_WORD;
return NULL_RTX;
/* Avoid creating invalid subregs, for example when
new = gen_rtx_SUBREG (tmode, inner, final_word); simplifying (x>>32)&255. */
if (final_word >= GET_MODE_SIZE (inner_mode))
return NULL_RTX;
new = gen_rtx_SUBREG (tmode, inner, final_word);
}
else
new = gen_lowpart_for_combine (tmode, inner);
} }
else else
new = inner; new = inner;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment