From: miod Date: Thu, 1 Jan 2015 19:43:10 +0000 (+0000) Subject: Inline the .cpsetup pseudo-statement in rcrt0 to avoid saving the "old" gp X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c481a69c703a2df1bdd8732e8a64335781d733d3;p=openbsd Inline the .cpsetup pseudo-statement in rcrt0 to avoid saving the "old" gp value, which we have no use for. ok kettenis@ --- 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" \