Changeset 6557
- Timestamp:
- May 16, 2007, 12:23:04 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/lisp-kernel/x86-exceptions.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/lisp-kernel/x86-exceptions.c
r6540 r6557 274 274 natural nargs = (xpGPR(xp,Inargs)&0xffff)>> fixnumshift; 275 275 signed_natural disp = nargs-3; 276 LispObj *vsp = (LispObj *) xpGPR(xp,Isp) ;276 LispObj *vsp = (LispObj *) xpGPR(xp,Isp), ra = *vsp++; 277 277 278 278 279 279 if (disp > 0) { /* implies that nargs > 3 */ 280 280 vsp[disp] = xpGPR(xp,Irbp); 281 vsp[disp+1] = xpGPR(xp,Ira0);281 vsp[disp+1] = ra; 282 282 xpGPR(xp,Irbp) = (LispObj)(vsp+disp); 283 xpGPR(xp,Isp) = (LispObj)vsp; 283 284 push_on_lisp_stack(xp,xpGPR(xp,Iarg_x)); 284 285 push_on_lisp_stack(xp,xpGPR(xp,Iarg_y)); 285 286 push_on_lisp_stack(xp,xpGPR(xp,Iarg_z)); 286 287 } else { 287 push_on_lisp_stack(xp, xpGPR(xp,Ira0));288 push_on_lisp_stack(xp,ra); 288 289 push_on_lisp_stack(xp,xpGPR(xp,Irbp)); 289 290 xpGPR(xp,Irbp) = xpGPR(xp,Isp); … … 322 323 323 324 f = xpGPR(xp,Ifn); 324 tra = xpGPR(xp,Ira0);325 tra = *(LispObj*)(xpGPR(xp,Isp)); 325 326 if (tag_of(tra) == tag_tra) { 326 327 if ((*((unsigned short *)tra) == RECOVER_FN_FROM_RIP_WORD0) && … … 332 333 tra_f = 0; 333 334 } 335 } else { 336 tra = 0; 334 337 } 335 338 … … 484 487 xpGPR(xp,Irbp) = save_rbp; 485 488 xpGPR(xp,Isp) = save_vsp; 486 xpPC(xp) += skip; 489 if ((op0 == 0xcd) && (op1 == 0xc7)) { 490 /* Continue after an undefined function call. The function 491 that had been undefined has already been called (in the 492 break loop), and a list of the values that it returned 493 in in the xp's %arg_z. A function that returns those 494 values in in the xp's %fn; we just have to adjust the 495 stack (keeping the return address in the right place 496 and discarding any stack args/reserved stack frame), 497 then set nargs and the PC so that that function's 498 called when we resume. 499 */ 500 LispObj *vsp =(LispObj *)save_vsp, ra = *vsp; 501 int nargs = (xpGPR(xp, Inargs) & 0xffff)>>fixnumshift; 502 503 if (nargs > 3) { 504 xpGPR(xp,Isp)=(LispObj) (vsp + (1 + 2 + (nargs - 3))); 505 push_on_lisp_stack(xp,ra); 506 } 507 xpPC(xp) = xpGPR(xp,Ifn); 508 xpGPR(xp,Inargs) = 1<<fixnumshift; 509 } else { 510 xpPC(xp) += skip; 511 } 487 512 return true; 488 513 } else {
Note:
See TracChangeset
for help on using the changeset viewer.
