|
From: Petar J. <pe...@so...> - 2017-09-15 16:34:25
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=211b0c303afc0dd0222ff8c6f73f1ab347120af2 commit 211b0c303afc0dd0222ff8c6f73f1ab347120af2 Author: Petar Jovanovic <mip...@gm...> Date: Fri Sep 15 16:04:18 2017 +0200 mips: add clearing $ra to CLEAR_CALLER_SAVED_REGS macro Return address register belongs to caller saved registers, and compiler can use it to store temporary values. Clear it. Diff: --- memcheck/tests/leak.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/memcheck/tests/leak.h b/memcheck/tests/leak.h index 7809ace..a1f93e8 100644 --- a/memcheck/tests/leak.h +++ b/memcheck/tests/leak.h @@ -82,10 +82,11 @@ "move $15, $0 \n\t" /* t7 = 0 */ \ "move $24, $0 \n\t" /* t8 = 0 */ \ "move $25, $0 \n\t" /* t9 = 0 */ \ + "move $31, $0 \n\t" /* ra = 0 */ \ ".set pop \n\t" \ : : : "$1", "$2", "$3", "$4", "$5", "$6", "$7", \ "$8", "$9", "$10", "$11", "$12", "$13", \ - "$14", "$15", "$24", "$25"); \ + "$14", "$15", "$24", "$25", "$31"); \ } while (0) #elif (__mips == 64) #define CLEAR_CALLER_SAVED_REGS \ @@ -109,10 +110,11 @@ "move $15, $0 \n\t" /* t3 = 0 */ \ "move $24, $0 \n\t" /* t8 = 0 */ \ "move $25, $0 \n\t" /* t9 = 0 */ \ + "move $31, $0 \n\t" /* ra = 0 */ \ ".set pop \n\t" \ : : : "$1", "$2", "$3", "$4", "$5", "$6", "$7", \ "$8", "$9", "$10", "$11", "$12", "$13", \ - "$14", "$15", "$24", "$25"); \ + "$14", "$15", "$24", "$25", "$31"); \ } while (0) #else #define CLEAR_CALLER_SAVED_REGS /*nothing*/ |