Changeset 6480


Ignore:
Timestamp:
May 9, 2007, 7:42:45 AM (15 years ago)
Author:
gb
Message:

New calling sequence.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-0/X86/x86-misc.lisp

    r6180 r6480  
    2727;;; Does no arg checking of any kind.  Really.
    2828
    29 (defx86lapfunction %copy-ptr-to-ivector ((src (* 1 x8664::node-size) )
    30                                          (src-byte-offset 0)
     29(defx86lapfunction %copy-ptr-to-ivector ((src (* 2 x8664::node-size) )
     30                                         (src-byte-offset (* 1 x8664::node-size))
     31                                         #|(ra 0)|#
    3132                                         (dest arg_x)
    3233                                         (dest-byte-offset arg_y)
     
    3536        (rsrc-byte-offset temp1))
    3637    (testq (% nbytes) (% nbytes))
    37     (popq (% rsrc-byte-offset))         ; boxed src-byte-offset
    38     (popq (% rsrc))                     ; src macptr
     38    (movq (@ src-byte-offset (% rsp)) (% rsrc-byte-offset))         ; boxed src-byte-offset
     39    (movq (@ src (% rsp)) (% rsrc))     ; src macptr
    3940    (jmp @test)
    4041    @loop
     
    5051    (jne @loop)
    5152    (movq (% dest) (% arg_z))
    52     (discard-reserved-frame)
    53     (single-value-return)))
    54 
    55 (defx86lapfunction %copy-ivector-to-ptr ((src (* 1 x8664::node-size))
    56                                          (src-byte-offset 0)
     53    (single-value-return 4)))
     54
     55(defx86lapfunction %copy-ivector-to-ptr ((src (* 2 x8664::node-size))
     56                                         (src-byte-offset (* 1 x8664::node-size))
     57                                         #|(ra 0)|#
    5758                                         (dest arg_x)
    5859                                         (dest-byte-offset arg_y)
     
    6162        (rsrc-byte-offset temp1))
    6263    (testq (% nbytes) (% nbytes))
    63     (popq (% rsrc-byte-offset))
    64     (popq (% rsrc))
     64    (movq (@ src-byte-offset (% rsp)) (% rsrc-byte-offset))
     65    (movq (@ src (% rsp)) (% rsrc))
    6566    (jmp @test)
    6667    @loop
     
    7677    (jne @loop)
    7778    (movq (% dest) (% arg_z))
    78     (discard-reserved-frame)
    79     (single-value-return)))
    80 
    81 
    82 
    83 (defx86lapfunction %copy-ivector-to-ivector ((src-offset 8)
    84                                              (src-byte-offset 0)
     79    (single-value-return 4)))
     80
     81
     82
     83(defx86lapfunction %copy-ivector-to-ivector ((src-offset 16)
     84                                             (src-byte-offset 8)
     85                                             #|(ra 0)|#
    8586                                             (dest arg_x)
    8687                                             (dest-byte-offset arg_y)
     
    8889  (let ((rsrc temp0)
    8990        (rsrc-byte-offset temp1))
    90     (pop (% rsrc-byte-offset))
    91     (pop (% rsrc))
     91    (movq (@ src-byte-offset (% rsp)) (% rsrc-byte-offset))
     92    (movq (@ src-offset (% rsp)) (% rsrc))
    9293    (cmpq (% dest) (% rsrc))
    9394    (jne @front)
     
    108109    (jne @front-loop)
    109110    (movq (% dest) (% arg_z))
    110     (discard-reserved-frame)
    111     (single-value-return)
     111    (single-value-return 4)
    112112    @back
    113113    (addq (% nbytes) (% rsrc-byte-offset))
     
    126126    (jne @back-loop)
    127127    (movq (% dest) (% arg_z))
    128     (discard-reserved-frame)
    129     (single-value-return)))
     128    (single-value-return 4)))
    130129 
    131130
    132 (defx86lapfunction %copy-gvector-to-gvector ((src (* 1 x8664::node-size))
    133                                              (src-element 0)
     131(defx86lapfunction %copy-gvector-to-gvector ((src (* 2 x8664::node-size))
     132                                             (src-element (* 1 x8664::node-size))
     133                                             #|(ra 0)|#
    134134                                             (dest arg_x)
    135135                                             (dest-element arg_y)
     
    138138        (rsrc-element imm1)
    139139        (val temp1))
    140     (popq (% rsrc-element))
    141     (popq (% rsrc))
     140    (movq (@ src-element (% rsp)) (% rsrc-element))
     141    (movq (@ src (% rsp)) (% rsrc))
    142142    (cmpq (% rsrc) (% dest))
    143143    (jne @front)
     
    156156    (jne @front-loop)
    157157    (movq (% dest) (% arg_z))
    158     (discard-reserved-frame)
    159     (single-value-return)
     158    (single-value-return 4)
    160159    @back
    161160    (addq (% nelements) (% rsrc-element))
     
    172171    (jne @back-loop)
    173172    (movq (% dest) (% arg_z))
    174     (discard-reserved-frame)
    175     (single-value-return)))
     173    (single-value-return 4)))
    176174
    177175(defx86lapfunction %heap-bytes-allocated ()
     
    192190(defx86lapfunction values ()
    193191  (:arglist (&rest values))
     192  (save-frame-variable-arg-count)
    194193  (push-argregs)
    195   (movzwl (%w nargs) (%l nargs))
    196   (rcmpw (% nargs) ($ '3))
    197   (lea (@ (% rsp) (%q nargs)) (% temp0))
    198   (lea (@ '2 (% temp0)) (% temp1))
    199   (cmovaq (% temp1) (% temp0))
    200   (jmp-subprim .SPvalues))
     194  (jmp-subprim .SPnvalret))
    201195
    202196(defx86lapfunction rdtsc ()
     
    327321
    328322;;; This needs to be done out-of-line, to handle EGC memoization.
    329 (defx86lapfunction %store-node-conditional ((offset 0) (object arg_x) (old arg_y) (new arg_z))
    330   (pop (% temp0))
    331   (discard-reserved-frame)
    332   (jmp-subprim .SPstore-node-conditional))
    333 
    334 (defx86lapfunction %store-immediate-conditional ((offset 0) (object arg_x) (old arg_y) (new arg_z))
    335   (pop (% temp0))
    336   (discard-reserved-frame)
     323(defx86lapfunction %store-node-conditional ((offset 8) #|(ra 0)|# (object arg_x) (old arg_y) (new arg_z))
     324  (movq (@ offset (% rsp)) (% temp0))
     325  (save-simple-frame)
     326  (call-subprim .SPstore-node-conditional)
     327  (restore-simple-frame)
     328  (single-value-return 3))
     329
     330(defx86lapfunction %store-immediate-conditional ((offset 8) #|(ra 0)|# (object arg_x) (old arg_y) (new arg_z))
     331  (movq (@ offset (% rsp)) (% temp0))
    337332  (unbox-fixnum temp0 imm1)
    338333  @again
     
    344339  (jne @again)
    345340  (movl ($ x8664::t-value) (%l arg_z))
    346   (single-value-return)
     341  (single-value-return 3)
    347342  @lose
    348343  (movl ($ x8664::nil-value) (%l arg_z))
    349   (single-value-return))
     344  (single-value-return 3))
    350345
    351346(defx86lapfunction set-%gcable-macptrs% ((ptr x8664::arg_z))
     
    744739  (jmp done)
    745740  (:tra done)
     741  (recover-fn-from-rip)
    746742  (movq ($ 0) (@ (% :rcontext) x8664::tcr.safe-ref-address))
    747743  (movq (% imm0) (@ x8664::macptr.address (% dest)))
     
    749745  (single-value-return))
    750746
     747;;; This was intentded to work around a bug in #_nanosleep in early
     748;;; Leopard test releases.  It's probably not necessary any more; is
     749;;; it still called ?
    751750(defx86lapfunction %valid-remaining-timespec-time-p ((seconds arg_y) (ptr arg_z))
    752751  (macptr-ptr arg_z imm0)
Note: See TracChangeset for help on using the changeset viewer.