Where is the disagreement in terms of math operations?
You're computing modulo 32 of a random memory address, so you can't really expect agreement even when using the same BE.
This isn't a typical thing you'd expect codified in language guarantees (unlike, e.g., that distinct variables have distinct memory addresses, stack is 16-byte aligned, etc.).
r-i-v-e-r wrote: Sun Jun 02, 2024 7:54 pm
Where is the disagreement in terms of math operations?
You're computing modulo 32 of a random memory address, so you can't really expect agreement even when using the same BE.
This isn't a typical thing you'd expect guarantees from the language for (unlike, e.g., that distinct variables have distinct memory addresses, stack is 16-byte aligned, etc.).
... and if you change between C compiler and C-optimised compiler, it shows that. Optimisation in that case is outside PureBasic.
r-i-v-e-r wrote: Sun Jun 02, 2024 7:54 pm
Where is the disagreement in terms of math operations?
You're computing modulo 32 of a random memory address, so you can't really expect agreement even when using the same BE.
This isn't a typical thing you'd expect guarantees from the language for (unlike, e.g., that distinct variables have distinct memory addresses, stack is 16-byte aligned, etc.).
... and if you change between C compiler and C-optimised compiler, it shows that. Optimisation in that case is outside PureBasic.
Exactly
We can better illustrate this with something like:
on top of previous comments, i just want to "judge" the "Agreement part"
for reason already explained in detail here, we all understand that in the long go, ONLY C backend will exist
so in general we have to focus a bit only in "is C backend correct? " ... and leave ASM backend as a sweet memory
plouf wrote: Sun Jun 02, 2024 8:10 pm
so in general we have to focus a bit only in "is C backend correct? "
Probably only the C backend will remain yes, but until then both must behave the same.
The same source must produce equivalent binary code resulting in the same behaviour.
If not the affected backend must be fixed or removed or not used anymore, because what would be the point of having it ?
edit: personally I hope Fred will keep maintaining the ASM backend as long as possible because it's so much quicker to use, and if nothing changed recently the purifier also works better with it.