|
[
Permlink
| « Hide
]
Ian Rogers added a comment - 26/Jul/07 08:39 AM
We should also sanitize the x87 register names. Currently they are called FP0 to FP7, Intel call the x87 registers ST0 (stack top) to ST7 and the SSE registers XMM0 to XMM7. We also have two special register names ST0 and ST1 used to address the x87 stack when we can't perform operations in SSE. The reason the FP name exists is that the original x87 register allocation was to treat the x87 stack as a flat register file and perform trickery with stack exchange operations (fxch) to make it appear so.
Since the introduction of type registers the names of registers in opt compiler debug output is now sane. We aren't, however, dumping the XMM registers when we die because of a hardware trap. This is little more than tweaking the debug output so we should implement it for 2.9.3.
I took a look, and this is annoyingly non-trivial.
The problem is that the header files (sys/ucontext.h vs asm/ucontext.h) are out of synch. We're using sys/ucontext.h and it doesn't have a way of naming the xmm registers. Deferring this to later release. The actual coding is trivial if we had a portable way to name the right piece of the fpstate struct. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||