diff options
author | Richard Sandiford <richard@codesourcery.com> | 2006-12-12 11:08:16 +0000 |
---|---|---|
committer | Richard Sandiford <richard@codesourcery.com> | 2006-12-12 11:08:16 +0000 |
commit | 8b65c2778f01fd75f9e9922d8117face45c96327 (patch) | |
tree | bcf0f1af51d86672dc055017ccaaeea1202695c0 | |
parent | 1831398e059de71e7f75c724a4630076ada0e48b (diff) |
gcc/
* config/m68k/m68k.h (EPILOGUE_USES): Restrict interrupt check
to reload_completed.
gcc/testsuite/
* gcc.dg/torture/m68k-interrupt-1.c: New file.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl/sourcerygxx-4_1@119772 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | ChangeLog.csl | 9 | ||||
-rw-r--r-- | gcc/config/m68k/m68k.h | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/m68k-interrupt-1.c | 22 |
3 files changed, 32 insertions, 1 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl index f87970a08bf..004492e558d 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,12 @@ +2006-12-12 Richard Sandiford <richard@codesourcery.com> + + gcc/ + * config/m68k/m68k.h (EPILOGUE_USES): Restrict interrupt check + to reload_completed. + + gcc/testsuite/ + * gcc.dg/torture/m68k-interrupt-1.c: New file. + 2006-12-11 Carlos O'Donell <carlos@codesourcery.com> Backport from mainline. diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h index eda9f384b3f..306024fc990 100644 --- a/gcc/config/m68k/m68k.h +++ b/gcc/config/m68k/m68k.h @@ -1005,7 +1005,7 @@ do { if (cc_prev_status.flags & CC_IN_68881) \ /* All registers are live on exit from an interrupt routine. */ #define EPILOGUE_USES(REGNO) \ - m68k_interrupt_function_p (current_function_decl) + (reload_completed && m68k_interrupt_function_p (current_function_decl)) /* Describe how we implement __builtin_eh_return. */ #define EH_RETURN_DATA_REGNO(N) \ diff --git a/gcc/testsuite/gcc.dg/torture/m68k-interrupt-1.c b/gcc/testsuite/gcc.dg/torture/m68k-interrupt-1.c new file mode 100644 index 00000000000..fc275644bfb --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/m68k-interrupt-1.c @@ -0,0 +1,22 @@ +/* { dg-do compile { target m68k-*-* } } */ +int x; +volatile unsigned int y; + +#define REPEAT10(X, Y) \ + X(Y##0); X(Y##1); X(Y##2); X(Y##3); X(Y##4); \ + X(Y##5); X(Y##6); X(Y##7); X(Y##8); X(Y##9) + +#define REPEAT30(X) REPEAT10 (X, 0); REPEAT10 (X, 1); REPEAT10 (X, 2) +#define IN(X) unsigned int x##X = y +#define OUT(X) y = x##X + +void __attribute__ ((interrupt_handler)) f1 (void) +{ + x = y + 11; +} + +void __attribute__ ((interrupt_handler)) f2 (void) +{ + REPEAT30 (IN); + REPEAT30 (OUT); +} |