Changeset 11558


Ignore:
Timestamp:
Dec 28, 2008, 10:23:10 AM (11 years ago)
Author:
gb
Message:

in recognize_alloc_instruction and supporting data, recognize that
Win32 currently keeps the TCR in %es (and therefore instructions
that reference the TCR have a different segment prefix on Win32.)

File:
1 edited

Legend:

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

    r11556 r11558  
    23242324#endif
    23252325#ifdef X8632
     2326#ifdef WIN32_ES_HACK
     2327/* Win32 keeps the TCR in %es */
     2328#define TCR_SEG_PREFIX 0x26     /* %es: */
     2329#else
     2330/* Other platfroms use %fs */
     2331#define TCR_SEG_PREFIX 0x64     /* %fs: */
     2332#endif
    23262333opcode load_allocptr_reg_from_tcr_save_allocptr_instruction[] =
    2327   {0x64,0x8b,0x0d,0x84,0x00,0x00,0x00};
     2334  {TCR_SEG_PREFIX,0x8b,0x0d,0x84,0x00,0x00,0x00};
    23282335opcode compare_allocptr_reg_to_tcr_save_allocbase_instruction[] =
    2329   {0x64,0x3b,0x0d,0x88,0x00,0x00,0x00};
     2336  {TCR_SEG_PREFIX,0x3b,0x0d,0x88,0x00,0x00,0x00};
    23302337opcode branch_around_alloc_trap_instruction[] =
    23312338  {0x77,0x02};
     
    23332340  {0xcd,0xc5};
    23342341opcode clear_tcr_save_allocptr_tag_instruction[] =
    2335   {0x64,0x80,0x25,0x84,0x00,0x00,0x00,0xf8};
     2342  {TCR_SEG_PREFIX,0x80,0x25,0x84,0x00,0x00,0x00,0xf8};
    23362343opcode set_allocptr_header_instruction[] =
    23372344  {0x0f,0x7e,0x41,0xfa};
     
    23462353  case 0x77: return ID_branch_around_alloc_trap_instruction;
    23472354  case 0x0f: return ID_set_allocptr_header_instruction;
    2348   case 0x64:
     2355  case TCR_SEG_PREFIX:
    23492356    switch(program_counter[1]) {
    23502357    case 0x80: return ID_clear_tcr_save_allocptr_tag_instruction;
Note: See TracChangeset for help on using the changeset viewer.