remove gen_rtx_SUBREG in rs6000.md

Geoff Keating geoffk@geoffk.com
Tue Nov 7 10:50:00 GMT 2000


This replaces gen_rtx_SUBREG in rs6000.md with operand_subword_force.

Bootstrapped and tested on powerpc-linux.

-- 
- Geoffrey Keating <geoffk@geoffk.org>

===File ~/patches/cygnus/rs6000-nogensubreg.patch===========
2000-11-07  Geoff Keating  <geoffk@redhat.com>

	* config/rs6000/rs6000.md (movdi_internal32+1): Use
	operand_subreg_force rather than gen_rtx_SUBREG.
	(movdi_internal32+2): Likewise.

Index: config/rs6000/rs6000.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.102
diff -p -u -u -p -r1.102 rs6000.md
--- rs6000.md	2000/10/01 05:29:14	1.102
+++ rs6000.md	2000/11/07 18:50:09
@@ -7929,8 +7929,10 @@
   "
 {
   HOST_WIDE_INT value = INTVAL (operands[1]);
-  operands[2] = gen_rtx_SUBREG (SImode, operands[0], WORDS_BIG_ENDIAN == 0);
-  operands[3] = gen_rtx_SUBREG (SImode, operands[0], WORDS_BIG_ENDIAN != 0);
+  operands[2] = operand_subword_force (operands[0], WORDS_BIG_ENDIAN == 0,
+				       DImode);
+  operands[3] = operand_subword_force (operands[0], WORDS_BIG_ENDIAN != 0,
+				       DImode);
 #if HOST_BITS_PER_WIDE_INT == 32
   operands[4] = (value & 0x80000000) ? constm1_rtx : const0_rtx;
 #else
@@ -7947,8 +7949,10 @@
    (set (match_dup 3) (match_dup 5))]
   "
 {
-  operands[2] = gen_rtx_SUBREG (SImode, operands[0], WORDS_BIG_ENDIAN == 0);
-  operands[3] = gen_rtx_SUBREG (SImode, operands[0], WORDS_BIG_ENDIAN != 0);
+  operands[2] = operand_subword_force (operands[0], WORDS_BIG_ENDIAN == 0,
+				       DImode);
+  operands[3] = operand_subword_force (operands[0], WORDS_BIG_ENDIAN != 0,
+				       DImode);
   operands[4] = GEN_INT (CONST_DOUBLE_HIGH (operands[1]));
   operands[5] = GEN_INT (CONST_DOUBLE_LOW  (operands[1]));
 }")
============================================================


More information about the Gcc-patches mailing list