Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/csu/mips Enlarge the stack frame to 16 bytes, and store ...
details: https://anonhg.NetBSD.org/src/rev/f63375a1d990
branches: trunk
changeset: 513870:f63375a1d990
user: simonb <simonb%NetBSD.org@localhost>
date: Thu Aug 16 03:44:46 2001 +0000
description:
Enlarge the stack frame to 16 bytes, and store the return address 8
bytes in instead of at the start, to leave room for a .cpload to store
the gp at offset 0 in the frame. Allow 8 bytes for each (for mips64
one day...).
.cpload overwrite problems noted by Michael Hitch.
diffstat:
lib/csu/mips/dot_init.h | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (43 lines):
diff -r d02f20a47c79 -r f63375a1d990 lib/csu/mips/dot_init.h
--- a/lib/csu/mips/dot_init.h Thu Aug 16 01:47:45 2001 +0000
+++ b/lib/csu/mips/dot_init.h Thu Aug 16 03:44:46 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dot_init.h,v 1.1 2001/07/17 15:20:23 simonb Exp $ */
+/* $NetBSD: dot_init.h,v 1.2 2001/08/16 03:44:46 simonb Exp $ */
/*-
* Copyright (c) 2001 Ross Harvey
@@ -50,26 +50,26 @@
#define ra "$31"
/*
- * XXX:
- * stack frame is only 8 bytes long (big enough to store the caller's RA).
- * Does it need to be 32 bytes to keep gdb happy?
+ * The stack frame is 16 bytes long; big enough to store the GP saved
+ * by .cpload (at offset 0) and the caller's RA (at offset 8),
+ * allowing for 64bit addresses.
*/
#define MD_SECTION_PROLOGUE(sect, entry_pt) \
__asm ( \
".section "#sect",\"ax\",@progbits \n"\
#entry_pt": \n"\
- " subu $sp,$sp,8 \n"\
- " sw "ra",0($sp) \n"\
+ " subu $sp,$sp,16 \n"\
+ " sw "ra",8($sp) \n"\
" /* fall thru */ \n"\
".previous")
#define MD_SECTION_EPILOGUE(sect) \
__asm ( \
".section "#sect",\"ax\",@progbits \n"\
- " lw "ra",0($sp) \n"\
+ " lw "ra",8($sp) \n"\
" .set noreorder \n"\
" j "ra" \n"\
- " addu $sp,$sp,8 \n"\
+ " addu $sp,$sp,16 \n"\
" .set reorder \n"\
".previous")
Home |
Main Index |
Thread Index |
Old Index