[cfe-dev] Clang-Cl assembly output - .seh_ pseudo code

Gaier, Bjoern via cfe-dev cfe-dev at lists.llvm.org
Mon Jan 20 00:52:40 PST 2020


Hello Clang-Developers,

I have a question about the assembly output Clang-Cl generated for me, when passing /Fa. The code was using a __try and __except statement and I wanted to see how the __try statement is represented in the target assembly. To my surprise there was no ".cv_loc" for that specific line - so I scrolled up a bit.
There I found:

push      rbp
.seh_pushreg 5
sub        rsp, 48
.seh_stackalloc 48
lea          rbp, [rsp + 48]
.seh_setframe 5, 48
.seh_endprologue

I looked up those words and only could find out that those are pseudo code. I wonder, why am I not allowed to see the content behind those pseudo code? Is there a way to find out what will be written there later?
I also found the following lines in a different code which really confused me:

push      rax
.seh_stackalloc 8
.seh_endprologue

Even though there is written "stackalloc" the rsp is not changed, but in the code I posted above it was changed.

Kind greetings
Björn
Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Takeshi Fukushima. Junichi Tajika
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200120/67a3b6be/attachment.html>


More information about the cfe-dev mailing list