[Lldb-commits] [PATCH] D89193: [lldb] [Process/FreeBSDRemote] Support YMM reg via PT_*XSTATE

Ed Maste via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 13 11:04:50 PDT 2020

emaste added inline comments.

Comment at: lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp:448-449
+    assert(info.xsave_mask & XFEATURE_ENABLED_X87);
+    assert(info.xsave_mask & XFEATURE_ENABLED_SSE);
mgorny wrote:
> mgorny wrote:
> > emaste wrote:
> > > I wonder if these should be an error rather than assertion?
> > I suppose the question is if they ever happen in real use. If they do, we should probably handle them gracefully. Otherwise, assertion should be sufficient.
> I can actually answer the first question myself. According to Intel's manual, it is impossible to disable x87 bit. IIRC attempt to unset it on XCR0 will raise some fault.
> The second question is basically whether under any circumstances can FreeBSD kernel disable SSE on XCR0 (this code is only used on systems supporting XSAVE).
I guess my point is that having these bits unset would indicate a kernel issue or bug, or maybe hardware issue, but never indicate an error or invalid operation in lldb itself.

Either way I think there is no practical impact, it's not actually going to happen.



More information about the lldb-commits mailing list