mstorsjo added inline comments.

================
Comment at: src/UnwindRegistersRestore.S:98
+  # skip fs
+  # skip gs
+  movq  56(%rcx), %rsp  # cut back rsp to new location
----------------
mstorsjo wrote:
> compnerd wrote:
> > Doesn't Win64 ABI require some of the MMX registers be saved/restored too?
> Right, yes, xmm6-xmm15 should be backed up and restored. I'll try to amend 
> this with such a change.
Actually, such a change doesn't necessarily make much sense on its own.

As long as the dwarf encoding itself doesn't describe how to restore those 
registers (and on unix platforms you don't need to, so it probably isn't even 
specified), you'd just end up backing up the xmm registers on entry when 
throwing the exception, and restoring the exactly same ones again - it only 
guards against changes within libcxxabi/libunwind and the unwinding machinery 
itself, not against changes further down in the call stack between the thrower 
and catcher of the exception.

So with that, I guess this patch is futile unless planning to extend the x86_64 
dwarf handling in llvm to include those registers as well - and that's a little 
out of scope of what I intended to do here...


https://reviews.llvm.org/D38819



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to