Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sh5/include Cleanup the frame link/unlink macroes.
details: https://anonhg.NetBSD.org/src/rev/b52b9a80dee5
branches: trunk
changeset: 533946:b52b9a80dee5
user: scw <scw%NetBSD.org@localhost>
date: Thu Jul 11 14:09:34 2002 +0000
description:
Cleanup the frame link/unlink macroes.
diffstat:
sys/arch/sh5/include/asm.h | 42 +++++++++++++++++++-----------------------
1 files changed, 19 insertions(+), 23 deletions(-)
diffs (67 lines):
diff -r 1fbfb8b0b57b -r b52b9a80dee5 sys/arch/sh5/include/asm.h
--- a/sys/arch/sh5/include/asm.h Thu Jul 11 14:08:45 2002 +0000
+++ b/sys/arch/sh5/include/asm.h Thu Jul 11 14:09:34 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.3 2002/07/10 11:36:23 scw Exp $ */
+/* $NetBSD: asm.h,v 1.4 2002/07/11 14:09:34 scw Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -247,19 +247,17 @@
/*
* Set up/Clear down a C-like stack frame on entry/exit to an assembly function
*/
-#define LINK_FRAME(sz) \
- addi.l r15, -8, r15 ;\
- st.l r15, 4, r18 ;\
- st.l r15, 0, r14 ;\
- addi.l r15, -(sz), r15 ;\
+#define LINK_FRAME(sz) \
+ addi.l r15, -(8 + (sz)), r15 ;\
+ st.l r15, (sz), r14 ;\
+ st.l r15, (sz) + 4, r18 ;\
add.l r15, r63, r14
-#define UNLINK_FRAME(sz) \
- addi.l r14, sz, r14 ;\
- add.l r14, r63, r15 ;\
- ld.l r15, 0, r14 ;\
- ld.l r15, 4, r18 ;\
- addi.l r15, 8, r15
+#define UNLINK_FRAME(sz) \
+ add.l r14, r63, r15 ;\
+ ld.l r15, (sz), r14 ;\
+ ld.l r15, (sz) + 4, r18 ;\
+ addi.l r15, (sz) + 8, r15
#else
@@ -271,19 +269,17 @@
#define LEAF(sym, reg) LDC64(sym, reg)
#define LDPTR ld.q
#define STPTR st.q
-#define LINK_FRAME(sz) \
- addi r15, -16, r15 ;\
- st.q r15, 8, r18 ;\
- st.q r15, 0, r14 ;\
- addi r15, -(sz), r15 ;\
+#define LINK_FRAME(sz) \
+ addi r15, -(16 + (sz)), r15 ;\
+ st.q r15, (sz), r14 ;\
+ st.q r15, (sz) + 8, r18 ;\
add r15, r63, r14
-#define UNLINK_FRAME(sz) \
- addi r14, sz, r14 ;\
- add r14, r63, r15 ;\
- ld.q r15, 0, r14 ;\
- ld.q r15, 8, r18 ;\
- addi r15, 16, r15
+#define UNLINK_FRAME(sz) \
+ add r14, r63, r15 ;\
+ ld.q r15, (sz), r14 ;\
+ ld.q r15, (sz) + 8, r18 ;\
+ addi r15, (sz) + 16, r15
#endif
Home |
Main Index |
Thread Index |
Old Index