Hidden benefits of the register window...
When SPARC ISA was first designed, the register window feature made sense given the first implementation characteristics such as unified cache and relatively shallow call depth. But as John Mashey pointed out in his posting here, it doesn't look like such a great idea nowadays.But there's some unexpected benefit of the register window that are not well known.
The register window makes the call stack trace explicit, straightfoward and transparent, thus makes it fairly simple to do a stack unwind and do some tricks in the exception handling code. This contrasts to some other architectures where it isn't very simple to do a stack unwind due to potentially missing frame pointer, or difficulty of recovering the callee save registers.
Another hidden benefit is the simpler register allocation in the compiler. The register window effectively leaves no caller save registers, thus the compiler has less things to worry about. Also there's less need for interprocedural register allocation or link time register allocation.
Because of the register window and non-executable stack, it is quite a bit more difficult to exploit the buffer overflow vulnerability on SPARC, although it doesn't make exploiting impossible.
( Jul 28 2004, 02:30:29 AM PDT ) Permalink
Comments:
Post a Comment:
Comments are closed for this entry.

