File tree Expand file tree Collapse file tree 3 files changed +18
-36
lines changed
Expand file tree Collapse file tree 3 files changed +18
-36
lines changed Original file line number Diff line number Diff line change 230230 (seq (Pop r10)
231231 (Pop r8)
232232 (assert-vector r8)
233- (assert-integer r10)
234- (Cmp r10 0 )
235- (Jl 'err )
236- (Xor r8 type-vect) ; r8 = ptr
237- (Mov r9 (Mem r8)) ; r9 = len
238- (Sar r10 int-shift) ; r10 = index
239- (Sub r9 1 )
240- (Cmp r9 r10)
241- (Jl 'err )
242- (Sal r10 3 )
243- (Add r8 r10)
244- (Mov (Mem r8 8 ) rax)
233+ (assert-natural r10)
234+ (Mov r9 (Mem r8 (- type-vect)))
235+ (Cmp r10 r9)
236+ (Jge 'err )
237+ (Sar r10 1 ) ; convert to byte offset
238+ (Mov (Mem r8 r10 (- 8 type-vect)) rax)
245239 (Mov rax (value->bits (void))))]))
246240
247241(define (type-pred mask type)
Original file line number Diff line number Diff line change 218218 (seq (Pop r10)
219219 (Pop r8)
220220 (assert-vector r8)
221- (assert-integer r10)
222- (Cmp r10 0 )
223- (Jl 'err )
224- (Xor r8 type-vect) ; r8 = ptr
225- (Mov r9 (Mem r8)) ; r9 = len
226- (Sar r10 int-shift) ; r10 = index
227- (Sub r9 1 )
228- (Cmp r9 r10)
229- (Jl 'err )
230- (Sal r10 3 )
231- (Add r8 r10)
232- (Mov (Mem r8 8 ) rax)
221+ (assert-natural r10)
222+ (Mov r9 (Mem r8 (- type-vect)))
223+ (Cmp r10 r9)
224+ (Jge 'err )
225+ (Sar r10 1 ) ; convert to byte offset
226+ (Mov (Mem r8 r10 (- 8 type-vect)) rax)
233227 (Mov rax (value->bits (void))))]))
234228
235229(define (type-pred mask type)
Original file line number Diff line number Diff line change 218218 (seq (Pop r10)
219219 (Pop r8)
220220 (assert-vector r8)
221- (assert-integer r10)
222- (Cmp r10 0 )
223- (Jl 'err )
224- (Xor r8 type-vect) ; r8 = ptr
225- (Mov r9 (Mem r8)) ; r9 = len
226- (Sar r10 int-shift) ; r10 = index
227- (Sub r9 1 )
228- (Cmp r9 r10)
229- (Jl 'err )
230- (Sal r10 3 )
231- (Add r8 r10)
232- (Mov (Mem r8 8 ) rax)
221+ (assert-natural r10)
222+ (Mov r9 (Mem r8 (- type-vect)))
223+ (Cmp r10 r9)
224+ (Jge 'err )
225+ (Sar r10 1 ) ; convert to byte offset
226+ (Mov (Mem r8 r10 (- 8 type-vect)) rax)
233227 (Mov rax (value->bits (void))))]))
234228
235229;; OpN Natural -> Asm
You can’t perform that action at this time.
0 commit comments