[committed] mips.md macroisation (8/n)
Richard Sandiford
rsandifo@redhat.com
Mon Aug 23 08:55:00 GMT 2004
Part 8 of the mips.md macroisation process. This patch handles the
MIPS16 $31 store patterns.
Bootstrapped & regression tested on mips-sgi-irix6.5. Also tested by
comparing the gcc.c-torture and gcc.dg output of "mips64-elf -O2 -mips16"
before and after the patch. Applied to head.
Richard
* config/mips/mips.md (*mov<mode>_ra): Name previously unnamed MIPS16
$31 store insns. Redefine using :GPR.
Index: config/mips/mips.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.md,v
retrieving revision 1.278
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.278 mips.md
--- config/mips/mips.md 23 Aug 2004 08:09:04 -0000 1.278
+++ config/mips/mips.md 23 Aug 2004 08:09:46 -0000
@@ -3432,13 +3432,13 @@ (define_expand "movdi"
;; memory, since we don't have a constraint to match $31. This
;; instruction can be generated by save_restore_insns.
-(define_insn ""
- [(set (match_operand:DI 0 "stack_operand" "=m")
- (reg:DI 31))]
- "TARGET_MIPS16 && TARGET_64BIT"
- "sd\t$31,%0"
- [(set_attr "type" "store")
- (set_attr "mode" "DI")])
+(define_insn "*mov<mode>_ra"
+ [(set (match_operand:GPR 0 "stack_operand" "=m")
+ (reg:GPR 31))]
+ "TARGET_MIPS16"
+ "<store>\t$31,%0"
+ [(set_attr "type" "store")
+ (set_attr "mode" "<MODE>")])
(define_insn "*movdi_32bit"
[(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,m,*x,*d,*B*C*D,*B*C*D,*d,*m")
@@ -3555,16 +3555,6 @@ (define_expand "movsi"
DONE;
})
-;; We can only store $ra directly into a small sp offset.
-
-(define_insn ""
- [(set (match_operand:SI 0 "stack_operand" "=m")
- (reg:SI 31))]
- "TARGET_MIPS16"
- "sw\t$31,%0"
- [(set_attr "type" "store")
- (set_attr "mode" "SI")])
-
;; The difference between these two is whether or not ints are allowed
;; in FP registers (off by default, use -mdebugh to enable).
More information about the Gcc-patches
mailing list