[ros-dev] [ros-diffs] [tkreuzer] 64078: [PSEH] - On clang builds we need to do the return twice trick, since we don't have asm goto, which would allow us to specify labels in the code where we can branch to on an except...

Thomas Faber thomas.faber at reactos.org
Fri Sep 12 12:12:44 UTC 2014


On 2014-09-07 23:40, tkreuzer at svn.reactos.org wrote:
> --- trunk/reactos/lib/pseh/i386/pseh3_i386.S	[iso-8859-1] (original)
> +++ trunk/reactos/lib/pseh/i386/pseh3_i386.S	[iso-8859-1] Sun Sep  7 21:40:07 2014
> @@ -30,6 +30,10 @@
>      mov [eax + SEH3_REGISTRATION_FRAME_Esi], esi
>      mov [eax + SEH3_REGISTRATION_FRAME_Edi], edi
>  
> +    /* Safe the return address */
> +    mov ebx, [esp]
> +    mov [eax + SEH3_REGISTRATION_FRAME_ReturnAddress], ebx
> +
>  .global __SEH3$_RegisterFrameWithStackLayout
>  __SEH3$_RegisterFrameWithStackLayout:
>  

I think we need to restore ebx before returning? I don't see us telling
the compiler that it was clobbered anywhere.



More information about the Ros-dev mailing list