tccgen: update "Fix invalid load generated by gfunc_return()"
commitc29420ab0de92cefc95388e23506cf8dd8c5348d
authorgrischka <grischka>
Mon, 31 Jul 2023 09:43:15 +0000 (31 11:43 +0200)
committergrischka <grischka>
Mon, 31 Jul 2023 10:22:15 +0000 (31 12:22 +0200)
tree6f4594547ce85844110d7182376d583b900b808b
parent022fb4293bd294ef62d8e772215f6094f8164a5b
tccgen: update "Fix invalid load generated by gfunc_return()"

tccgen.c:
- new function incr_offset(int) to increment a lvalue
- use it in gv/vstore to load/store from/to two-word types
- use it to advance the pointer to struct fields
- use it to load/store structs passed in registers
- structs: always assume that reg-classes of registers are 2^n
- adjust stack space when regsize > sizeof the_struct

x86_64-gen.c:
- return regsize=16 for VT_QLONG/QFLOAT

i386-gen.c:
- pass structs of size(8) as two VT_INT rather than one VT_LLONG
  (both should work now)

fixes a82aff333774f3bd38841d3c167f1add8c473c1c
fixes fd6d2180c5c801bb0b4c5dde27d61503059fc97d (slightly)
i386-gen.c
tccgen.c
tests/tests2/131_return_struct_in_reg.c
tests/tests2/131_return_struct_in_reg.expect
x86_64-gen.c