summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-12-11 05:10:18 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-12-11 05:10:18 +0000
commitaeca18e7af8fa0df6d9852de2c364a89ed4008d3 (patch)
tree853013cb2c7144ff3d4abb469f0531bf1ddd4930 /sys/arch
parent48d6b0594cc146182f3898897fa986ef3a45be90 (diff)
More changes to avoid truncating 64 bit pointers to 32 bits and sign-extending
them; allows userland with stack beyond 2GB to run.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mips64/include/asm.h16
-rw-r--r--sys/arch/mips64/include/profile.h28
2 files changed, 22 insertions, 22 deletions
diff --git a/sys/arch/mips64/include/asm.h b/sys/arch/mips64/include/asm.h
index 778a0635fe2..e44fa221c95 100644
--- a/sys/arch/mips64/include/asm.h
+++ b/sys/arch/mips64/include/asm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm.h,v 1.8 2009/09/30 06:22:00 syuu Exp $ */
+/* $OpenBSD: asm.h,v 1.9 2009/12/11 05:10:17 miod Exp $ */
/*
* Copyright (c) 2001-2002 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -185,17 +185,17 @@
*/
#if defined(XGPROF) || defined(XPROF)
#define MCOUNT \
- PTR_SUBU sp, sp, 32; \
+ PTR_SUBU sp, sp, 64; \
SAVE_GP(16); \
- sw ra, 28(sp); \
- sw gp, 24(sp); \
+ sd ra, 56(sp); \
+ sd gp, 48(sp); \
.set noat; \
.set noreorder; \
move AT, ra; \
jal _mcount; \
- PTR_SUBU sp, sp, 8; \
- lw ra, 28(sp); \
- PTR_ADDU sp, sp, 32; \
+ PTR_SUBU sp, sp, 16; \
+ ld ra, 56(sp); \
+ PTR_ADDU sp, sp, 64; \
.set reorder; \
.set at;
#else
@@ -279,7 +279,7 @@ x: ; \
MSG(msg)
#define PRINTF(msg) \
- la a0, 9f; \
+ LA a0, 9f; \
jal printf; \
nop ; \
MSG(msg)
diff --git a/sys/arch/mips64/include/profile.h b/sys/arch/mips64/include/profile.h
index 7f045a8a091..e5dce1ed317 100644
--- a/sys/arch/mips64/include/profile.h
+++ b/sys/arch/mips64/include/profile.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: profile.h,v 1.2 2005/08/07 07:29:44 miod Exp $ */
+/* $OpenBSD: profile.h,v 1.3 2009/12/11 05:10:17 miod Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -48,22 +48,22 @@
".set noat;" \
".cpload $25;" \
".cprestore 4;" \
- "sw $4,8($29);" \
- "sw $5,12($29);" \
- "sw $6,16($29);" \
- "sw $7,20($29);" \
- "sw $1,0($29);" \
- "sw $31,4($29);" \
+ "sd $4,16($29);" \
+ "sd $5,24($29);" \
+ "sd $6,32($29);" \
+ "sd $7,40($29);" \
+ "sd $1,0($29);" \
+ "sd $31,8($29);" \
"move $5,$31;" \
"jal ___mcount;" \
"move $4,$1;" \
- "lw $4,8($29);" \
- "lw $5,12($29);" \
- "lw $6,16($29);" \
- "lw $7,20($29);" \
- "lw $31,4($29);" \
- "lw $1,0($29);" \
- "addu $29,$29,8;" \
+ "ld $4,16($29);" \
+ "ld $5,24($29);" \
+ "ld $6,32($29);" \
+ "ld $7,40($29);" \
+ "ld $31,8($29);" \
+ "ld $1,0($29);" \
+ "daddu $29,$29,16;" \
"j $31;" \
"move $31,$1;" \
".set reorder;" \