Hi,
I have rebased all the changes of upstream and I have moved
to use the blit version in upstream and I got several tests
failling. The first one failling is this qbe code
data $.L4 = align 4 {
w 1,
w 0,
}
export function w $main()
{
@.L8
%x.L4 =l alloc4 8
blit %x.L4,$.L4,8
%.L6 =l add %x.L4,4
%.L7 =w loadsw %.L6
ret %.L7
}
that generates
.data
.balign 4
.L4:
.int 1
.int 0
/* end data */
.text
.globl main
main:
pushq %rbp
movq %rsp, %rbp
movl $3735936685, %eax
leave
ret
.type main, @function
.size main, .-main
/* end function main */
.section .note.GNU-stack,"",@progbits
that clearly is wrong.
I'll submit the other tests failing after this one is fixed.
Regards,
Roberto Vargas
On Thu, Sep 21, 2023, at 19:44, Roberto E. Vargas Caballero wrote:
> @.L8> %x.L4 =l alloc4 8> blit %x.L4,$.L4,8> %.L6 =l add %x.L4,4> %.L7 =w loadsw %.L6> ret %.L7
Blit, unlike memcpy(), takes the destination pointer as second
argument. In your code, you copy from %x.L4 to $.L4, that is,
you copy from uninitialized memory. The compilation result thus
looks correct to me.
Maybe you meant
blit $.L4,%x.L4,8
On Sat, Sep 23, 2023 at 09:29:32AM +0200, Quentin Carbonneaux wrote:
> On Thu, Sep 21, 2023, at 19:44, Roberto E. Vargas Caballero wrote:> > @.L8> > %x.L4 =l alloc4 8> > blit %x.L4,$.L4,8> > %.L6 =l add %x.L4,4> > %.L7 =w loadsw %.L6> > ret %.L7> > Blit, unlike memcpy(), takes the destination pointer as second> argument. In your code, you copy from %x.L4 to $.L4, that is,> you copy from uninitialized memory. The compilation result thus> looks correct to me.> > Maybe you meant> > blit $.L4,%x.L4,8
Ok, that makes sense. After fixing that all the tests are passing.
Thank you,