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

--- Comment #6 from wmi at google dot com ---
(In reply to Dominik Vogt from comment #3)
> I think the Rtl in comment 1 ist correct.  Note that "i" is stored at
> 0x00000000.xx000000 and "j" is stored at 0x00000000.000000xx.  That is the
> reason for the rather confusing mask in insn 9.  Your test program compiles
> and runs fine for me.

I am not familiar with s390 assembly. please correct me if I am wrong:

This is the assembly generated for my testcase:
.globl _Z3fooP1A
        .type   _Z3fooP1A, @function
_Z3fooP1A:
.LFB0:
        larl    %r5,.L3
        mvi     0(%r2),3                // move 0x00000000.00000003 to 0(%r2) 
        l       %r1,.L4-.L3(%r5)        // load 0xff000000 to %r1
        n       %r1,0(%r2)              // %r1 = %r1 & 0(%r2) =
0x00000000.00000000 
        oill    %r1,5                   // %r1 = %r1 | 5 = 0x00000000.00000005
        st      %r1,0(%r2)              // store 0x00000000.00000005 to 0(%r2)
        br      %r14
        .section        .rodata
        .align  8
.L3:
.L4:
        .long   -16777216
        .align  2
        .previous

According to the asm sequence above, the result of a should be:
0x00000000.00000005, but the correct result should be 0x00000000.03000005,
right?

Reply via email to