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 \