You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same code as #142 - but the near SwanOffset pointer has been replaced with a far one, and the bitfield access bug has been worked around by using a manually combined uint16_t write.
This is code to access SwanOffset[%si] and write it to %ax, which works well, except at no point is the value of %ds restored, causing issues later down the chain.
The -O0 variant of the code likewise does not restore %ds, but it seemingly avoids triggering this issue by overzealously using %ss: prefixes.
The text was updated successfully, but these errors were encountered:
Same code as #142 - but the near
SwanOffset
pointer has been replaced with a far one, and the bitfield access bug has been worked around by using a manually combined uint16_t write.https://asie.pl/files/gcc-ia16-20230905-193655.i
When compiling the above file with
ia16-elf-gcc -O2 -mcmodel=medium -c -o main.o gcc-ia16-20230905-193655.i
, the following ASM sequence gets emitted:This is code to access
SwanOffset[%si]
and write it to%ax
, which works well, except at no point is the value of%ds
restored, causing issues later down the chain.The
-O0
variant of the code likewise does not restore%ds
, but it seemingly avoids triggering this issue by overzealously using%ss:
prefixes.The text was updated successfully, but these errors were encountered: