Changeset 10004


Ignore:
Timestamp:
Jul 11, 2008, 1:22:25 AM (11 years ago)
Author:
gz
Message:

Merge r8163 from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/level-0/X86/x86-misc.lisp

    r9940 r10004  
    293293  (trap-unless-typecode= ptr x8664::subtag-macptr)
    294294  (call-subprim .SPgetu64)
    295   (macptr-ptr ptr ptr)
     295  (macptr-ptr ptr imm2)
    296296  (unbox-fixnum offset imm1)
    297   (movq (% imm0) (@ (% ptr) (% imm1)))
     297  (movq (% imm0) (@ (% imm2) (% imm1)))
    298298  (restore-simple-frame)
    299299  (single-value-return))
     
    306306  (trap-unless-typecode= ptr x8664::subtag-macptr)
    307307  (call-subprim .SPgets64)
    308   (macptr-ptr ptr ptr)
     308  (macptr-ptr ptr imm2)
    309309  (unbox-fixnum offset imm1)
    310   (movq (% imm0) (@ (% ptr) (% imm1)))
     310  (movq (% imm0) (@ (% imm2) (% imm1)))
    311311  (restore-simple-frame)
    312312  (single-value-return))
     
    449449
    450450(defx86lapfunction %atomic-incf-ptr ((ptr arg_z))
    451   (macptr-ptr ptr ptr)
    452   @again
    453   (movq (@ (% ptr)) (% rax))
     451  (macptr-ptr ptr imm2)
     452  @again
     453  (movq (@ (% imm2)) (% rax))
    454454  (lea (@ 1 (% rax)) (% imm1))
    455455  (lock)
    456   (cmpxchgq (% imm1) (@ (% ptr)))
     456  (cmpxchgq (% imm1) (@ (% imm2)))
    457457  (jne @again)
    458458  (box-fixnum imm1 arg_z)
     
    460460
    461461(defx86lapfunction %atomic-incf-ptr-by ((ptr arg_y) (by arg_z))
    462   (macptr-ptr ptr ptr)
    463   @again
    464   (movq (@ (% ptr)) (% rax))
     462  (macptr-ptr ptr imm2)
     463  @again
     464  (movq (@ (% imm2)) (% rax))
    465465  (unbox-fixnum by imm1)
    466466  (add (% rax) (% imm1))
    467467  (lock)
    468   (cmpxchgq (% imm1) (@ (% ptr)))
     468  (cmpxchgq (% imm1) (@ (% imm2)))
    469469  (jnz @again)
    470470  (box-fixnum imm1 arg_z)
     
    473473
    474474(defx86lapfunction %atomic-decf-ptr ((ptr arg_z))
    475   (macptr-ptr ptr ptr)
    476   @again
    477   (movq (@ (% ptr)) (% rax))
     475  (macptr-ptr ptr imm2)
     476  @again
     477  (movq (@ (% imm2)) (% rax))
    478478  (lea (@ -1 (% rax)) (% imm1))
    479479  (lock)
    480   (cmpxchgq (% imm1) (@ (% ptr)))
     480  (cmpxchgq (% imm1) (@ (% imm2)))
    481481  (jnz @again)
    482482  (box-fixnum imm1 arg_z)
     
    484484
    485485(defx86lapfunction %atomic-decf-ptr-if-positive ((ptr arg_z))
    486   (macptr-ptr ptr ptr)                  ;must be fixnum-aligned
    487   @again
    488   (movq (@ (% ptr)) (% rax))
     486  (macptr-ptr ptr imm2)
     487  @again
     488  (movq (@ (% imm2)) (% rax))
    489489  (testq (% rax) (% rax))
    490490  (lea (@ -1 (% rax)) (% imm1))
    491491  (jz @done)
    492492  (lock)
    493   (cmpxchgq (% imm1) (@ (% ptr)))
     493  (cmpxchgq (% imm1) (@ (% imm2)))
    494494  (jnz @again)
    495495  @done
     
    509509;;; was equal to OLDVAL.  Return the old value
    510510(defx86lapfunction %ptr-store-conditional ((ptr arg_x) (expected-oldval arg_y) (newval arg_z))
    511   (macptr-ptr ptr ptr)                  ;  must be fixnum-aligned
    512   @again
    513   (movq (@ (% ptr)) (% imm0))
     511  (macptr-ptr ptr imm2)
     512  @again
     513  (movq (@ (% imm2)) (% imm0))
    514514  (box-fixnum imm0 temp0)
    515515  (cmpq (% temp0) (% expected-oldval))
     
    517517  (unbox-fixnum newval imm1)
    518518  (lock)
    519   (cmpxchgq (% imm1) (@ (% ptr)))
     519  (cmpxchgq (% imm1) (@ (% imm2)))
    520520  (jne @again)
    521521  @done
     
    539539(defx86lapfunction xchgl ((newval arg_y) (ptr arg_z))
    540540  (unbox-fixnum newval imm0)
    541   (macptr-ptr ptr arg_y)                ; had better be aligned
     541  (macptr-ptr ptr imm1)
    542542  (lock)                                ; implicit ?
    543   (xchgl (% imm0.l) (@ (% arg_y)))
     543  (xchgl (% imm0.l) (@ (% imm1)))
    544544  (box-fixnum imm0 arg_z)
    545545  (single-value-return))
Note: See TracChangeset for help on using the changeset viewer.