+2010-10-01 Joel Brobecker <brobecker@adacore.com>
+
+ * sparc-tdep.c (sparc32_frame_align): New function.
+ (sparc32_gdbarch_init): Set the frame_align gdbarch method.
+ * sparc64-tdep.c (sparc64_frame_align): New function.
+ (sparc64_gdbarch_init): Set the frame_align gdbarch method.
+
2010-09-30 H.J. Lu <hongjiu.lu@intel.com>
* defs.h (MAX_REGISTER_SIZE): Set to 64.
}
\f
+static CORE_ADDR
+sparc32_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
+{
+ /* The ABI requires double-word alignment. */
+ return address & ~0x7;
+}
+
static CORE_ADDR
sparc32_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
CORE_ADDR funcaddr,
set_gdbarch_fp0_regnum (gdbarch, SPARC_F0_REGNUM); /* %f0 */
/* Call dummy code. */
+ set_gdbarch_frame_align (gdbarch, sparc32_frame_align);
set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
set_gdbarch_push_dummy_code (gdbarch, sparc32_push_dummy_code);
set_gdbarch_push_dummy_call (gdbarch, sparc32_push_dummy_call);
return sp;
}
+static CORE_ADDR
+sparc64_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
+{
+ /* The ABI requires 16-byte alignment. */
+ return address & ~0xf;
+}
+
static CORE_ADDR
sparc64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
set_gdbarch_pc_regnum (gdbarch, SPARC64_PC_REGNUM); /* %pc */
/* Call dummy code. */
+ set_gdbarch_frame_align (gdbarch, sparc64_frame_align);
set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
set_gdbarch_push_dummy_code (gdbarch, NULL);
set_gdbarch_push_dummy_call (gdbarch, sparc64_push_dummy_call);