From patchwork Wed Jul 19 21:36:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9853239 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 84591602C8 for ; Wed, 19 Jul 2017 21:37:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 786BE28687 for ; Wed, 19 Jul 2017 21:37:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D25D28710; Wed, 19 Jul 2017 21:37:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DF81228687 for ; Wed, 19 Jul 2017 21:37:31 +0000 (UTC) Received: from localhost ([::1]:35097 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXwev-0005qQ-Nf for patchwork-qemu-devel@patchwork.kernel.org; Wed, 19 Jul 2017 17:37:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXweG-0005pd-9p for qemu-devel@nongnu.org; Wed, 19 Jul 2017 17:36:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXweB-0005Dw-Ak for qemu-devel@nongnu.org; Wed, 19 Jul 2017 17:36:48 -0400 Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]:37096) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dXweB-0005DN-4K for qemu-devel@nongnu.org; Wed, 19 Jul 2017 17:36:43 -0400 Received: by mail-qk0-x241.google.com with SMTP id q130so804252qka.4 for ; Wed, 19 Jul 2017 14:36:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=KNpIljkELLZmjyNlpI0ECZuEGJtiuJafQ/WL9mshKFw=; b=uI2P/zNOu9twSqlU3Bu7AbDeKOsjGLqBm/jWFKZ7rQZPMd7xIP1OyIjZZPVvYB9ftp 0WXO+kHWPwRQGghFBYaSbry6XImmevl67fEPZSG9x0tUKkyERwZsK0wKK48RVoEYsTZ+ 82F2Gv46p0Yt5Rk+ss/qjwnB4pGrwQ2bT2uZxitg+QIN9XCSWdpRlY5Xd4kObQKnjgc7 XdLR9sMdtId1WnOM2vM6aljhcgfm5QaHj1nvfPBgTa1TiyaAXBlWw0I7pe4dgEkxa7Vh QErLc/XS3yaT85UApdaZ3zl2+90FHtJCZjOZrtar8Oq9QvIfjgCKBYdso5I+2N3eAbG2 IiKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=KNpIljkELLZmjyNlpI0ECZuEGJtiuJafQ/WL9mshKFw=; b=mjPxO6fDLDJkH6JwU42xCFtNngSZgXpaC+CeBqjorribxuj0Cjxv6T60Sw/TD80t6b 0ownYTQfWr69xJkQtppIE80FOtMf9eeeKXT4zjvsvZMv3SAZez7BLpjrhANXXUzlF82H df7ujpliuJZWZyuXvjWkdmsMEDP4KWAaR7gwmKUfpXBWLdSNasZiedIe4MSJo/KGvVm7 B/siVfou35/JKr13O3xRXLMsixZ2hzu80db16Sy63rJUFP47r65M9gEYDx7KCa16cTfb 7ZYBw4TijfMt03rp/4NhtBTZWooK7o2cNQY0gPJCOhSQP2wHL+7xX8z7V9WwrjCyJrCu /HBQ== X-Gm-Message-State: AIVw11306PbcOMwYlX5blgeEUiX4j4NqbwbnaNjjvIad+WuDnYWPQ6L5 EbemclQSPt95jcnvFRE= X-Received: by 10.55.79.77 with SMTP id d74mr2115344qkb.183.1500500200731; Wed, 19 Jul 2017 14:36:40 -0700 (PDT) Received: from bigtime.twiddle.net ([203.221.203.174]) by smtp.googlemail.com with ESMTPSA id x125sm662464qkc.87.2017.07.19.14.36.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Jul 2017 14:36:36 -0700 (PDT) To: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Peter Maydell References: <20170719045722.25492-1-rth@twiddle.net> <9bc19023-eca9-1ea6-02d7-4817fe6fd6fb@amsat.org> From: Richard Henderson Message-ID: Date: Wed, 19 Jul 2017 11:36:29 -1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <9bc19023-eca9-1ea6-02d7-4817fe6fd6fb@amsat.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::241 Subject: Re: [Qemu-devel] [PULL 00/14] tcg-next patch queue X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: QEMU Developers Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --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);