diff options
author | Michael Snyder <msnyder@vmware.com> | 2003-08-01 19:52:49 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2003-08-01 19:52:49 +0000 |
commit | 19f5934377cdd949da85bea862750e48f50aafde (patch) | |
tree | e4758d7c061b8c0467937530ad78b16c9e9d174c /gdb/sh-tdep.c | |
parent | 91fb2a9d47c50cbd56e24b24c86f47972edc2be5 (diff) | |
download | gdb-19f5934377cdd949da85bea862750e48f50aafde.zip gdb-19f5934377cdd949da85bea862750e48f50aafde.tar.gz gdb-19f5934377cdd949da85bea862750e48f50aafde.tar.bz2 |
2003-08-01 Michael Snyder <msnyder@redhat.com>
* sh-tdep.c (sh_frame_align): New gdbarch method.
(sh_gdbarch_init): Set up frame_align method.
Diffstat (limited to 'gdb/sh-tdep.c')
-rw-r--r-- | gdb/sh-tdep.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index 36fa9d0..dc3e992 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -2028,6 +2028,12 @@ sh64_pop_frame (void) flush_cached_frames (); } +static CORE_ADDR +sh_frame_align (struct gdbarch *ignore, CORE_ADDR sp) +{ + return sp & ~3; +} + /* Function: push_arguments Setup the function arguments for calling a function in the inferior. @@ -2090,7 +2096,7 @@ sh_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); /* first force sp to a 4-byte alignment */ - sp = sp & ~3; + sp = sh_frame_align (gdbarch, sp); /* The "struct return pointer" pseudo-argument has its own dedicated register */ @@ -4356,6 +4362,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_pop_frame (gdbarch, sh_pop_frame); set_gdbarch_deprecated_frame_saved_pc (gdbarch, sh_frame_saved_pc); set_gdbarch_deprecated_saved_pc_after_call (gdbarch, sh_saved_pc_after_call); + set_gdbarch_frame_align (gdbarch, sh_frame_align); switch (info.bfd_arch_info->mach) { |