Changeset 14054 for branches


Ignore:
Timestamp:
Jul 27, 2010, 1:32:28 AM (9 years ago)
Author:
gz
Message:

Bounds checking for tlb indices (r13745, r13752)

Location:
branches/qres/ccl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/qres/ccl

  • branches/qres/ccl/level-0/X86/x86-symbol.lisp

    r13070 r14054  
    164164    @done
    165165    (single-value-return)))
     166
     167;;; Ensure that the current thread's thread-local-binding vector
     168;;; contains room for an entry with index INDEX.
     169;;; Return the fixnum-tagged tlb vector.
     170(defx86lapfunction %ensure-tlb-index ((idx arg_z))
     171  (cmp (:rcontext x8664::tcr.tlb-limit) (% idx))
     172  (jb @ok)
     173  (push (% arg_z))                      ; exception handler will pop this
     174  (ud2a)  (:byte 1)                     ; tlb_too_small()
     175  @ok
     176  (mov (:rcontext x8664::tcr.tlb-pointer) (% arg_z))
     177  (single-value-return))
     178
    166179) ; #+x8664-target
     180
     181
     182
     183
  • branches/qres/ccl/level-1/l1-lisp-threads.lisp

    r13090 r14054  
    10651065             (let* ((idx (symbol-binding-index sym))
    10661066                    (byte-idx (ash idx target::fixnum-shift))
    1067                     (binding-vector (%fixnum-ref (%current-tcr) target::tcr.tlb-pointer))
     1067                    (binding-vector (%ensure-tlb-index idx))
    10681068                    (old-value (%fixnum-ref  binding-vector byte-idx)))
    10691069             (setf (%fixnum-ref binding-vector byte-idx) new-value
Note: See TracChangeset for help on using the changeset viewer.