Changeset 5457


Ignore:
Timestamp:
Nov 3, 2006, 11:52:47 AM (18 years ago)
Author:
Gary Byers
Message:

SParef2, .SPaset2. More to come ...

Location:
trunk/ccl/lisp-kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/lisp-kernel/x86-spentry64.s

    r5423 r5457  
    43244324_endsubp(callback)
    43254325
     4326/* arg_x = array, arg_y = i, arg_z = j. Typecheck everything.
     4327   We don't know whether the array is alleged to be simple or
     4328   not, and don't know anythng about the element type.  */
     4329               
     4330_spentry(aref2)
     4331        __(testb $fixnummask,%arg_y_b)
     4332        __(je,pt 0f)
     4333        __(uuo_error_reg_not_fixnum(Rarg_y))
     43340:      __(testb $fixnummask,%arg_z_b)
     4335        __(je,pt 1f)
     4336        __(uuo_error_reg_not_fixnum(Rarg_z))
     43371:      __(extract_typecode(%arg_x,%imm0))
     4338        __(cmpb $subtag_arrayH,%imm0_b)
     4339        __(jne 2f)
     4340        __(cmpq $2<<fixnumshift,arrayH.rank(%arg_x))
     4341        __(je,pt 3f)
     43422:      __(uuo_error_reg_not_type(Rarg_x,error_object_not_array_2d))
     43433:      __(cmpq arrayH.dim0(%arg_x),%arg_y)
     4344        __(jb,pt 4f)
     4345        __(uuo_error_array_bounds(Rarg_y,Rarg_x))
     43464:      __(movq arrayH.dim0+node_size(%arg_x),%imm0)
     4347        __(cmpq %imm0,%arg_z)
     4348        __(jb,pt 5f)
     4349        __(uuo_error_array_bounds(Rarg_z,Rarg_x))
     43505:      __(unbox_fixnum(%imm0,%imm0))
     4351        __(mulq %arg_y)         /* imm0 <- imm0 * arg_y */
     4352        __(addq %imm0,%arg_z)
     4353        __(movq %arg_x,%arg_y)
     43546:      __(movq arrayH.data_vector(%arg_y),%arg_y)
     4355        __(extract_subtag(%arg_y,%imm1_b))
     4356        __(cmpb $subtag_vectorH,%imm1_b)
     4357        __(ja C(misc_ref_common))
     4358        __(addq arrayH.displacement(%arg_x),%arg_z)
     4359        __(movq %arg_y,%arg_x)
     4360        __(jmp 6b)
     4361_endsubp(aref2)
     4362
     4363/* As with aref2, but temp0 = array, arg_x = i, arg_y = j, arg_z = new_value */
     4364_spentry(aset2)
     4365        __(testb $fixnummask,%arg_x_b)
     4366        __(je,pt 0f)
     4367        __(uuo_error_reg_not_fixnum(Rarg_x))
     43680:      __(testb $fixnummask,%arg_y_b)
     4369        __(je,pt 1f)
     4370        __(uuo_error_reg_not_fixnum(Rarg_y))
     43711:      __(extract_typecode(%temp0,%imm0))
     4372        __(cmpb $subtag_arrayH,%imm0_b)
     4373        __(jne 2f)
     4374        __(cmpq $2<<fixnumshift,arrayH.rank(%temp0))
     4375        __(je,pt 3f)
     43762:      __(uuo_error_reg_not_type(Rtemp0,error_object_not_array_2d))
     43773:      __(cmpq arrayH.dim0(%temp0),%arg_x)
     4378        __(jb,pt 4f)
     4379        __(uuo_error_array_bounds(Rarg_x,Rtemp0))
     43804:      __(movq arrayH.dim0+node_size(%arg_x),%imm0)
     4381        __(cmpq %imm0,%arg_y)
     4382        __(jb,pt 5f)
     4383        __(uuo_error_array_bounds(Rarg_y,Rtemp0))
     43845:      __(unbox_fixnum(%imm0,%imm0))
     4385        __(mulq %arg_x)         /* imm0 <- imm0 * arg_x */
     4386        __(addq %imm0,%arg_y)
     4387        __(movq %temp0,%arg_x)
     43886:      __(movq arrayH.data_vector(%arg_x),%arg_x)
     4389        __(extract_subtag(%arg_x,%imm1_b))
     4390        __(cmpb $subtag_vectorH,%imm1_b)
     4391        __(ja C(misc_set_common))
     4392        __(addq arrayH.displacement(%temp0),%arg_y)
     4393        __(movq %arg_x,%temp0)
     4394        __(jmp 6b)
     4395_endsubp(aset2)
     4396       
    43264397_spentry(poweropen_callbackX)
    43274398_endsubp(poweropen_callbackX)
     
    43924463_spentry(breakpoint)
    43934464_endsubp(breakpoint)
    4394        
    4395 _spentry(unused_0)
    4396 _endsubp(unused_0)
    4397 
    4398 _spentry(unused_1)
    4399 _endsubp(unused_1)
     4465
    44004466               
    44014467_spentry(unused_2)
  • trunk/ccl/lisp-kernel/x86-spjump64.s

    r4315 r5457  
    6565        _spjump(keyword_bind)
    6666        _spjump(ffcall)
    67         _spjump(unused_0)
     67        _spjump(aref2)
    6868        _spjump(ksignalerr)
    6969        _spjump(stack_rest_arg)
     
    112112        _spjump(stack_misc_alloc_init)
    113113        _spjump(set_hash_key)
    114         _spjump(unused_1)
     114        _spjump(aset2)
    115115        _spjump(callbuiltin)
    116116        _spjump(callbuiltin0)
Note: See TracChangeset for help on using the changeset viewer.