qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Stefan Weil" <sw@weilnetz.de>, "Alex Bennée" <alex.bennee@linaro.org>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH v4 4/4] meson: Warn when TCI is selected but TCG backend is available
Date: Tue, 26 Jan 2021 12:39:07 -1000	[thread overview]
Message-ID: <bbe4adfe-5bed-c37f-78c6-b120cb192aae@linaro.org> (raw)
In-Reply-To: <89209f1b-29ad-e5df-6d45-b2480db4775e@weilnetz.de>

On 1/26/21 9:44 AM, Stefan Weil wrote:
> I was not talking about the TODO assertions. When I wrote TCI, I only enabled
> and included code which was triggered by my testing - that's why I said the
> productive code lines have 100 % test coverage. TODO assertions are not
> productive code, but debug code which were made to detect new test cases. They
> were successful, too, because they were triggered by some tests in `make
> check-tcg`.

The TODO assertions are all bugs.

Any *real* dead code detection should have been done in
tcg/tci/tcg-target.c.inc.  What's interpreted in tcg/tci.c should be exactly
what is produced on the other side, and you are producing more than you are
consuming.

> It should pass now unless you get timeouts for some tests. Please tell me if
> more TODO assertions are triggered by new tests.

        case INDEX_op_ld8s_i32:
            TODO();
            break;

Can be triggered by

target/arm/translate-a64.c:1061:
        tcg_gen_ld8s_i64(tcg_dest, cpu_env, vect_off);
target/arm/translate-a64.c:1090:
        tcg_gen_ld8s_i32(tcg_dest, cpu_env, vect_off);
target/arm/translate.c:1210:
        tcg_gen_ld8s_i32(dest, cpu_env, off);

target/s390x/translate_vx.c.inc:81:
        tcg_gen_ld8s_i64(dst, cpu_env, offs);
target/s390x/translate_vx.c.inc:111:
        tcg_gen_ld8s_i32(dst, cpu_env, offs);

        case INDEX_op_ld16s_i32:
            TODO();
            break;

Can be triggered by

target/arm/translate-a64.c:1064:
        tcg_gen_ld16s_i64(tcg_dest, cpu_env, vect_off);
target/arm/translate-a64.c:1093:
        tcg_gen_ld16s_i32(tcg_dest, cpu_env, vect_off);
target/arm/translate.c:1216:
        tcg_gen_ld16s_i32(dest, cpu_env, off);
target/s390x/translate_vx.c.inc:84:
        tcg_gen_ld16s_i64(dst, cpu_env, offs);
target/s390x/translate_vx.c.inc:114:
        tcg_gen_ld16s_i32(dst, cpu_env, offs);

All of which are target vector instructions.
I'm sure it would be trivial to whip up test cases for them, but I don't see
that as my job.

Please maintain this code properly or give it up.


r~


  parent reply	other threads:[~2021-01-26 22:40 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 14:45 [PATCH v4 0/4] meson: Try to clarify TCG / TCI options for new users Philippe Mathieu-Daudé
2021-01-25 14:45 ` [PATCH v4 1/4] configure: Fix --enable-tcg-interpreter Philippe Mathieu-Daudé
2021-01-25 16:36   ` Paolo Bonzini
2021-01-25 17:10   ` Daniel P. Berrangé
2021-01-26 19:46   ` Stefan Weil
2021-01-25 14:45 ` [PATCH v4 2/4] configure: Improve TCI feature description Philippe Mathieu-Daudé
2021-01-25 16:44   ` Daniel P. Berrangé
2021-01-25 14:45 ` [PATCH v4 3/4] meson: Explicit TCG backend used Philippe Mathieu-Daudé
2021-01-25 16:45   ` Daniel P. Berrangé
2021-01-25 14:45 ` [PATCH v4 4/4] meson: Warn when TCI is selected but TCG backend is available Philippe Mathieu-Daudé
2021-01-25 16:46   ` Daniel P. Berrangé
2021-01-25 16:47   ` Daniel P. Berrangé
2021-01-25 17:05     ` Philippe Mathieu-Daudé
2021-01-25 18:58       ` Stefan Weil
2021-01-25 19:02         ` Richard Henderson
2021-01-25 21:02           ` Stefan Weil
2021-01-25 22:35             ` Richard Henderson
2021-01-26 11:40               ` Stefan Weil
2021-01-26 17:24                 ` Alex Bennée
2021-01-26 19:44                   ` Stefan Weil
2021-01-26 20:07                     ` Paolo Bonzini
2021-01-26 20:10                       ` Stefan Weil
2021-01-26 22:39                     ` Richard Henderson [this message]
2021-01-27  6:53                       ` Stefan Weil
2021-01-27 17:19                         ` Richard Henderson
2021-01-27 19:52                         ` Alex Bennée
2021-01-27 20:49                           ` Stefan Weil
2021-01-27 21:47                             ` Alex Bennée
2021-01-28  2:49                               ` Stefan Weil
2021-01-28  6:51                               ` qemu user mode fails to run programs with large VM / built with address sanitizer (was: Re: [PATCH v4 4/4] meson: Warn when TCI is selected but TCG backend is available) Stefan Weil
2021-01-28  8:29                                 ` Richard Henderson
2021-01-27 10:02                   ` [PATCH v4 4/4] meson: Warn when TCI is selected but TCG backend is available Daniel P. Berrangé
2021-01-27 12:34                     ` Alex Bennée
2021-01-26 10:34           ` Daniel P. Berrangé
2021-01-29  8:06 ` [PATCH v4 0/4] meson: Try to clarify TCG / TCI options for new users Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bbe4adfe-5bed-c37f-78c6-b120cb192aae@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).