From 5ea140af03c4945ff4b0da102cb2c37183f3e25d Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 23 Dec 2014 16:27:18 +0000 Subject: [PATCH] do not expose "ra" to cpp because it muddles up the .c code above. instead handle it internally as $ra solution from kettenis, ok guenther --- lib/csu/mips64/md_init.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/csu/mips64/md_init.h b/lib/csu/mips64/md_init.h index d57144bc878..2bc75ae7914 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.6 2014/02/22 18:10:39 miod Exp $ */ +/* $OpenBSD: md_init.h,v 1.7 2014/12/23 16:27:18 deraadt Exp $ */ /*- * Copyright (c) 2001 Ross Harvey @@ -34,8 +34,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#define ra "$31" - /* * Allocate 32 bytes for the stack frame. Store GP at SP+16 (since * this is where code generated by the compiler for fallthru processing @@ -50,11 +48,11 @@ " .set reorder \n" \ " dsubu $sp,$sp,32 \n" \ " .cpsetup $25, 16, "#entry_pt" \n" \ - " sd "ra",24($sp) \n" + " sd $ra ,24($sp) \n" #else #define MD_FUNCTION_PROLOGUE(entry_pt) \ " dsubu $sp,$sp,32 \n" \ - " sd "ra",24($sp) \n" + " sd $ra ,24($sp) \n" #endif @@ -73,11 +71,11 @@ #define MD_SECTION_EPILOGUE(sect) \ __asm ( \ ".section "#sect",\"ax\",@progbits \n" \ - " ld "ra",24($sp) \n" \ + " ld $ra ,24($sp) \n" \ " # next should have been a .cpreturn \n" \ " ld $gp,16($sp) \n" \ " .set noreorder \n" \ - " j "ra" \n" \ + " j $ra \n" \ " daddu $sp,$sp,32 \n" \ " .set reorder \n" \ ".previous") -- 2.20.1