Thanks! Added to my research list. In particular I think I need to
keep an eye on Structured Exception Handling for 32-bit x86, that does
not sound easy and I likely need to look up more about it.

best regards,
Julian

On Tue, Mar 10, 2026 at 10:03 PM LIU Hao <[email protected]> wrote:
>
> 在 2026-3-10 21:39, Julian Waters via Gcc 写道:
> > Hi all,
> >
> > I intend to join the Google Summer of Code programme for 2026 under
> > gcc, to work on the compiler. I have previously authored 2 commits to
> > the compiler, commit f6c5f83 which introduced a feature test macro for
> > the active Windows threading model and a more significant commit with
> > the help of many others, commit 0aea633 which implements Windows
> > native Thread Local Storage, allowing gcc to bypass emutls for
> > Windows.
> >
> > Historically, gcc does not receive as much attention and maintenance
> > for its Windows port as it does for its main platforms, which leads to
> > it lagging behind the primary platforms, such as Linux based ones,
> > pretty significantly in terms of robustness, resulting in features and
> > other areas of the compiler simply being broken and not working
> > properly on Windows, as is reported by some users. As a primarily
> > Windows user of gcc, I wish to improve at least these pain points with
> > using gcc to compile for Windows targets, whether it may be broken or
> > missing features, to benefit my own work that uses gcc heavily and
> > also others that use the compiler for Windows targets. I will be
> > proposing work for such improvement on Windows as my Google Summer of
> > Code application.
> >
> > To do this, I'm collating a list of all the issues and missing
> > features for gcc with this target. While I do have a few already
> > written down, I'd like to know/hear about as many issues that the
> > community may know of with using gcc as a Windows compiler so I can
> > add them to my list, so I have a better picture of everything that
> > needs to be done to improve gcc for Windows. I initially thought of
> > looking at https://gcc.gnu.org/wiki/WindowsGCCImprovements but it's
> > become clear that the page is, unfortunately, hopelessly outdated
> > (Listing Exception Handling as a potential idea when it's already been
> > implemented, and even mentioning the GNU Java compiler!).
> >
> > Thanks in advance, and have a pleasant rest of the week ahead!
>
> I'm glad to hear that! Nice work!
>
> There are two things which immediately come into my mind:
>
> One is that on x86-64 there's no practical way to realign the stack pointer 
> to 32-byte boundaries
> (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412). It's likely that this 
> can't be really fixed so
> maybe for Windows on x86-64 it's necessary to always use unaligned 
> instructions to load and store AVX
> registers.
>
> The other is structured exception handling (SEH) on x86-32, which is quite 
> different from table-based EH,
> in that it requires extra storage on the stack; and existent code in 
> libgcc-unwind-seh.c isn't quite
> usable, for example `RtlLookupFunctionEntry()` is not available on x86-32, 
> and stack unwinding routines
> may have to be implemented separately, and there's no SEH support in 
> binutils. I can provide you some
> technical details if you are interested.
>
>
>
>
> --
> Best regards,
> LIU Hao

Reply via email to