(defun write-primitive-object (obj)
;; writing primitive object layouts
- (format t "#ifndef LANGUAGE_ASSEMBLY~2%")
- (format t
- "struct ~A {~%"
- (substitute #\_ #\-
- (string-downcase (string (sb!vm:primitive-object-name obj)))))
- (when (sb!vm:primitive-object-widetag obj)
- (format t " lispobj header;~%"))
- (dolist (slot (sb!vm:primitive-object-slots obj))
- (format t " ~A ~A~@[[1]~];~%"
- (getf (sb!vm:slot-options slot) :c-type "lispobj")
- (substitute #\_ #\-
- (string-downcase (string (sb!vm:slot-name slot))))
- (sb!vm:slot-rest-p slot)))
+ (format t "#ifndef LANGUAGE_ASSEMBLY~2%")
+ (format t
+ "struct ~A {~%"
+ (substitute #\_ #\-
+ (string-downcase (string (sb!vm:primitive-object-name obj)))))
+ (when (sb!vm:primitive-object-widetag obj)
+ (format t " lispobj header;~%"))
+ (dolist (slot (sb!vm:primitive-object-slots obj))
+ (format t " ~A ~A~@[[1]~];~%"
+ (getf (sb!vm:slot-options slot) :c-type "lispobj")
+ (substitute #\_ #\-
+ (string-downcase (string (sb!vm:slot-name slot))))
+ (sb!vm:slot-rest-p slot)))
(format t "};~2%")
- (format t "#else /* LANGUAGE_ASSEMBLY */~2%")
- (let ((name (sb!vm:primitive-object-name obj))
- (lowtag (eval (sb!vm:primitive-object-lowtag obj))))
- (when lowtag
- (dolist (slot (sb!vm:primitive-object-slots obj))
- (format t "#define ~A_~A_OFFSET ~D~%"
- (substitute #\_ #\- (string name))
- (substitute #\_ #\- (string (sb!vm:slot-name slot)))
- (- (* (sb!vm:slot-offset slot) sb!vm:n-word-bytes) lowtag)))
+ (format t "#else /* LANGUAGE_ASSEMBLY */~2%")
+ (format t "/* These offsets are SLOT-OFFSET * N-WORD-BYTES - LOWTAG~%")
+ (format t " * so they work directly on tagged addresses. */~2%")
+ (let ((name (sb!vm:primitive-object-name obj))
+ (lowtag (eval (sb!vm:primitive-object-lowtag obj))))
+ (when lowtag
+ (dolist (slot (sb!vm:primitive-object-slots obj))
+ (format t "#define ~A_~A_OFFSET ~D~%"
+ (substitute #\_ #\- (string name))
+ (substitute #\_ #\- (string (sb!vm:slot-name slot)))
+ (- (* (sb!vm:slot-offset slot) sb!vm:n-word-bytes) lowtag)))
(terpri)))
- (format t "#endif /* LANGUAGE_ASSEMBLY */~2%"))
+ (format t "#endif /* LANGUAGE_ASSEMBLY */~2%"))
(defun write-structure-object (dd)
(flet ((cstring (designator)
.word NIL /* name */
.word NIL /* arglist */
.word NIL /* type */
+ .word NIL /* xrefs */
LEAF(undefined_tramp)
/* Point reg_CODE to the header and tag it as function, since
the debugger regards a function pointer in reg_CODE which
doesn't point to a code object as undefined function. */
lui reg_CODE, %hi(undefined_tramp)
addiu reg_CODE, %lo(undefined_tramp)
- addiu reg_CODE, - 24 + FUN_POINTER_LOWTAG
+ addiu reg_CODE, -SIMPLE_FUN_CODE_OFFSET
.set noreorder
b 1f
break 0x0, trap_Cerror
.word NIL /* name */
.word NIL /* arglist */
.word NIL /* type */
+ .word NIL /* xrefs */
LEAF(closure_tramp)
lw reg_LEXENV, FDEFN_FUN_OFFSET(reg_FDEFN)
lw reg_CODE, CLOSURE_FUN_OFFSET(reg_LEXENV)
.word NIL
.word NIL
.word NIL
+ .word NIL
lw reg_LEXENV, FUNCALLABLE_INSTANCE_FUNCTION_OFFSET(reg_LEXENV)
lw reg_CODE, CLOSURE_FUN_OFFSET(reg_LEXENV)
/* Function is an indirect closure */
lwz reg_CODE,SIMPLE_FUN_SELF_OFFSET(reg_LEXENV)
- addi reg_LIP,reg_CODE,6*4-FUN_POINTER_LOWTAG
+ addi reg_LIP,reg_CODE,SIMPLE_FUN_CODE_OFFSET
mtctr reg_LIP
slwi reg_NARGS,reg_NL2,2
bctr
.long NIL /* name */
.long NIL /* arglist */
.long NIL /* type */
+ .long NIL /* xref */
CSYMBOL(undefined_tramp):
/* Point reg_CODE to the header and tag it as function, since
the debugger regards a function pointer in reg_CODE which
doesn't point to a code object as undefined function. */
bcl 20,31,.+4 /* get address of the next instruction */
- mflr reg_CODE /* header is 7 words back from here */
- addi reg_CODE,reg_CODE,-7*4+FUN_POINTER_LOWTAG
+ mflr reg_CODE /* header 1 extra word back from here */
+ addi reg_CODE,reg_CODE,-(SIMPLE_FUN_CODE_OFFSET+4)
twllei reg_ZERO,trap_Cerror
.byte 4
.long NIL
.long NIL
.long NIL
+ .long NIL
lwz reg_LEXENV,FUNCALLABLE_INSTANCE_FUNCTION_OFFSET(reg_LEXENV)
lwz reg_FDEFN,CLOSURE_FUN_OFFSET(reg_LEXENV)
addi reg_LIP,reg_FDEFN,SIMPLE_FUN_CODE_OFFSET
.word NIL
.word NIL
.word NIL
+ .word NIL
b 1f
unimp trap_Cerror
.word NIL
.word NIL
.word NIL
+ .word NIL
ld [reg_FDEFN+FDEFN_FUN_OFFSET], reg_LEXENV
ld [reg_LEXENV+CLOSURE_FUN_OFFSET], reg_CODE
.word NIL
.word NIL
.word NIL
+ .word NIL
ld [reg_LEXENV+FUNCALLABLE_INSTANCE_FUNCTION_OFFSET], reg_LEXENV
ld [reg_LEXENV+CLOSURE_FUN_OFFSET], reg_CODE
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.0.20"
+"1.0.0.21"