* [Buildroot] [PATCH] valgrind: add a patch to fix MIPS R6 by replacing ADDI with ADDIU
@ 2015-11-30 12:25 Vicente Olivert Riera
2015-11-30 16:08 ` Peter Korsgaard
0 siblings, 1 reply; 2+ messages in thread
From: Vicente Olivert Riera @ 2015-11-30 12:25 UTC (permalink / raw)
To: buildroot
The ADDI instruction has been removed for MIPS R6, so valgrind fails to
build for this revision level because it uses that assembly
instruction. Using ADDIU instead fixes the problem.
The patch has been sent upstream:
https://bugs.kde.org/show_bug.cgi?id=356112
Fixes:
http://autobuild.buildroot.net/results/488/488937704b3b6bae8daed7b24da8c740b56f4d84/
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
.../0003-mips-replace-addi-with-addiu.patch | 51 ++++++++++++++++++++++
1 file changed, 51 insertions(+)
create mode 100644 package/valgrind/0003-mips-replace-addi-with-addiu.patch
diff --git a/package/valgrind/0003-mips-replace-addi-with-addiu.patch b/package/valgrind/0003-mips-replace-addi-with-addiu.patch
new file mode 100644
index 0000000..9168dce
--- /dev/null
+++ b/package/valgrind/0003-mips-replace-addi-with-addiu.patch
@@ -0,0 +1,51 @@
+mips: replace addi with addiu
+
+ADDI instruction has been removed in R6 so let's use ADDIU instead.
+
+This patch has been sent upstream:
+
+ https://bugs.kde.org/show_bug.cgi?id=356112
+
+Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
+
+Index: valgrind/coregrind/m_dispatch/dispatch-mips32-linux.S
+===================================================================
+--- valgrind/coregrind/m_dispatch/dispatch-mips32-linux.S (revision 15740)
++++ valgrind/coregrind/m_dispatch/dispatch-mips32-linux.S (working copy)
+@@ -196,7 +196,7 @@
+ addu $13, $13, $14
+
+ lw $12, 0($13) /* t3 = VG_(tt_fast)[hash] :: ULong* */
+- addi $13, $13, 4
++ addiu $13, $13, 4
+ lw $25, 0($13) /* little-endian, so comparing 1st 32bit word */
+ nop
+
+Index: valgrind/coregrind/m_libcsetjmp.c
+===================================================================
+--- valgrind/coregrind/m_libcsetjmp.c (revision 15740)
++++ valgrind/coregrind/m_libcsetjmp.c (working copy)
+@@ -594,7 +594,7 @@
+ /* Checking whether second argument is zero. */
+ " bnez $a1, 1f \n\t"
+ " nop \n\t"
+-" addi $a1, $a1, 1 \n\t" /* We must return 1 if val=0. */
++" addiu $a1, $a1, 1 \n\t" /* We must return 1 if val=0. */
+ "1: \n\t"
+ " move $v0, $a1 \n\t" /* Return value of second argument. */
+ " j $ra \n\t"
+Index: valgrind/coregrind/m_trampoline.S
+===================================================================
+--- valgrind/coregrind/m_trampoline.S (revision 15740)
++++ valgrind/coregrind/m_trampoline.S (working copy)
+@@ -1254,8 +1254,8 @@
+ //la $a0, string
+ j strlen_cond
+ strlen_loop:
+- addi $v0, $v0, 1
+- addi $a0, $a0, 1
++ addiu $v0, $v0, 1
++ addiu $a0, $a0, 1
+ strlen_cond:
+ lbu $t0, ($a0)
+ bne $t0, $zero, strlen_loop
--
2.4.10
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] valgrind: add a patch to fix MIPS R6 by replacing ADDI with ADDIU
2015-11-30 12:25 [Buildroot] [PATCH] valgrind: add a patch to fix MIPS R6 by replacing ADDI with ADDIU Vicente Olivert Riera
@ 2015-11-30 16:08 ` Peter Korsgaard
0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2015-11-30 16:08 UTC (permalink / raw)
To: buildroot
>>>>> "Vicente" == Vicente Olivert Riera <Vincent.Riera@imgtec.com> writes:
> The ADDI instruction has been removed for MIPS R6, so valgrind fails to
> build for this revision level because it uses that assembly
> instruction. Using ADDIU instead fixes the problem.
> The patch has been sent upstream:
> https://bugs.kde.org/show_bug.cgi?id=356112
> Fixes:
> http://autobuild.buildroot.net/results/488/488937704b3b6bae8daed7b24da8c740b56f4d84/
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-30 16:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-30 12:25 [Buildroot] [PATCH] valgrind: add a patch to fix MIPS R6 by replacing ADDI with ADDIU Vicente Olivert Riera
2015-11-30 16:08 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox