diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2015-01-01 19:43:11 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2015-01-01 19:43:11 +0000 |
commit | 51e553bd0578523b79e10a6f95bede1af44cff93 (patch) | |
tree | f90b91dd6fc32fca6ee13bf811f1502be5e24645 /lib | |
parent | 958d14f34656fc39912878583289a32f320736ff (diff) |
Inline the .cpsetup pseudo-statement in rcrt0 to avoid saving the "old" gp
value, which we have no use for. ok kettenis@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/csu/mips64/md_init.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/csu/mips64/md_init.h b/lib/csu/mips64/md_init.h index 291654966a4..51adb989adc 100644 --- a/lib/csu/mips64/md_init.h +++ b/lib/csu/mips64/md_init.h @@ -1,4 +1,4 @@ -/* $OpenBSD: md_init.h,v 1.8 2014/12/27 20:33:47 kettenis Exp $ */ +/* $OpenBSD: md_init.h,v 1.9 2015/01/01 19:43:10 miod Exp $ */ /*- * Copyright (c) 2001 Ross Harvey @@ -114,7 +114,9 @@ " .type __start, @function \n" \ "__start: \n" \ " dsubu $sp, $sp, 160 \n" \ - " .cpsetup $t9, 144, __start \n" \ + " lui $gp, %hi(%neg(%gp_rel(__start))) \n" \ + " addiu $gp, $gp, %lo(%neg(%gp_rel(__start))) \n" \ + " daddu $gp, $gp, $t9 \n" \ " dla $s1, 1f \n" \ " bgezal $zero, 1f \n" \ "1: \n" \ |