aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mn10300
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@cygnus.com>2000-04-26 00:09:52 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2000-04-26 00:09:52 +0000
commitd25ed420a21ee1692ab894f53effeb3a0eac0207 (patch)
tree8cca2db811f9b54c02369de2f0b5d68fbfa581cd /gcc/config/mn10300
parent86cf1cbd5f7e4cf869bb8b02867fd074caef8694 (diff)
downloadgcc-d25ed420a21ee1692ab894f53effeb3a0eac0207.zip
gcc-d25ed420a21ee1692ab894f53effeb3a0eac0207.tar.gz
gcc-d25ed420a21ee1692ab894f53effeb3a0eac0207.tar.bz2
mn10300.h (REG_CLASS_FROM_LETTER): Return EXTENDED_REGS only if TARGET_AM33.
* config/mn10300/mn10300.h (REG_CLASS_FROM_LETTER): Return EXTENDED_REGS only if TARGET_AM33. * config/mn10300/mn10300.md (movsi, addsi): Avoid exposing SP_REGS to register allocation and reloading unless absolutely necessary. (movsi3): Remove special-case of adding non-constants to SP. From-SVN: r33429
Diffstat (limited to 'gcc/config/mn10300')
-rw-r--r--gcc/config/mn10300/mn10300.h4
-rw-r--r--gcc/config/mn10300/mn10300.md23
2 files changed, 8 insertions, 19 deletions
diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h
index bbea7b1..f737155 100644
--- a/gcc/config/mn10300/mn10300.h
+++ b/gcc/config/mn10300/mn10300.h
@@ -287,8 +287,10 @@ enum reg_class {
#define REG_CLASS_FROM_LETTER(C) \
((C) == 'd' ? DATA_REGS : \
(C) == 'a' ? ADDRESS_REGS : \
+ (C) == 'y' ? SP_REGS : \
+ ! TARGET_AM33 ? NO_REGS : \
(C) == 'x' ? EXTENDED_REGS : \
- (C) == 'y' ? SP_REGS : NO_REGS)
+ NO_REGS)
/* Macros to check register numbers against specific register classes. */
diff --git a/gcc/config/mn10300/mn10300.md b/gcc/config/mn10300/mn10300.md
index c2f74e7..17195b4 100644
--- a/gcc/config/mn10300/mn10300.md
+++ b/gcc/config/mn10300/mn10300.md
@@ -296,9 +296,9 @@
(define_insn ""
[(set (match_operand:SI 0 "general_operand"
- "=dx,ax,dx,a,dxm,dxm,axm,axm,dx,dx,ax,ax,axR,y")
+ "=dx,ax,dx,a,dxm,dxm,axm,axm,dx,dx,ax,ax,axR,!*y")
(match_operand:SI 1 "general_operand"
- "0,0,I,I,dx,ax,dx,ax,dixm,aixm,dixm,aixm,xy,axR"))]
+ "0,0,I,I,dx,ax,dx,ax,dixm,aixm,dixm,aixm,!*y,axR"))]
"register_operand (operands[0], SImode)
|| register_operand (operands[1], SImode)"
"*
@@ -744,23 +744,10 @@
(plus:SI (match_operand:SI 1 "register_operand" "")
(match_operand:SI 2 "nonmemory_operand" "")))]
""
- "
-{
- /* We can't add a variable amount directly to the stack pointer;
- so do so via a temporary register. */
- if (operands[0] == stack_pointer_rtx
- && GET_CODE (operands[1]) != CONST_INT
- && GET_CODE (operands[2]) != CONST_INT)
- {
- rtx temp = gen_reg_rtx (SImode);
- emit_move_insn (temp, gen_rtx_PLUS (SImode, operands[1], operands[2]));
- emit_move_insn (operands[0], temp);
- DONE;
- }
-}")
+ "")
(define_insn ""
- [(set (match_operand:SI 0 "register_operand" "=dx,a,x,a,dax,xy,!dax")
+ [(set (match_operand:SI 0 "register_operand" "=dx,a,x,a,dax,!*y,!dax")
(plus:SI (match_operand:SI 1 "register_operand" "%0,0,0,0,0,0,dax")
(match_operand:SI 2 "nonmemory_operand" "J,J,L,L,daxi,i,dax")))]
"TARGET_AM33"
@@ -839,7 +826,7 @@
[(set_attr "cc" "set_zn,none_0hit,set_zn,none_0hit,set_zn,none_0hit,set_zn")])
(define_insn ""
- [(set (match_operand:SI 0 "register_operand" "=dx,a,a,dax,xy,!dax")
+ [(set (match_operand:SI 0 "register_operand" "=dx,a,a,dax,!*y,!dax")
(plus:SI (match_operand:SI 1 "register_operand" "%0,0,0,0,0,dax")
(match_operand:SI 2 "nonmemory_operand" "J,J,L,daxi,i,dax")))]
""