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

--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Jakub Jelinek from comment #10)
> Are the changes I've made sufficient enough that we can postpone the rest of
> this for stage1?

Now we got

[hjl@gnu-6 pr70321]$ cat z.i 
void
foo (long long ixi)
{
  if (ixi != 14348907)
    __builtin_abort ();
}
[hjl@gnu-6 pr70321]$ make z.s
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -fno-asynchronous-unwind-tables
-O2 -m32 -S -o z.s z.i
[hjl@gnu-6 pr70321]$ make z1.s
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -fno-asynchronous-unwind-tables
-O2 -m32 -mno-stv -S -o z1.s z.i
[hjl@gnu-6 pr70321]$ cat z.s
        .file   "z.i"
        .text
        .p2align 4,,15
        .globl  foo
        .type   foo, @function
foo:
        subl    $12, %esp
        movl    16(%esp), %eax
        movl    20(%esp), %edx
        xorl    $14348907, %eax
        movl    %edx, %ecx
        orl     %eax, %ecx
        jne     .L5
        addl    $12, %esp
        ret
.L5:
        call    abort
        .size   foo, .-foo
        .ident  "GCC: (GNU) 6.0.0 20160323 (experimental)"
        .section        .note.GNU-stack,"",@progbits
[hjl@gnu-6 pr70321]$ cat z1.s
        .file   "z.i"
        .text
        .p2align 4,,15
        .globl  foo
        .type   foo, @function
foo:
        subl    $12, %esp
        movl    16(%esp), %eax
        xorl    $14348907, %eax
        orl     20(%esp), %eax
        jne     .L5
        addl    $12, %esp
        ret
.L5:
        call    abort
        .size   foo, .-foo
        .ident  "GCC: (GNU) 6.0.0 20160323 (experimental)"
        .section        .note.GNU-stack,"",@progbits

It is an improvement.  But we should fix it properly for GCC 7.

Reply via email to