qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Idan Horowitz <idan.horowitz@gmail.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: Re: [PATCH] tcg: Mark tcg helpers noinline to avoid an issue with LTO
Date: Thu, 19 Jan 2023 19:32:02 +0200	[thread overview]
Message-ID: <827d6859-164f-a1f9-71fd-5cd9ba892a33@gmail.com> (raw)
In-Reply-To: <20230119165006.742073-1-richard.henderson@linaro.org>

On 19/01/2023 18:50, Richard Henderson wrote:
> Marking helpers __attribute__((noinline)) prevents an issue
> with GCC's ipa-split pass under --enable-lto.
> 
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1454
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> 
> Idan, please give this a try.  By inspection, it fixes the issue
> with s390x's helper_divs32 function.
> 
> 
> r~

This resolves the issue:

000000000023f9b0 <helper_divs32>:
   23f9b0:       48 83 ec 08             sub    rsp,0x8
   23f9b4:       85 d2                   test   edx,edx
   23f9b6:       74 22                   je     23f9da <helper_divs32+0x2a>
   23f9b8:       48 89 f0                mov    rax,rsi
   23f9bb:       48 63 ca                movsxd rcx,edx
   23f9be:       48 99                   cqo
   23f9c0:       48 f7 f9                idiv   rcx
   23f9c3:       48 89 97 10 03 00 00    mov    QWORD PTR [rdi+0x310],rdx
   23f9ca:       48 63 d0                movsxd rdx,eax
   23f9cd:       48 39 c2                cmp    rdx,rax
   23f9d0:       75 08                   jne    23f9da <helper_divs32+0x2a>
   23f9d2:       48 89 d0                mov    rax,rdx
   23f9d5:       48 83 c4 08             add    rsp,0x8
   23f9d9:       c3                      ret
   23f9da:       48 8b 54 24 08          mov    rdx,QWORD PTR [rsp+0x8]
   23f9df:       be 09 00 00 00          mov    esi,0x9
   23f9e4:       e8 a7 df ff ff          call   23d990 <tcg_s390_program_interrupt>

Thanks!

Tested-by: Idan Horowitz <idan.horowitz@gmail.com>

> ---
>  include/exec/helper-proto.h | 32 ++++++++++++++++++++++++--------
>  1 file changed, 24 insertions(+), 8 deletions(-)
> 


      parent reply	other threads:[~2023-01-19 17:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19 16:50 [PATCH] tcg: Mark tcg helpers noinline to avoid an issue with LTO Richard Henderson
2023-01-19 16:55 ` Philippe Mathieu-Daudé
2023-01-19 17:11 ` Peter Maydell
2023-01-19 20:50   ` Richard Henderson
2023-01-19 17:32 ` Idan Horowitz [this message]

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=827d6859-164f-a1f9-71fd-5cd9ba892a33@gmail.com \
    --to=idan.horowitz@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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).