Ignore:
Timestamp:
Sep 20, 2011, 2:19:03 AM (9 years ago)
Author:
rme
Message:

New functions in x86-utils.[ch], moved, more-or-less,
from xlbt.c.

Use them in x86-exceptions.c, in particular in
create_exception_callback_frame().

Move the definitions of the RECOVER_FN_xxx constants
from x86-exceptions.h to the appropriate x86-constants{32,64}.h
files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/x86-exceptions.h

    r14295 r14991  
    9191#endif
    9292
    93 /* recognizing the function associated with a tagged return address */
    94 /* now involves recognizinig an "(lea (@ disp (% rip)) (% rn))" */
    95 /* instruction at the tra */
    96 
    97 #define RECOVER_FN_FROM_RIP_LENGTH 7 /* the instruction is 7 bytes long */
    98 #define RECOVER_FN_FROM_RIP_DISP_OFFSET 3 /* displacement word is 3 bytes in */
    99 #define RECOVER_FN_FROM_RIP_WORD0 0x8d4c /* 0x4c 0x8d, little-endian */
    100 #define RECOVER_FN_FROM_RIP_BYTE2 0x2d  /* third byte of opcode */
    101 
    10293extern natural get_mxcsr();
    10394extern void set_mxcsr(natural);
    10495void enable_fp_exceptions(void);
    105 
    106 #ifdef X8632
    107 /* The 32-bit immediate value in the instruction
    108  * "(mov ($ 0x12345678) (% fn))" at a tagged return address
    109  * refers to the associated function.
    110  */
    111 #define RECOVER_FN_OPCODE 0xbf
    112 #define RECOVER_FN_LENGTH 5
    113 #endif
    11496
    11597void callback_for_gc_notification(ExceptionInformation *xp, TCR *tcr);
Note: See TracChangeset for help on using the changeset viewer.