Changeset 10490


Ignore:
Timestamp:
Aug 18, 2008, 3:00:24 PM (11 years ago)
Author:
gb
Message:

More fixes to %APPLY-WITH-METHOD-CONTEXT: if the arglist is non-nil,
don't confuse %temp1/%nargs. Callee seems to expect method-context
to be passed in the tcr, so put it there (and free up %temp0).

Todo: ensure that tcr spill area, tcr.next-method-context are saved/
restored on callbacks (espcially interrupt callbacks.)

Close(r) to fixing ticket:325.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/X86/X8632/x8632-def.lisp

    r10489 r10490  
    379379  ;; Similar to above.
    380380  (popl (@ (% :rcontext) x8632::tcr.save0))     ;save return address
    381   (popl (@ (% :rcontext) x8632::tcr.save1))     ; and magic arg in the spill area
     381  (popl (@ (% :rcontext) x8632::tcr.next-method-context))       ;
    382382  (discard-reserved-frame)
    383383  (movl (% args) (@ (% :rcontext) x8632::tcr.save2))    ;in case of error
     
    391391  (cmpb ($ x8632::fulltag-cons) (% imm0.b)) ;nil is a cons on x8632, but we
    392392  (jne @bad)                                 ; checked for it already.
    393   (%car arg_z temp1)
     393  (add ($ '1) (% nargs))                        ;shorter than lea (imm0 is eax)
     394  (pushl (@ target::cons.car (% arg_z)))
    394395  (%cdr arg_z arg_z)
    395   (add ($ '1) (% nargs))                        ;shorter than lea (imm0 is eax)
    396396  (cmp-reg-to-nil arg_z)
    397   (push (% temp1))
    398397  (jne @loop)
    399398  @done
    400   ;; arg_y about to get clobbered; put function into tcr save area.
    401   (movl (% function) (@ (% :rcontext) target::tcr.save3))
     399  ;; arg_y about to get clobbered; put function into temp0
     400  (movl (% function) (% temp0))
    402401  ;; temp1 (aka nargs) contains number of args just pushed
    403402  (test (% nargs) (% nargs))
     
    415414  @go
    416415  (pushl (@ (% :rcontext) x8632::tcr.save0))     ;return address
    417   (pushl (@ (% :rcontext) x8632::tcr.save3))
    418   (movl (@ (% :rcontext) x8632::tcr.save1) (% next-method-context)) ;aka temp0
    419416  (movapd (% fpzero) (@ (% :rcontext) x8632::tcr.save0)) ;clear out spill area
    420   (ret)                          ;aka temp1
     417  (jmp (% temp0))
    421418  @bad
    422419  (addl (% nargs) (% esp))
Note: See TracChangeset for help on using the changeset viewer.