Ignore:
Timestamp:
Dec 9, 2007, 1:58:36 PM (12 years ago)
Author:
gb
Message:

If the callback to handle a UUO claims that we should skip -1 bytes,
treat that as an indication that the relative pc in the exception
callback frame has been adjusted and update the real PC in the
exception frame. (This scheme allows us to "anchor" a UUO to a
the logical label in the main assembly fragment.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/lisp-kernel/x86-exceptions.c

    r7668 r7861  
    473473  pc program_counter = (pc)xpPC(xp);
    474474  unsigned char op0 = program_counter[0], op1 = program_counter[1];
    475   LispObj rpc = (LispObj) program_counter, errdisp = nrs_ERRDISP.vcell,
    476     save_rbp = xpGPR(xp,Irbp), save_vsp = xpGPR(xp,Isp), xcf;
     475  LispObj rpc, errdisp = nrs_ERRDISP.vcell,
     476    save_rbp = xpGPR(xp,Irbp), save_vsp = xpGPR(xp,Isp), xcf0;
    477477  int skip;
    478478
     
    483483      finish_function_entry(xp);
    484484    }
    485     xcf = create_exception_callback_frame(xp);
    486     skip = callback_to_lisp(tcr, errdisp, xp, xcf, 0, 0, 0, 0);
     485    xcf0 = create_exception_callback_frame(xp);
     486    skip = callback_to_lisp(tcr, errdisp, xp, xcf0, 0, 0, 0, 0);
     487    if (skip == -1) {
     488      xcf *xcf1 = (xcf *)xcf0;
     489      LispObj container = xcf1->containing_uvector;
     490     
     491      rpc = xcf1->relative_pc >> fixnumshift;
     492      if (container == lisp_nil) {
     493        xpPC(xp) = rpc;
     494      } else {
     495        xpPC(xp) = (LispObj)((&(deref(container,1)))+rpc);
     496      }
     497       
     498      skip = 0;
     499    }
    487500    xpGPR(xp,Irbp) = save_rbp;
    488501    xpGPR(xp,Isp) = save_vsp;
Note: See TracChangeset for help on using the changeset viewer.