From c481a69c703a2df1bdd8732e8a64335781d733d3 Mon Sep 17 00:00:00 2001 From: miod Date: Thu, 1 Jan 2015 19:43:10 +0000 Subject: [PATCH] Inline the .cpsetup pseudo-statement in rcrt0 to avoid saving the "old" gp value, which we have no use for. ok kettenis@ --- lib/csu/mips64/md_init.h | 6 ++++-- 1 file 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" \ -- 2.20.1