Raymond Toy pushed to branch issue-97-define-ud2-inst at cmucl / cmucl

Commits:

2 changed files:

Changes:

  • src/lisp/arch.h
    ... ... @@ -13,7 +13,14 @@
    13 13
     
    
    14 14
     extern char *arch_init(fpu_mode_t);
    
    15 15
     
    
    16
    +/*
    
    17
    + * Skip over the trap instructions for an error trap and also skip
    
    18
    + * over anly following bytes used to encode information for an
    
    19
    + * error-trap or cerror-trap.  The PC in the context is set to address
    
    20
    + * just past the trap instruction and data bytes (if any).
    
    21
    + */
    
    16 22
     extern void arch_skip_instruction(os_context_t * scp);
    
    23
    +
    
    17 24
     extern boolean arch_pseudo_atomic_atomic(os_context_t * scp);
    
    18 25
     extern void arch_set_pseudo_atomic_interrupted(os_context_t * scp);
    
    19 26
     extern os_vm_address_t arch_get_bad_addr(HANDLER_ARGS);
    

  • src/lisp/x86-arch.c
    ... ... @@ -141,12 +141,9 @@ arch_init(fpu_mode_t mode)
    141 141
     
    
    142 142
     
    
    143 143
     /*
    
    144
    - * Assuming we get here via an INT3 xxx instruction, the PC now
    
    145
    - * points to the interrupt code (lisp value) so we just move past
    
    146
    - * it. Skip the code, then if the code is an error-trap or
    
    147
    - * Cerror-trap then skip the data bytes that follow.
    
    144
    + * Skip the UD1 instruction, and any data bytes associated with the
    
    145
    + * trap.
    
    148 146
      */
    
    149
    -
    
    150 147
     void
    
    151 148
     arch_skip_instruction(os_context_t * context)
    
    152 149
     {
    
    ... ... @@ -155,7 +152,7 @@ arch_skip_instruction(os_context_t * context)
    155 152
         DPRINTF(debug_handlers,
    
    156 153
                 (stderr, "[arch_skip_inst at %lx>]\n", SC_PC(context)));
    
    157 154
     
    
    158
    -    /* Get and skip the lisp error code. */
    
    155
    +    /* Get the address of the beginning of the UD1 instruction */
    
    159 156
         char* pc = (char *) SC_PC(context);
    
    160 157
         
    
    161 158
         /*