summaryrefslogtreecommitdiff
path: root/gcc/config/mn10300
diff options
context:
space:
mode:
authoraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2000-10-24 22:45:46 +0000
committeraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2000-10-24 22:45:46 +0000
commit54896727dcb2adfcbcbd02221376bf0390b029f1 (patch)
tree4dad84921c04aa6dd8cf5ea029dbec728de8d8a7 /gcc/config/mn10300
parentc5c15f771283e57ab2b4e16ee91fc515f70682be (diff)
downloadgcc-54896727dcb2adfcbcbd02221376bf0390b029f1.tar.gz
treat pseudos just like memory
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37038 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mn10300')
-rw-r--r--gcc/config/mn10300/mn10300.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h
index 53c51ca82e9..2de94f41101 100644
--- a/gcc/config/mn10300/mn10300.h
+++ b/gcc/config/mn10300/mn10300.h
@@ -381,11 +381,16 @@ enum reg_class {
In general this is just CLASS; but on some machines
in some cases it is preferable to use a more restrictive class. */
-#define PREFERRED_RELOAD_CLASS(X,CLASS) \
- ((X) == stack_pointer_rtx && (CLASS) != SP_REGS \
- ? ADDRESS_OR_EXTENDED_REGS \
- : (GET_CODE (X) == MEM \
- ? LIMIT_RELOAD_CLASS (GET_MODE (X), CLASS) \
+#define PREFERRED_RELOAD_CLASS(X,CLASS) \
+ ((X) == stack_pointer_rtx && (CLASS) != SP_REGS \
+ ? ADDRESS_OR_EXTENDED_REGS \
+ : (GET_CODE (X) == MEM \
+ || (GET_CODE (X) == REG \
+ && REGNO (X) >= FIRST_PSEUDO_REGISTER) \
+ || (GET_CODE (X) == SUBREG \
+ && GET_CODE (SUBREG_REG (X)) == REG \
+ && REGNO (SUBREG_REG (X)) >= FIRST_PSEUDO_REGISTER) \
+ ? LIMIT_RELOAD_CLASS (GET_MODE (X), CLASS) \
: (CLASS)))
#define PREFERRED_OUTPUT_RELOAD_CLASS(X,CLASS) \