summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2006-11-21 08:17:01 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2006-11-21 08:17:01 +0000
commitb83135f6bda44480cf3b17b6b96ed224aff90381 (patch)
tree319c119df1f6c901f01c80a1487cf59fbd2c799e
parent5106bfd2a82d71f80176091cb8e5b19d9d7bacf8 (diff)
make this work; todd@ deraadt@ ok
-rw-r--r--usr.sbin/afs/include/config.h4
-rw-r--r--usr.sbin/afs/src/lwp/process.hpux.S90
2 files changed, 82 insertions, 12 deletions
diff --git a/usr.sbin/afs/include/config.h b/usr.sbin/afs/include/config.h
index 28b1ffcc284..08d0701166b 100644
--- a/usr.sbin/afs/include/config.h
+++ b/usr.sbin/afs/include/config.h
@@ -1664,3 +1664,7 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg }
#define realloc(X, Y) isoc_realloc((X), (Y))
#define isoc_realloc(X, Y) ((X) ? realloc((X), (Y)) : malloc(Y))
#endif
+
+#ifdef __hppa__
+#define __hp9000s800
+#endif
diff --git a/usr.sbin/afs/src/lwp/process.hpux.S b/usr.sbin/afs/src/lwp/process.hpux.S
index 9839e84d591..d83df98eb47 100644
--- a/usr.sbin/afs/src/lwp/process.hpux.S
+++ b/usr.sbin/afs/src/lwp/process.hpux.S
@@ -240,26 +240,40 @@ savecontext
; for PA 1.1. (How to deal with this for 800?)
*/
.CALLINFO CALLER,FRAME=0,SAVE_RP,ENTRY_GR=18,ENTRY_FR=21
- /*
- ; The ENTER statement generates register saves and
- ; procedure setup.
- */
- .ENTER
+ .ENTRY
+ STW %r2, -20(%sr0,%r30)
+ stwm %r3, 0x80(%r30)
+ stw %r4, -0x40(%r30)
+ stw %r5, -0x3c(%r30)
+ stw %r6, -0x38(%r30)
+ stw %r7, -0x34(%r30)
+ stw %r8, -0x30(%r30)
+ stw %r9, -0x2c(%r30)
+ stw %r10, -0x28(%r30)
+ stw %r11, -0x24(%r30)
+ stw %r12, -0x20(%r30)
+ stw %r13, -0x1c(%r30)
+ stw %r14, -0x18(%r30)
+ stw %r15, -0x14(%r30)
+ stw %r16, -0x10(%r30)
+ stw %r17, -0x0c(%r30)
+ stw %r18, -0x08(%r30)
LDI 1,%r1 /* Store a (char) 1 in */
- LDW T%PRE_Block(0,%r19),%r31 /* global variable */
- STW %r1,0(0,%r31) /* PRE_Block. */
+ LDW T%PRE_Block(%sr0,%r19),%r31 /* global variable */
+ STW %r1,0(%sr0,%r31) /* PRE_Block. */
COPY %arg0,%r22 /* Copy arg0 (f) to dyncall's input register */
COMIB,= 0,%arg2,L$0001 /* Compare arg2 (newsp) to 0. Execute the */
/* next instruction regardless of value. */
- STW %r30,0(0,%arg1) /* Store the stack pointer in the first */
+ STW %r30,0(%sr0,%arg1)/* Store the stack pointer in the first */
/* element (0th offset) of arg1 (area1). */
COPY %arg2,%r30 /* Move arg2 (newsp) into the stack ptr. */
L$0001
+ ldo 64(%r30), %r30
.CALL
BL $$dyncall,%r31 /* Dynamic call using pointer in r22. */
COPY %r31,%r2
@@ -280,7 +294,25 @@ returnto
/* No ENTRY is used since this is a magic routine. */
LDWS 0(0,%arg0),%r30 /* Load the stack pointer from area2 */
+ ldw -0x08(%r30), %r18
+ ldw -0x0c(%r30), %r17
+ ldw -0x10(%r30), %r16
+ ldw -0x14(%r30), %r15
+ ldw -0x18(%r30), %r14
+ ldw -0x1c(%r30), %r13
+ ldw -0x20(%r30), %r12
+ ldw -0x24(%r30), %r11
+ ldw -0x28(%r30), %r10
+ ldw -0x2c(%r30), %r9
+ ldw -0x30(%r30), %r8
+ ldw -0x34(%r30), %r7
+ ldw -0x38(%r30), %r6
+ ldw -0x3c(%r30), %r5
+ ldw -0x40(%r30), %r4
+ ldw,mb -0x80(%r30), %r3
LDW T%PRE_Block(0,%r19),%r31 /* set PRE_Block = 0; */
+ LDW -20(%sr0,%r30), %r2
+ BV %r0(%r2)
STW %r0,0(0,%r31)
.LEAVE
.PROCEND
@@ -316,9 +348,24 @@ savecontext
; for PA 1.1. (How to deal with this for 800?)
*/
.CALLINFO CALLER,FRAME=0,SAVE_RP,ENTRY_GR=18,ENTRY_FR=21
- /* The ENTER statement generates register saves and */
- /* procedure setup. */
.ENTRY
+ STW %r2, -20(%sr0,%r30)
+ stwm %r3, 0x80(%r30)
+ stw %r4, -0x40(%r30)
+ stw %r5, -0x3c(%r30)
+ stw %r6, -0x38(%r30)
+ stw %r7, -0x34(%r30)
+ stw %r8, -0x30(%r30)
+ stw %r9, -0x2c(%r30)
+ stw %r10, -0x28(%r30)
+ stw %r11, -0x24(%r30)
+ stw %r12, -0x20(%r30)
+ stw %r13, -0x1c(%r30)
+ stw %r14, -0x18(%r30)
+ stw %r15, -0x14(%r30)
+ stw %r16, -0x10(%r30)
+ stw %r17, -0x0c(%r30)
+ stw %r18, -0x08(%r30)
LDI 1,%r31 /* Store a (char) 1 in */
ADDIL L%PRE_Block-$global$,%r27 /* global variable */
@@ -333,6 +380,7 @@ savecontext
COPY %r24,%r30 /* Move arg2 (newsp) into the stack ptr. */
L$0001
+ ldo 64(%r30), %r30
.CALL
BL $$dyncall,%r31 /* Dynamic call using pointer in r22. */
COPY %r31,%r2
@@ -354,10 +402,28 @@ returnto
.PROC
.CALLINFO CALLER,FRAME=0,SAVE_RP,ENTRY_GR=18,ENTRY_FR=21
.ENTRY
+ LDWS 0(0,%r26),%r30 /* Load the stack pointer from area2 */
ADDIL L%PRE_Block-$global$,%r27 /* PRE_Block = 0 */
- STW %r0,R%PRE_Block-$global$(0,%r1)
- LDWS 0(0,%r26),%r30 /* Load the stack pointer from area2 */
+ ldw -0x08(%r30), %r18
+ ldw -0x0c(%r30), %r17
+ ldw -0x10(%r30), %r16
+ ldw -0x14(%r30), %r15
+ ldw -0x18(%r30), %r14
+ ldw -0x1c(%r30), %r13
+ ldw -0x20(%r30), %r12
+ ldw -0x24(%r30), %r11
+ ldw -0x28(%r30), %r10
+ ldw -0x2c(%r30), %r9
+ ldw -0x30(%r30), %r8
+ ldw -0x34(%r30), %r7
+ ldw -0x38(%r30), %r6
+ ldw -0x3c(%r30), %r5
+ ldw -0x40(%r30), %r4
+ ldw,mb -0x80(%r30), %r3
+ LDW -20(%sr0,%r30), %r2
+ BV %r0(%r2)
+ STW %r0,R%PRE_Block-$global$(0,%r1)
.EXIT
.PROCEND