diff mbox

[PULL,00/14] tcg-next patch queue

Message ID e04d5021-f02a-7de5-6aba-52aca6774407@twiddle.net (mailing list archive)
State New, archived
Headers show

Commit Message

Richard Henderson July 19, 2017, 9:36 p.m. UTC
On 07/19/2017 10:33 AM, Philippe Mathieu-Daudé wrote:
> On 07/19/2017 04:45 PM, Peter Maydell wrote:
>> The sparc-linux-user test fails:
>>
>> /home/petmay01/linaro/qemu-for-merges/build/all-linux-static/sparc-linux-user/qemu-sparc 
>>
>> -L ./gnemul/qemu-sparc sparc/ls -l dummyfile
>> Inconsistency detected by ld.so: rtld.c: 858: dl_main: Assertion
>> `_dl_rtld_map.l_prev->l_next == _dl_rtld_map.l_next' failed!
>> Makefile:6: recipe for target 'test' failed
>>
>> A valgrind run produces a lot of noise, but
>> this bit looks suspicious:
>>
>> ==14436==
>> ==14436== Conditional jump or move depends on uninitialised value(s)
>> ==14436==    at 0x60003F7C: tcg_out_qemu_st_direct (tcg-target.inc.c:1733)
>> ==14436==    by 0x60004295: tcg_out_qemu_st (tcg-target.inc.c:1856)
>> ==14436==    by 0x60004F0C: tcg_out_op (tcg-target.inc.c:2140)
>> ==14436==    by 0x6000B0FF: tcg_reg_alloc_op (tcg.c:2360)
>> ==14436==    by 0x6000BCED: tcg_gen_code (tcg.c:2679)
>> ==14436==    by 0x600387B7: tb_gen_code (translate-all.c:1311)
>> ==14436==    by 0x6003637B: tb_find (cpu-exec.c:367)
>> ==14436==    by 0x60036A7C: cpu_exec (cpu-exec.c:675)
>> ==14436==    by 0x60039DA1: cpu_loop (main.c:1088)
>> ==14436==    by 0x6003B7AF: main (main.c:4860)
>> ==14436==
>> ==14436== Invalid write of size 4
>> ==14436==    at 0x605114FA: ???
>> ==14436==    by 0x6011ADDF: ??? (in
>> /home/petmay01/linaro/qemu-for-merges/build/all-linux-static/sparc-linux-user/qemu-sparc) 
>>
>> ==14436==    by 0x6253464F: ???
>> ==14436==    by 0x6022852F: ??? (in
>> /home/petmay01/linaro/qemu-for-merges/build/all-linux-static/sparc-linux-user/qemu-sparc) 
>>
>> ==14436==    by 0x6022818C: ??? (in
>> /home/petmay01/linaro/qemu-for-merges/build/all-linux-static/sparc-linux-user/qemu-sparc) 
>>
>> ==14436==    by 0x6022852F: ??? (in
>> /home/petmay01/linaro/qemu-for-merges/build/all-linux-static/sparc-linux-user/qemu-sparc) 
>>
>> ==14436==    by 0x416FFFFFFFF: ???
>> ==14436==    by 0x60227F1F: ??? (in
>> /home/petmay01/linaro/qemu-for-merges/build/all-linux-static/sparc-linux-user/qemu-sparc) 
>>
>> ==14436==  Address 0x59d1c7d0 is not stack'd, malloc'd or (recently) free'd
>> ==14436==
>>
>> Reverting "target/sparc: optimize gen_op_mulscc() using deposit op"
>> fixed this, so I think that's probably the culprit.
> 
> Thank you for taking time with valgrind, I'll verify sparc/tcg opcode used.

A simple typo, Phil,



I'll respin.


r~
diff mbox

Patch

diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index 56ef73c794..3bde47be83 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -633,7 +633,7 @@  static inline void gen_op_mulscc
      // b2 = T0 & 1;
      // env->y = (b2 << 31) | (env->y >> 1);
      tcg_gen_extract_tl(t0, cpu_y, 1, 31);
-    tcg_gen_deposit_tl(cpu_y, cpu_y, cpu_cc_src, 31, 1);
+    tcg_gen_deposit_tl(cpu_y, t0, cpu_cc_src, 31, 1);

      // b1 = N ^ V;
      gen_mov_reg_N(t0, cpu_psr);