Changeset 9144


Ignore:
Timestamp:
Apr 13, 2008, 4:19:24 AM (11 years ago)
Author:
rme
Message:

setup_signal_frame: restore state of segment registers, align stack properly.

On Darwin/IA-32, the stack is supposed to be aligned at a 16-byte
boundary at the time of a function call. This implies that on
function entry, the stack pointer will be 4 bytes past a 16-byte
boundary, due to the return address pushed by the CALL instruction.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ia32/lisp-kernel/x86-exceptions.c

    r8372 r9144  
    24262426#define USER_DS 0x1f
    24272427  bzero(&new_ts, sizeof(new_ts));
    2428 #if 0
    24292428  new_ts.__cs = ts->__cs;
    24302429  new_ts.__ss = ts->__ss;
     
    24332432  new_ts.__fs = ts->__fs;
    24342433  new_ts.__gs = ts->__gs;
    2435 #endif
     2434
    24362435  new_ts.__eip = (natural)handler_address;
    24372436  stackpp = (natural *)stackp;
    24382437  *--stackpp = 0;               /* alignment */
     2438  *--stackpp = 0;
    24392439  *--stackpp = 0;
    24402440  *--stackpp = (natural)old_valence;
Note: See TracChangeset for help on using the changeset viewer.