https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103785

--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to H.J. Lu from comment #8)
> Created attachment 52055 [details]
> Good and bad asm
> 
> --- good.s    2021-12-24 11:24:26.531365375 -0800
> +++ bad.s     2021-12-24 11:24:30.769344666 -0800
> @@ -10,7 +10,6 @@ sem_type__interp_map__setX:
>       .cfi_def_cfa_offset 8
>       .cfi_offset 7, -8
>       movl    %edx, %edi
> -     movl    $714200473, %edx
>       pushl   %esi
>       .cfi_def_cfa_offset 12
>       .cfi_offset 6, -12
> @@ -18,7 +17,8 @@ sem_type__interp_map__setX:
>       .cfi_def_cfa_offset 16
>       .cfi_offset 3, -16
>       movl    %eax, %ebx
> -     imull   %edx
> +     movl    $714200473, %eax

This is wrong since EAX is an implicit input operand.

> +     imull   %eax
>       movl    %ebx, %eax
>       sarl    $31, %eax
>       sarl    $9, %edx

Reply via email to