Targets that don't support exception handling

Nick Burrett nick.burrett@btinternet.com
Sat Feb 28 14:33:00 GMT 1998


I've ported egcs to a new target, namely ARM running RISC OS. This
operating system demands stricter conformance to the APCS (ARM 
Procedure Call Standard) than the RISCiX/FreeBSD/Linux versions demand.
As such, the assumptions made by egcs/gcc regarding the stack frame
when compiling with exception handling support produces broken code.

I did try with some effort to get some modifications into gcc 2.8.0
to support exception handling for RISC OS, but Kenner mentioned that
more of a implementation change within gcc would be required to
accommodate RISC OS. There are two main reasons:

  1. gcc/egcs assumes that the stack can be unwinded with very few
instructions. RISC OS can use both a non-contiguous and a contiguous
stack and requires a function with 30 instructions to unwind the stack.
It is impossible to inline this function.

  2. gcc/egcs makes assumptions about the stack and frame pointer that
are plainly incompatible with the RISC OS/APCS standard.

I was hoping to release a version of egcs for RISC OS users that
provided a C++ compiler but it seems that egcs now only supports
targets that support exception handling. I removed the exceptions
support from libgcc and have managed to get libio compiled but 
I've just stumbled across exceptions in libstdc++

It seems that I was obviously not paying attention when the
transitional phase was made to support exception handling.
Am I the only person who is trying to get a C++ port running on
a target that doesn't currently support exception handling ?


Nick Burrett.

p.s. sorry about the wording of this e-mail. I've had too many
beers to get my grammatics correct.




More information about the Gcc mailing list