Index: trunk/src/VBox/Runtime/common/math/log.asm
===================================================================
--- trunk/src/VBox/Runtime/common/math/log.asm	(revision 96218)
+++ trunk/src/VBox/Runtime/common/math/log.asm	(revision 96220)
@@ -25,5 +25,9 @@
 ;
 
+
+%define RT_ASM_WITH_SEH64
 %include "iprt/asmdefs.mac"
+%include "iprt/x86.mac"
+
 
 BEGINCODE
@@ -34,41 +38,48 @@
 ; @param    rd      [rbp + xCB*2] / xmm0
 RT_NOCRT_BEGINPROC log
-    push    xBP
-    mov     xBP, xSP
+        push    xBP
+        SEH64_PUSH_xBP
+        mov     xBP, xSP
+        SEH64_SET_FRAME_xBP 0
 %ifdef RT_ARCH_AMD64
-    sub     xSP, 10h
+        sub     xSP, 10h
+        SEH64_ALLOCATE_STACK 10h
 %endif
+        SEH64_END_PROLOGUE
 
-    fldln2                              ; st0=log(2)
+        fldln2                              ; st0=log(2)
 %ifdef RT_ARCH_AMD64
-    movsd   [xSP], xmm0
-    fld     qword [xSP]
+        movsd   [xBP - 10h], xmm0
+        fld     qword [xBP - 10h]
 %else
-    fld     qword [xBP + xCB*2]         ; st1=log(2) st0=lrd
+        fld     qword [xBP + xCB*2]         ; st1=log(2) st0=lrd
 %endif
-    fld     st0                         ; st1=log(2) st0=lrd st0=lrd
-    fsub    qword [.one xWrtRIP]        ; st2=log(2) st1=lrd st0=lrd-1.0
-    fld     st0                         ; st3=log(2) st2=lrd st1=lrd-1.0 st0=lrd-1.0
-    fabs                                ; st3=log(2) st2=lrd st1=lrd-1.0 st0=abs(lrd-1.0)
-    fcomp   qword [.limit xWrtRIP]      ; st2=log(2) st1=lrd st0=lrd-1.0
-    fnstsw  ax
-    and     eax, 04500h
-    jnz     .use_st1
+        fld     st0                         ; st1=log(2) st0=lrd st0=lrd
+        fsub    qword [.one xWrtRIP]        ; st2=log(2) st1=lrd st0=lrd-1.0
+        fld     st0                         ; st3=log(2) st2=lrd st1=lrd-1.0 st0=lrd-1.0
 
-    fstp    st0                         ; st1=log(2) st0=lrd
-    fyl2x                               ; log(lrd)
-    jmp     .done
+        fabs                                ; st3=log(2) st2=lrd st1=lrd-1.0 st0=abs(lrd-1.0)
+        fcomp   qword [.limit xWrtRIP]      ; st2=log(2) st1=lrd st0=lrd-1.0
+        fnstsw  ax
+        and     eax, X86_FSW_C3 | X86_FSW_C2 | X86_FSW_C0
+        jnz    .use_st1
+
+        fstp    st0                         ; st1=log(2) st0=lrd
+        fyl2x                               ; log(lrd)
+        jmp     .done
 
 .use_st1:
-    fstp    st1                         ; st1=log(2) st0=lrd-1.0
-    fyl2xp1                             ; log(lrd)
+        fstp    st1                         ; st1=log(2) st0=lrd-1.0
+        fyl2xp1                             ; log(lrd)
 
 .done:
 %ifdef RT_ARCH_AMD64
-    fstp    qword [xSP]
-    movsd   xmm0, [xSP]
+        fstp    qword [xBP - 10h]
+        movsd   xmm0, [xBP - 10h]
 %endif
-    leave
-    ret
+        leave
+        ret
+
+ALIGNCODE(8)
 .one:   dq  1.0
 .limit: dq  0.29
Index: trunk/src/VBox/Runtime/common/math/logf.asm
===================================================================
--- trunk/src/VBox/Runtime/common/math/logf.asm	(revision 96218)
+++ trunk/src/VBox/Runtime/common/math/logf.asm	(revision 96220)
@@ -25,5 +25,9 @@
 ;
 
+
+%define RT_ASM_WITH_SEH64
 %include "iprt/asmdefs.mac"
+%include "iprt/x86.mac"
+
 
 BEGINCODE
@@ -34,41 +38,48 @@
 ; @param    r32     [rbp + xCB*2] / xmm0
 RT_NOCRT_BEGINPROC logf
-    push    xBP
-    mov     xBP, xSP
+        push    xBP
+        SEH64_PUSH_xBP
+        mov     xBP, xSP
+        SEH64_SET_FRAME_xBP 0
 %ifdef RT_ARCH_AMD64
-    sub     xSP, 10h
+        sub     xSP, 10h
+        SEH64_ALLOCATE_STACK 10h
 %endif
+        SEH64_END_PROLOGUE
 
-    fldln2                              ; st0=log(2)
+        fldln2                              ; st0=log(2)
 %ifdef RT_ARCH_AMD64
-    movss   [xSP], xmm0
-    fld     dword [xSP]
+        movss   [xBP - 10h], xmm0
+        fld     dword [xBP - 10h]
 %else
-    fld     dword [xBP + xCB*2]         ; st1=log(2) st0=lrd
+        fld     dword [xBP + xCB*2]         ; st1=log(2) st0=lrd
 %endif
