From a7fef47884e8198809c9106c0c06a138db6a6a6d Mon Sep 17 00:00:00 2001 From: Graham Stott Date: Mon, 7 Aug 2000 11:26:59 +0000 Subject: [PATCH] * mn10300.h (PREFERRED_RELOAD_CLASS): Limit memory reloads. From-SVN: r35550 --- gcc/ChangeLog | 4 ++++ gcc/config/mn10300/mn10300.h | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a25c60c2817..44275901e0a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2000-08-07 Graham Stott + + * mn10300.h (PREFERRED_RELOAD_CLASS): Limit memory reloads. + 2000-08-07 Alexandre Oliva * sh.h (EXTRA_CONSTRAINT_Q): Adjust to GNU Coding Standards. diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h index 2e20ee1f55b..78c59028bdd 100644 --- a/gcc/config/mn10300/mn10300.h +++ b/gcc/config/mn10300/mn10300.h @@ -379,9 +379,12 @@ 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 : 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) \ + : (CLASS))) #define PREFERRED_OUTPUT_RELOAD_CLASS(X,CLASS) \ (X == stack_pointer_rtx && CLASS != SP_REGS \