Changeset 9126


Ignore:
Timestamp:
Apr 10, 2008, 5:46:17 AM (11 years ago)
Author:
rme
Message:

Implement %class-of-instance, class-of. Stubs for some GC-related fns.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ia32/level-0/X86/X8632/x8632-utils.lisp

    r8998 r9126  
    266266      (%walk-dynamic-area area func)))
    267267
     268(defx8632lapfunction %class-of-instance ((i arg_z))
     269  (svref i instance.class-wrapper arg_z)
     270  (svref arg_z %wrapper-class arg_z)
     271  (single-value-return))
     272
     273(defx8632lapfunction class-of ((x arg_z))
     274  (check-nargs 1)
     275  (extract-fulltag x imm0)
     276  (cmpb ($ x8632::fulltag-misc) (% imm0.b))
     277  (jne @have-tag)
     278  (extract-subtag x imm0)
     279  @have-tag
     280  (movl (@ '*class-table* (% fn)) (% temp1))
     281  (movl (@ x8632::symbol.vcell (% temp1)) (% temp1))
     282  (movzbl (% imm0.b) (% imm0))
     283  (movl (@ x8632::misc-data-offset (% temp1) (% imm0) 4) (% temp0))
     284  (cmpl ($ x8632::nil-value) (% temp0))
     285  (je @bad)
     286  ;; functionp?
     287  (extract-typecode temp0 imm0)
     288  (cmpb ($ x8632::subtag-function) (% imm0.b))
     289  (jne @ret)
     290  ;; jump to the function
     291  (set-nargs 1)
     292  (jmp (% temp0))
     293  @bad
     294  (load-constant no-class-error fname)
     295  (set-nargs 1)
     296  (jmp (@ x8632::symbol.fcell (% fname)))
     297  @ret
     298  (movl (% temp0) (% arg_z))            ;return frob from table
     299  (single-value-return))
     300
     301(defx8632lapfunction gc ()
     302  (int ($ 3)))
     303
     304(defx8632lapfunction full-gccount ()
     305  (int ($ 3)))
     306
     307(defx8632lapfunction egc ((arg arg_z))
     308  (int ($ 3)))
     309
     310(defx8632lapfunction %configure-egc ((e0size 4)
     311                                     #|(ra 0)|#
     312                                     (e1size arg_y)
     313                                     (e2size arg_z))
     314  (int ($ 3)))
     315
     316(defx8632lapfunction purify ()
     317  (int ($ 3)))
     318
     319(defx8632lapfunction impurify ()
     320  (int ($ 3)))
     321
    268322(defx8632lapfunction use-lisp-heap-gc-threshold ()
    269323  "Try to grow or shrink lisp's heap space, so that the free space is (approximately) equal to the current heap threshold. Return NIL"
     
    333387  (movl ($ x8632::nil-value) (% arg_z))
    334388  (single-value-return))
     389
     390(defx8632lapfunction int3 ()
     391  (int ($ 3))
     392  (single-value-return))
Note: See TracChangeset for help on using the changeset viewer.