1 ;;; -*- Package: ALPHA -*-
3 ;;; **********************************************************************
4 ;;; This code was written as part of the CMU Common Lisp project at
5 ;;; Carnegie Mellon University, and has been placed in the public domain.
9 ;;; **********************************************************************
11 ;;; This file contains the Alpha definitions of some general purpose memory
12 ;;; reference VOPs inherited by basic memory reference operations.
14 ;;; Written by Rob MacLachlan
16 ;;; Converted by Sean Hallgren.
23 ;;; Cell-Ref and Cell-Set are used to define VOPs like CAR, where the offset to
24 ;;; be read or written is a property of the VOP used.
26 (define-vop (cell-ref)
27 (:args (object :scs (descriptor-reg)))
28 (:results (value :scs (descriptor-reg any-reg)))
29 (:variant-vars offset lowtag)
32 (loadw value object offset lowtag)))
34 (define-vop (cell-set)
35 (:args (object :scs (descriptor-reg))
36 (value :scs (descriptor-reg any-reg null zero)))
37 (:variant-vars offset lowtag)
40 (storew value object offset lowtag)))
42 ;;; Slot-Ref and Slot-Set are used to define VOPs like Closure-Ref, where the
43 ;;; offset is constant at compile time, but varies for different uses. We add
44 ;;; in the stardard g-vector overhead.
46 (define-vop (slot-ref)
47 (:args (object :scs (descriptor-reg)))
48 (:results (value :scs (descriptor-reg any-reg)))
49 (:variant-vars base lowtag)
52 (loadw value object (+ base offset) lowtag)))
54 (define-vop (slot-set)
55 (:args (object :scs (descriptor-reg))
56 (value :scs (descriptor-reg any-reg null zero)))
57 (:variant-vars base lowtag)
60 (storew value object (+ base offset) lowtag)))