User Tools

Site Tools


wswan:bugs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wswan:bugs [2024/07/12 20:33] – [Miscompilations involving far function pointers] asiewswan:bugs [2025/11/01 08:57] (current) asie
Line 1: Line 1:
-====== Known bugs ======+====== Known issues ======
  
 ===== gcc-ia16 ===== ===== gcc-ia16 =====
  
-  * In general, gcc-ia16's handling of far pointers is considered experimental. (In a wswan target contextthis means all accesses outside of the console's internal RAM.) Caveat emptor.+  * In general, if you run into a compiler error or miscompilation, try annotating the function with ''%%__attribute__((noinline, optimize("-O0"))) %%'' as a workaround. 
 +  * gcc-ia16's handling of far pointers is considered experimental. Caveat emptor. 
 +  * gcc-ia16's handling of DS != SS (wwitch target) is pretty buggy. It works for simple codebut complex pointer operations may lead to bugsAgain, caveat emptor.
  
-==== Miscompilations involving far function pointers ====+==== Bug: Miscompilations involving far function pointers ====
  
 In some cases, when calling pointers from arrays of far function pointers in optimization modes >= -O1, the code will be miscompiled. This is a [[https://github.com/tkchia/gcc-ia16/issues/120|known issue]], with no ETA for a fix. In some cases, when calling pointers from arrays of far function pointers in optimization modes >= -O1, the code will be miscompiled. This is a [[https://github.com/tkchia/gcc-ia16/issues/120|known issue]], with no ETA for a fix.
Line 17: Line 19:
 } }
 </code> </code>
 +
 +==== Issue: wwitch target and interrupt handlers ====
 +
 +The wwitch target does not support relocation; as such, far functions (which interrupt handlers have to be) cannot be created in sections other than the default text section. This can be most easily achieved by building with ''-fno-function-sections'' in CFLAGS.
wswan/bugs.1720816425.txt.gz · Last modified: by asie