4 ;;; Cell-Ref and Cell-Set are used to define VOPs like CAR, where the offset to
5 ;;; be read or written is a property of the VOP used.
8 (:args (object :scs (descriptor-reg)))
9 (:results (value :scs (descriptor-reg any-reg)))
10 (:variant-vars offset lowtag)
13 (loadw value object offset lowtag)))
15 (define-vop (cell-set)
16 (:args (object :scs (descriptor-reg))
17 (value :scs (descriptor-reg any-reg null zero)))
18 (:variant-vars offset lowtag)
21 (storew value object offset lowtag)))
23 ;;; Slot-Ref and Slot-Set are used to define VOPs like Closure-Ref, where the
24 ;;; offset is constant at compile time, but varies for different uses. We add
25 ;;; in the stardard g-vector overhead.
27 (define-vop (slot-ref)
28 (:args (object :scs (descriptor-reg)))
29 (:results (value :scs (descriptor-reg any-reg)))
30 (:variant-vars base lowtag)
33 (loadw value object (+ base offset) lowtag)))
35 (define-vop (slot-set)
36 (:args (object :scs (descriptor-reg))
37 (value :scs (descriptor-reg any-reg null zero)))
38 (:variant-vars base lowtag)
41 (storew value object (+ base offset) lowtag)))