diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1996-06-25 05:20:34 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1996-06-25 05:20:34 +0000 |
commit | 0cce0c62177bd68169ef26e65be395a1e548db03 (patch) | |
tree | 7431ca80d591459dc173b60909a595ccd8e5e45c /gcc/config/h8300 | |
parent | 51a9b77102081e325431a95f09e688436445558d (diff) | |
download | gcc-0cce0c62177bd68169ef26e65be395a1e548db03.tar.gz |
* h8300/h8300.c (function_prologue): Update "monitor" prologues.
(function_epilogue): Similarly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12328 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/h8300')
-rw-r--r-- | gcc/config/h8300/h8300.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 6e6967c0d7e..8ffd84e3175 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -232,7 +232,21 @@ function_prologue (file, size) fprintf (file, ";monitor prologue\n"); interrupt_handler = 1; monitor = 1; - fprintf (file, "\torc\t#128,ccr\n"); + if (TARGET_H8300) + { + fprintf (file, "\tsubs\t#2,sp\n"); + fprintf (file, "\tpush\tr0\n"); + fprintf (file, "\tstc\tccr,r0l\n"); + fprintf (file, "\torc\t#128,ccr\n"); + fprintf (file, "\tmov.b\tr0l,@(4,sp)\n"); + } + else if (TARGET_H8300H) + { + fprintf (file, "\tpush\ter0\n"); + fprintf (file, "\tstc\tccr,r0l\n"); + fprintf (file, "\torc\t#128,ccr\n"); + fprintf (file, "\tmov.b\tr0l,@(4,sp)\n"); + } } if (frame_pointer_needed) @@ -333,6 +347,11 @@ function_epilogue (file, size) dosize (file, "add", fsize); } + /* If this is a monitor function, there is one register still left on + the stack. */ + if (monitor) + fprintf (file, "\t%s\t%s\n", h8_pop_op, h8_reg_names[0]); + if (interrupt_handler) fprintf (file, "\trte\n"); else |