summaryrefslogtreecommitdiff
path: root/gcc/config/mn10300
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-26 00:09:52 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-26 00:09:52 +0000
commit6e6a06ca4b3803a7443541cb80d0b788df1fed94 (patch)
tree8cca2db811f9b54c02369de2f0b5d68fbfa581cd /gcc/config/mn10300
parent3c014a930187ab65de7a53d280de8f465d4aca7f (diff)
downloadgcc-6e6a06ca4b3803a7443541cb80d0b788df1fed94.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33429 138bc75d-0d04-0410-961f-82ee72b054a4
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 bbea7b10146..f7371550ab9 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 c2f74e7c5d1..17195b4c203 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")))]
""