-    fld     st0                         ; st1=log(2) st0=lrd st0=lrd
-    fsub    qword [.one xWrtRIP]        ; st2=log(2) st1=lrd st0=lrd-1.0
-    fld     st0                         ; st3=log(2) st2=lrd st1=lrd-1.0 st0=lrd-1.0
-    fabs                                ; st3=log(2) st2=lrd st1=lrd-1.0 st0=abs(lrd-1.0)
-    fcomp   qword [.limit xWrtRIP]      ; st2=log(2) st1=lrd st0=lrd-1.0
-    fnstsw  ax
-    and     eax, 04500h
-    jnz     .use_st1
+        fld     st0                         ; st1=log(2) st0=lrd st0=lrd
+        fsub    qword [.one xWrtRIP]        ; st2=log(2) st1=lrd st0=lrd-1.0
+        fld     st0                         ; st3=log(2) st2=lrd st1=lrd-1.0 st0=lrd-1.0
 
-    fstp    st0                         ; st1=log(2) st0=lrd
-    fyl2x                               ; log(lrd)
-    jmp     .done
+        fabs                                ; st3=log(2) st2=lrd st1=lrd-1.0 st0=abs(lrd-1.0)
+        fcomp   qword [.limit xWrtRIP]      ; st2=log(2) st1=lrd st0=lrd-1.0
+        fnstsw  ax
+        and     eax, X86_FSW_C3 | X86_FSW_C2 | X86_FSW_C0
+        jnz     .use_st1
+
+        fstp    st0                         ; st1=log(2) st0=lrd
+        fyl2x                               ; log(lrd)
+        jmp     .done
 
 .use_st1:
-    fstp    st1                         ; st1=log(2) st0=lrd-1.0
-    fyl2xp1                             ; log(lrd)
+        fstp    st1                         ; st1=log(2) st0=lrd-1.0
+        fyl2xp1                             ; log(lrd)
 
 .done:
 %ifdef RT_ARCH_AMD64
-    fstp    dword [xSP]
-    movss   xmm0, [xSP]
+        fstp    dword [xBP - 10h]
+        movss   xmm0, [xBP - 10h]
 %endif
-    leave
-    ret
+        leave
+        ret
+
+ALIGNCODE(8)
 .one:   dq  1.0
 .limit: dq  0.29
Index: trunk/src/VBox/Runtime/common/math/logl.asm
===================================================================
--- trunk/src/VBox/Runtime/common/math/logl.asm	(revision 96218)
+++ trunk/src/VBox/Runtime/common/math/logl.asm	(revision 96220)
@@ -25,5 +25,9 @@
 ;
 
+
+%define RT_ASM_WITH_SEH64
 %include "iprt/asmdefs.mac"
+%include "iprt/x86.mac"
+
 
 BEGINCODE
@@ -34,30 +38,35 @@
 ; @param    lrd     [rbp + xCB*2]
 RT_NOCRT_BEGINPROC logl
-    push    xBP
-    mov     xBP, xSP
-    sub     xSP, 10h
+        push    xBP
+        SEH64_PUSH_xBP
+        mov     xBP, xSP
+        SEH64_SET_FRAME_xBP 0
+        SEH64_END_PROLOGUE
 
-    fldln2                              ; st0=log(2)
-    fld     tword [xBP + xCB*2]         ; st1=log(2) st0=lrd
-    fld     st0                         ; st1=log(2) st0=lrd st0=lrd
-    fsub    qword [.one xWrtRIP]        ; st2=log(2) st1=lrd st0=lrd-1.0
-    fld     st0                         ; st3=log(2) st2=lrd st1=lrd-1.0 st0=lrd-1.0
-    fabs                                ; st3=log(2) st2=lrd st1=lrd-1.0 st0=abs(lrd-1.0)
-    fcomp   qword [.limit xWrtRIP]      ; st2=log(2) st1=lrd st0=lrd-1.0
-    fnstsw  ax
-    and     eax, 04500h
-    jnz     .use_st1
+        fldln2                              ; st0=log(2)
+        fld     tword [xBP + xCB*2]         ; st1=log(2) st0=lrd
+        fld     st0                         ; st1=log(2) st0=lrd st0=lrd
+        fsub    qword [.one xWrtRIP]        ; st2=log(2) st1=lrd st0=lrd-1.0
+        fld     st0                         ; st3=log(2) st2=lrd st1=lrd-1.0 st0=lrd-1.0
 
-    fstp    st0                         ; st1=log(2) st0=lrd
-    fyl2x                               ; log(lrd)
-    jmp     .done
+        fabs                                ; st3=log(2) st2=lrd st1=lrd-1.0 st0=abs(lrd-1.0)
+        fcomp   qword [.limit xWrtRIP]      ; st2=log(2) st1=lrd st0=lrd-1.0
+        fnstsw  ax
+        and     eax, X86_FSW_C3 | X86_FSW_C2 | X86_FSW_C0
+        jnz     .use_st1
+
+        fstp    st0                         ; st1=log(2) st0=lrd
+        fyl2x                               ; log(lrd)
+        jmp     .done
 
 .use_st1:
-    fstp    st1                         ; st1=log(2) st0=lrd-1.0
-    fyl2xp1                             ; log(lrd)
+        fstp    st1                         ; st1=log(2) st0=lrd-1.0
+        fyl2xp1                             ; log(lrd)
 
 .done:
-    leave
-    ret
+        leave
+        ret
+
+ALIGNCODE(8)
 .one:   dq  1.0
 .limit: dq  0.29
