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 <[email protected]>
> ---
> 
> 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 <[email protected]>

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

Reply via email to