diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-09-15 22:47:10 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-09-15 22:47:10 +0000 |
commit | 519e577727b279000fbf3afdaecdab5700189de2 (patch) | |
tree | ed903d8c350727df2bf1f53c6551d8a874814869 /gcc/combine.c | |
parent | 2d4dc8d22b1844b06724fd3d326b8b80cd2b55c5 (diff) | |
download | gcc-519e577727b279000fbf3afdaecdab5700189de2.tar.gz |
* combine.c (make_extraction): If no mode is specified for
an operand of insv, extv, or extzv, default it to word_mode.
(simplify_comparison): Similarly.
* expmed.c (store_bit_field): Similarly.
(extract_bit_field): Similarly.
* function.c (fixup_var_regs_1): Similarly.
* recog.c (validate_replace_rtx_1): Similarly.
* mips.md (extv, extzv, insv expanders): Default modes for most
operands. Handle TARGET_64BIT.
(movdi_uld, movdi_usd): New patterns.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22439 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 46 |
1 files changed, 34 insertions, 12 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 8f0ea65346e..024cb51e48b 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -5605,27 +5605,45 @@ make_extraction (mode, inner, pos, pos_rtx, len, #ifdef HAVE_insv if (in_dest) { - wanted_inner_reg_mode = insn_operand_mode[(int) CODE_FOR_insv][0]; - pos_mode = insn_operand_mode[(int) CODE_FOR_insv][2]; - extraction_mode = insn_operand_mode[(int) CODE_FOR_insv][3]; + wanted_inner_reg_mode + = (insn_operand_mode[(int) CODE_FOR_insv][0] == VOIDmode + ? word_mode + : insn_operand_mode[(int) CODE_FOR_insv][0]); + pos_mode = (insn_operand_mode[(int) CODE_FOR_insv][2] == VOIDmode + ? word_mode : insn_operand_mode[(int) CODE_FOR_insv][2]); + extraction_mode = (insn_operand_mode[(int) CODE_FOR_insv][3] == VOIDmode + ? word_mode + : insn_operand_mode[(int) CODE_FOR_insv][3]); } #endif #ifdef HAVE_extzv if (! in_dest && unsignedp) { - wanted_inner_reg_mode = insn_operand_mode[(int) CODE_FOR_extzv][1]; - pos_mode = insn_operand_mode[(int) CODE_FOR_extzv][3]; - extraction_mode = insn_operand_mode[(int) CODE_FOR_extzv][0]; + wanted_inner_reg_mode + = (insn_operand_mode[(int) CODE_FOR_extzv][1] == VOIDmode + ? word_mode + : insn_operand_mode[(int) CODE_FOR_extzv][1]); + pos_mode = (insn_operand_mode[(int) CODE_FOR_extzv][3] == VOIDmode + ? word_mode : insn_operand_mode[(int) CODE_FOR_extzv][3]); + extraction_mode = (insn_operand_mode[(int) CODE_FOR_extzv][0] == VOIDmode + ? word_mode + : insn_operand_mode[(int) CODE_FOR_extzv][0]); } #endif #ifdef HAVE_extv if (! in_dest && ! unsignedp) { - wanted_inner_reg_mode = insn_operand_mode[(int) CODE_FOR_extv][1]; - pos_mode = insn_operand_mode[(int) CODE_FOR_extv][3]; - extraction_mode = insn_operand_mode[(int) CODE_FOR_extv][0]; + wanted_inner_reg_mode + = (insn_operand_mode[(int) CODE_FOR_extv][1] == VOIDmode + ? word_mode + : insn_operand_mode[(int) CODE_FOR_extv][1]); + pos_mode = (insn_operand_mode[(int) CODE_FOR_extv][3] == VOIDmode + ? word_mode : insn_operand_mode[(int) CODE_FOR_extv][3]); + extraction_mode = (insn_operand_mode[(int) CODE_FOR_extv][0] == VOIDmode + ? word_mode + : insn_operand_mode[(int) CODE_FOR_extv][0]); } #endif @@ -9762,12 +9780,16 @@ simplify_comparison (code, pop0, pop1) && (i = exact_log2 (INTVAL (XEXP (op0, 0)))) >= 0) { if (BITS_BIG_ENDIAN) + { #ifdef HAVE_extzv - i = (GET_MODE_BITSIZE - (insn_operand_mode[(int) CODE_FOR_extzv][1]) - 1 - i); + mode = insn_operand_mode[(int) CODE_FOR_extzv][1]; + if (mode == VOIDmode) + mode = word_mode; + i = (GET_MODE_BITSIZE (mode) - 1 - i); #else - i = BITS_PER_WORD - 1 - i; + i = BITS_PER_WORD - 1 - i; #endif + } op0 = XEXP (op0, 2); op1 = GEN_INT (i); |