Changeset 9321 for branches/win64


Ignore:
Timestamp:
Apr 28, 2008, 3:39:40 PM (12 years ago)
Author:
gb
Message:

In windows_arbstack_exception_handler(), ensure that foreign_rsp is
16-byte-aligned before switching to it.

In windows_switch_to_foreign_stack(), pop the return address off of
the old stack and push it on the new stack. We'll never actually
return to it, but the ABI wants this (RSP on entry should be #x.......8).

Location:
branches/win64/lisp-kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/win64/lisp-kernel/x86-asmutils64.s

    r9306 r9321  
    270270       
    271271_exportfn(C(windows_switch_to_foreign_stack))
     272        __(pop %rax)
    272273        __(lea -0x20(%rcx),%rsp)
     274        __(push %rax)
    273275        __(movq %r8,%rcx)
    274276        __(jmp *%rdx)
  • branches/win64/lisp-kernel/x86-exceptions.c

    r9308 r9321  
    15581558  foreign_rsp = (LispObj)new_info;
    15591559  new_ep = ((EXCEPTION_POINTERS *)(foreign_rsp&~15))-1;
    1560   foreign_rsp = (LispObj)new_ep;
     1560  foreign_rsp = (LispObj)new_ep & ~15;
    15611561  new_ep->ContextRecord = new_context;
    15621562  new_ep->ExceptionRecord = new_info;
Note: See TracChangeset for help on using the changeset viewer.