aboutsummaryrefslogtreecommitdiff
path: root/gdb/s390-tdep.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2003-04-18 20:20:21 +0000
committerJim Blandy <jimb@codesourcery.com>2003-04-18 20:20:21 +0000
commit4074e13c6386c4954e451cf018df44bc5d5fe4ba (patch)
treef695091dc28887644c3884595d79fb4c3ed1f62b /gdb/s390-tdep.c
parent97b51f20ac4a97d9978992681df6600c82e71060 (diff)
downloadgdb-4074e13c6386c4954e451cf018df44bc5d5fe4ba.zip
gdb-4074e13c6386c4954e451cf018df44bc5d5fe4ba.tar.gz
gdb-4074e13c6386c4954e451cf018df44bc5d5fe4ba.tar.bz2
* s390-tdep.c (s390_frame_align): New function.
(s390_gdbarch_init): Register it with the gdbarch object.
Diffstat (limited to 'gdb/s390-tdep.c')
-rw-r--r--gdb/s390-tdep.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index e50a46d..415fde7 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1664,6 +1664,15 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
}
+static CORE_ADDR
+s390_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
+{
+ /* Both the 32- and 64-bit ABI's say that the stack pointer should
+ always be aligned on an eight-byte boundary. */
+ return (addr & -8);
+}
+
+
static int
s390_use_struct_convention (int gcc_p, struct type *value_type)
{
@@ -1862,6 +1871,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Parameters for inferior function calls. */
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
+ set_gdbarch_frame_align (gdbarch, s390_frame_align);
set_gdbarch_deprecated_push_arguments (gdbarch, s390_push_arguments);
set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
set_gdbarch_deprecated_push_return_address (gdbarch,