From f3b9c89d3a1fa01650e6d88e2a39909a945b066c Mon Sep 17 00:00:00 2001 From: Douglas Leung Date: Wed, 16 Mar 2016 16:59:23 -0700 Subject: [PATCH] Fix bug where t9 is not correct when __memset_chk_fail is called. t9 is used to calculate gp at the start of __memset_chk_fail. Change-Id: Ief5018699e060afa691bfc1d861abd5e463ab80c --- libc/arch-mips/string/memset.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libc/arch-mips/string/memset.S b/libc/arch-mips/string/memset.S index dd94f3b7b..6344af1b1 100644 --- a/libc/arch-mips/string/memset.S +++ b/libc/arch-mips/string/memset.S @@ -208,7 +208,10 @@ LEAF(__memset_chk,0) #else LEAF(__memset_chk) #endif + .set noreorder bgtu a2, a3, __memset_chk_fail + la t9, __memset_chk_fail + .set reorder // Fall through to memset... END(__memset_chk) -- 2.11.0