diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2006-06-09 12:12:03 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2006-06-09 12:12:03 +0000 |
commit | fdadd5333c3878eb001446d4bba21c11a7bfba05 (patch) | |
tree | 035b88ad1023105dd0789cb7c21b64f342c2d4f0 | |
parent | bacb7b1a211c489f3b654286edefd00f5bb453b7 (diff) | |
download | fsf-binutils-gdb-fdadd5333c3878eb001446d4bba21c11a7bfba05.zip fsf-binutils-gdb-fdadd5333c3878eb001446d4bba21c11a7bfba05.tar.gz fsf-binutils-gdb-fdadd5333c3878eb001446d4bba21c11a7bfba05.tar.bz2 |
gdb/
* m68k-tdep.c (m68k_frame_align): New.
(m68k_push_dummy_call): Don't align here.
(m68k_gdbarch_init): Set frame_align here.
-rw-r--r-- | ChangeLog.csl | 7 | ||||
-rw-r--r-- | gdb/m68k-tdep.c | 14 |
2 files changed, 18 insertions, 3 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl index 56983a3..5e41d67 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,10 @@ +2006-06-09 Nathan Sidwell <nathan@codesourcery.com> + + gdb/ + * m68k-tdep.c (m68k_frame_align): New. + (m68k_push_dummy_call): Don't align here. + (m68k_gdbarch_init): Set frame_align here. + 2006-06-08 Nathan Sidwell <nathan@codesourcery.com> * gdb/remote.c (remote_open_1): Do preopen tasks before diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index 1a4493f..4bc7e86 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -485,6 +485,16 @@ m68k_svr4_return_value (struct gdbarch *gdbarch, struct type *type, } +/* Always align the frame to a 4-byte boundary. This is required on + some platforms and harmless on the rest. */ + +static CORE_ADDR +m68k_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp) +{ + /* Align the stack to four bytes. */ + return sp & ~3; +} + static CORE_ADDR m68k_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, @@ -495,9 +505,6 @@ m68k_push_dummy_call (struct gdbarch *gdbarch, struct value *function, gdb_byte buf[4]; int i; - /* Align the stack down to 4 bytes. Needed for coldfire. */ - sp &= ~3; - /* Push arguments in reverse order. */ for (i = nargs - 1; i >= 0; i--) { @@ -1249,6 +1256,7 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Stack grows down. */ set_gdbarch_inner_than (gdbarch, core_addr_lessthan); + set_gdbarch_frame_align (gdbarch, m68k_frame_align); set_gdbarch_believe_pcc_promotion (gdbarch, 1); set_gdbarch_decr_pc_after_break (gdbarch, 2); |