On 09.01.2026 14:25, Herman ten Brugge wrote:
On 1/9/26 12:57, grischka wrote:
On 09.01.2026 08:04, Herman ten Brugge via Tinycc-devel wrote:
While debugging some i386 code I found some memory alignment differences.
1) The double and long long type differ inside and outside struct.
outside struct (size = 8, align = 8):
double a;
long long b;
inside struct (size = 8 align = 4)
struct {
double a;
long long b;
};
This only happens on x86 (and perhaps on !TCC_ARM_EABI which I cannot test).
I cannot reproduce this. Alignment is 4 in both cases
I tried again with gcc4/gcc15/gcc16/clang21/clang22 with program below.
Sorry, but 'gcc' or 'clang' were not mentioned at all above. Just
"memory alignment differences" and "inside and outside struct".
Since we're on the tinycc list the natural thing to assume was
that the somewhat strange difference does exist in TCC, rather
than that the difference exists in gcc or that it exists between
tcc and gcc or clang.
I still think we should fix the i386 alignment.
So...
- by "the i386 alignment" you mean alignment of 'double' and 'long long' on
i386,
- and by "we should fix" you mean us to assume a bug in TCC,
- and by "I still think" you mean to substitute the still missing arguments
for that assumption.
Is that correct? ;)
-- gr
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel