Index: /branches/ia32/lisp-kernel/x86-spentry32.s
===================================================================
--- /branches/ia32/lisp-kernel/x86-spentry32.s	(revision 9675)
+++ /branches/ia32/lisp-kernel/x86-spentry32.s	(revision 9676)
@@ -59,7 +59,8 @@
 _endsubp(misc_ref)
 
-/* %imm0 = subtag, %arg_y = vector, %arg_z = index. */
+/* %imm0_b = subtag, %arg_y = vector, %arg_z = index. */
 /* Bounds/type-checking done in caller. */
 _startfn(C(misc_ref_common))
+	__(movzbl %imm0_b,%imm0)
 	__(leal local_label(misc_ref_jmp)(,%imm0,4),%imm0)
 	__(jmp *(%imm0))
@@ -880,12 +881,8 @@
 	__(movl %arg_y,%imm0)
 	__(shrl $1,%imm0)
-	__(movl %arg_z,%arg_y)
-	/* If there's a better way, I'd be glad to hear of it. */
-	__(shll $8-fixnumshift,%arg_z)
-	__(movb %arg_z_bh,misc_data_offset(%temp0,%imm0))
-	__(xorb %arg_z_bh,%arg_z_bh)
-	__(shrl $8,%arg_z)
-	__(movb %arg_z_bh,misc_data_offset+1(%temp0,%imm0))
-	__(movl %arg_y,%arg_z)
+	__(mark_as_imm(%temp1))
+	__(unbox_fixnum(%arg_z,%temp1))
+	__(movw %temp1_w,misc_data_offset(%temp0,%imm0))
+	__(mark_as_node(%temp1))
 	__(ret)
 local_label(misc_set_s16):
@@ -899,12 +896,8 @@
 	__(movl %arg_y,%imm0)
 	__(shrl $1,%imm0)
-	__(movl %arg_z,%arg_y)
-	/* If there's a better way, I'd be glad to hear of it. */
-	__(shll $8-fixnumshift,%arg_z)
-	__(movb %arg_z_bh,misc_data_offset(%temp0,%imm0))
-	__(xorb %arg_z_bh,%arg_z_bh)
-	__(sarl $8,%arg_z)
-	__(movb %arg_z_bh,misc_data_offset+1(%temp0,%imm0))
-	__(movl %arg_y,%arg_z)
+	__(mark_as_imm(%temp1))
+	__(unbox_fixnum(%arg_z,%temp1))
+	__(movw %temp1_w,misc_data_offset(%temp0,%imm0))
+	__(mark_as_node(%temp1))
 	__(ret)
 local_label(misc_set_bit_vector):
@@ -1155,5 +1148,5 @@
 	__(jne local_label(_throw_loop))
         __(push %ra0)
-	__(uuo_error_reg_not_tag(Rtemp0,subtag_catch_frame))
+	__(uuo_error_reg_not_tag(Rarg_y,subtag_catch_frame))
         __(pop %ra0)
 	__(jmp _SPthrow)
@@ -1163,4 +1156,5 @@
 	__(movd %mm0,%nargs)
 	__(jne local_label(_throw_multiple))
+	__(movl $nil_value,%arg_z)
 	__(test %nargs,%nargs)
 	__(je local_label(_throw_one_value))
@@ -1168,5 +1162,4 @@
 	__(add %nargs,%esp)
 local_label(_throw_one_value):
-	__(movl $nil_value,%arg_z)
 	__(movl $local_label(_threw_one_value),%ra0)
 	__(jmp _SPnthrow1value)
@@ -2779,7 +2772,207 @@
 _endsubp(misc_alloc)
 
+/* N.B. arg count word in %imm0, not %nargs */
+/* no %whole_reg;  it's in %rcontext:tcr.save0 */
+/* %arg_reg is %temp1, key vector in %arg_y */ 
 _startfn(C(destbind1))
-	__(int $3)
-	__(jmp *%ra0)
+	__(uuo_error_debug_trap)
+dnl 	/* Save entry %esp in case of error   */
+dnl 	__(movd %esp,%mm0)
+dnl 	/* Save arg count word */
+dnl 	__(movd %imm0,%mm1)
+dnl 	/* Extract required arg count.   */
+dnl         __(testb %imm0_b,%imm0_b)
+dnl 	__(je local_label(opt))		/* skip if no required args   */
+dnl 	__(movzbl %imm0_b,%imm0)
+dnl local_label(req_loop):	
+dnl 	__(compare_reg_to_nil(%arg_reg))
+dnl 	__(je local_label(toofew))
+dnl 	__(movb $fulltagmask,%imm0_bh)
+dnl 	__(andb %arg_reg_b,%imm0_bh)
+dnl 	__(cmpb $fulltag_cons,%imm0_bh)
+dnl 	__(jne local_label(badlist))
+dnl 	__(subb $1,%imm0_b)
+dnl 	__(pushl cons.car(%arg_reg))
+dnl 	__(_cdr(%arg_reg,%arg_reg))
+dnl 	__(jne local_label(req_loop))
+dnl 	__(movd %mm1,%imm0)
+dnl local_label(opt):
+dnl 	__(movzbl %imm0_bh,%imm0)
+dnl 	__(test %imm0,%imm0)
+dnl 	__(je local_label(rest_keys))
+dnl 	__(btl $initopt_bit,%imm0)
+dnl 	__(jc local_label(opt_supp))
+dnl 	/* 'simple' &optionals:	 no supplied-p, default to nil.   */
+dnl local_label(simple_opt_loop):
+dnl 	__(compare_reg_to_nil(%arg_reg))
+dnl 	__(je local_label(default_simple_opt))
+dnl 	__(movb $fulltagmask,%imm0_bh)
+dnl 	__(andb %arg_reg_b,%imm0_bh)
+dnl 	__(cmpb $fulltag_cons,%imm0_bh)
+dnl 	__(jne local_label(badlist))
+dnl 	__(subb $1,%imm0_b)
+dnl 	__(pushl cons.car(%arg_reg))
+dnl 	__(_cdr(%arg_reg,%arg_reg))
+dnl 	__(jne local_label(simple_opt_loop))
+dnl 	__(jmp local_label(rest_keys))
+dnl local_label(default_simple_opt):
+dnl 	__(subb $1,%imm0_b)
+dnl 	__(pushl $nil_value)
+dnl 	__(jne local_label(default_simple_opt))
+dnl 	__(jmp local_label(rest_keys))
+dnl local_label(opt_supp):
+dnl 	__(movb $fulltagmask,%imm0_bh)
+dnl 	__(andb %arg_reg_b,%imm0_bh)
+dnl 	__(compare_reg_to_nil(%arg_z))
+dnl 	__(je local_label(default_hard_opt))
+dnl 	__(cmpb $fulltag_cons,%imm0_bh)
+dnl 	__(jne local_label(badlist))
+dnl 	__(subb $1,%imm0_b)
+dnl 	__(pushl cons.car(%arg_reg))
+dnl 	__(_cdr(%arg_reg,%arg_reg))
+dnl 	__(push $t_value)
+dnl 	__(jne local_label(opt_supp))
+dnl 	__(jmp local_label(rest_keys))
+dnl local_label(default_hard_opt):
+dnl 	__(subb $1,%imm0_b)
+dnl 	__(push $nil_value)
+dnl 	__(push $nil_value)
+dnl 	__(jne local_label(default_hard_opt))
+dnl local_label(rest_keys):	
+dnl 	__(btl $restp_bit,%imm0)
+dnl 	__(jc local_label(have_rest))
+dnl 	__(btl $keyp_bit,%imm0)
+dnl 	__(jc local_label(have_keys))
+dnl 	__(compare_reg_to_nil(%arg_reg))
+dnl 	__(jne local_label(toomany))
+dnl 	__(movss %fpzero,%rcontext:tcr.save0)
+dnl 	__(jmp *%ra0)
+dnl local_label(have_rest):
+dnl 	__(pushl %arg_reg)
+dnl 	__(btl $keyp_bit,%imm0)
+dnl 	__(jc local_label(have_keys))
+dnl 	__(movss %fpzero,%rcontext:tcr.save0)
+dnl 	__(jmp *%ra0)
+dnl 	/* Ensure that arg_reg contains a proper,even-length list.  */
+dnl 	/* Insist that its length is <= 512 (as a cheap circularity check.)   */
+dnl local_label(have_keys):
+dnl 	__(movl $256,%imm0)
+dnl 	__(push %arg_reg)
+dnl 	__(push %arg_z)
+dnl 	__(xorl %arg_z,%arg_z)
+dnl local_label(count_keys_loop):
+dnl 	__(compare_reg_to_nil(%arg_reg))
+dnl 	__(je local_label(counted_keys))
+dnl 	__(subl $1,%imm0)
+dnl 	__(jl local_label(toomany))
+dnl 	__(movb $fulltag_mask,%arg_z_bh)
+dnl 	__(andb %arg_reg_b,%arg_z_bh)
+dnl  	__(cmpb $fulltag_cons,%arg_z_bh)
+dnl 	__(jne local_label(badlist))
+dnl 	__(_cdr(%arg_reg,%arg_reg))
+dnl 	__(movb $fulltag_mask,%arg_z_bh)
+dnl 	__(andb %arg_reg_b,%arg_z_bh)
+dnl 	__(cmpb $fulltag_cons,%arg_z_bh)
+dnl 	__(jne local_label(badlist))
+dnl 	__(_cdr(%arg_reg,%arg_reg))
+dnl 	__(jmp local_label(count_keys_loop))
+dnl local_label(counted_keys):		
+dnl 	/* We've got a proper, even-length list of key/value pairs in  */
+dnl 	/* arg_reg. For each keyword var in the lambda-list, push a pair  */
+dnl 	/* of NILs on the vstack.   */
+dnl 	__(pop %arg_z)
+dnl 	__(pop %arg_reg)
+dnl 	__(movd %mm1,%imm0)
+dnl 	__(shrl $16,%imm0)
+dnl 	__(movzbl %imm0_b,%imm0)
+dnl 	__(movl %esp,%rcontext:tcr.unboxed0)	/* 0th value/supplied-p pair */
+dnl 	__(jmp local_label(push_pair_test))
+dnl local_label(push_pair_loop):
+dnl 	__(push $nil_value)
+dnl 	__(push $nil_value)
+dnl local_label(push_pair_test):	
+dnl 	__(subb $1,%imm0_b)
+dnl 	__(jge local_label(push_pair_loop))
+dnl 	__(push %temp0)	/* keyword */
+dnl 	__(push %arg_z) /* value */
+dnl 	__(vector_length(%arg_y,%imm0))
+dnl 	__(push %arg_reg)
+dnl 	__(push %imm0)	/* keyword vector length */
+dnl 	__(movl $0,%rcontext:tcr.unboxed1) /* count of unknown keywords seen */
+dnl local_label(match_keys_loop):
+dnl 	__(movl 4(%esp),%arg_reg)
+dnl 	__(compare_reg_to_nil(%arg_reg))
+dnl 	__(je local_label(matched_keys))
+dnl 	__(_car(%arg_reg,%temp0))
+dnl 	__(_cdr(%arg_reg,%arg_reg))
+dnl 	__(_car(%arg_reg,%arg_z))
+dnl 	__(_cdr(%arg_reg,%arg_reg))
+dnl 	__(movl %arg_reg,4(%esp))
+dnl 	__(xorl %temp1,%temp1)
+dnl 	__(jmp local_label(match_test))
+dnl local_label(match_loop):
+dnl 	__(cmpl misc_data_offset(%arg_y,%temp1),%arg_z)
+dnl 	__(je local_label(matched))
+dnl 	__(addl $node_size,%temp1)
+dnl local_label(match_test):
+dnl 	__(cmpl %temp1,(%esp))	/* compare index, keyword vector length */
+dnl 	__(jne local_label(match_loop))
+dnl 	/* No match.  Note unknown keyword, check for :allow-other-keys   */
+dnl 	__(addl $1,%rcontext:tcr.unboxed1)
+dnl 	__(cmpl $nrs.kallowotherkeys,%temp0)
+dnl 	__(jne local_label(match_keys_loop))
+dnl 	__(subl $1,%rcontext:tcr.unboxed1)
+dnl 	__(btsl $seen_aok_bit,%imm0)
+dnl 	__(jc local_label(match_keys_loop))
+dnl 	/* First time we've seen :allow-other-keys.  Maybe set aok_bit.   */
+dnl 	__(compare_reg_to_nil(%arg_z))
+dnl 	__(je local_label(match_keys_loop))
+dnl 	__(btsl $aok_bit,%imm0)
+dnl 	__(jmp local_label(match_keys_loop))
+dnl 	/* Got a match.  Worry about :allow-other-keys here, too.   */
+dnl local_label(matched):
+dnl 	__(negl %temp1)
+dnl 	__(shll $1,%temp1)
+dnl 	__(addl %rcontext:tcr.unboxed0,%temp1)
+dnl 	__(cmpl $nil_value,-node_size*2(%temp1))
+dnl 	__(jne local_label(match_keys_loop))
+dnl 	__(movl %arg_z,-node_size(%temp1))
+dnl 	__(movl $t_value,-node_size*2(%temp1))
+dnl 	__(cmpl $nrs.kallowotherkeys,%temp0)
+dnl 	__(jne local_label(match_keys_loop))
+dnl 	__(btsl $seen_aok_bit,%imm0)
+dnl 	__(jnc local_label(match_keys_loop))
+dnl 	__(compare_reg_to_nil(%arg_z))
+dnl 	__(je local_label(match_keys_loop))
+dnl 	__(btsl $aok_bit,%imm0)
+dnl 	__(jmp local_label(match_keys_loop))
+dnl local_label(matched_keys):	
+dnl 	__(cmpl $0,%rcontext:tcr.unboxed1)	/* any unknown keys seen? */
+dnl 	__(je local_label(keys_ok))
+dnl 	__(btl $aok_bit,%imm0)
+dnl 	__(jnc local_label(badkeys))
+dnl local_label(keys_ok):	
+dnl 	__(movss %fpzero,%rcontext:tcr.save0)
+dnl 	__(jmp *%ra0)
+dnl 	/* Some unrecognized keywords.  Complain generically about   */
+dnl 	/* invalid keywords.   */
+dnl local_label(badkeys):
+dnl 	__(movl $XBADKEYS,%arg_y)
+dnl 	__(jmp local_label(destructure_error))
+dnl local_label(toomany):
+dnl 	__(movl $XCALLTOOMANY,%arg_y)
+dnl 	__(jmp local_label(destructure_error))
+dnl local_label(toofew):
+dnl 	__(movl $XCALLTOOFEW,%arg_y)
+dnl 	__(jmp local_label(destructure_error))
+dnl local_label(badlist):
+dnl 	__(movl $XCALLNOMATCH,%arg_y)
+dnl local_label(destructure_error):
+dnl 	__(movd %mm0,%esp)		/* undo everything done to the stack */
+dnl 	__(movl %rcontext:tcr.save0,%arg_z)	/* %whole_reg */
+dnl 	__(movss %fpzero,%rcontext:tcr.save0)
+dnl 	__(set_nargs(2))
+dnl     __(push %ra0)
+dnl 	__(jmp _SPksignalerr)
 _endfn(C(destbind1))
 
@@ -2789,10 +2982,10 @@
 
 _spentry(destructuring_bind)
-	__(mov %arg_reg,%whole_reg)
+	__(movl %arg_reg,%rcontext:tcr.save0)	/* %whole_reg */
 	__(jmp C(destbind1))
 _endsubp(destructuring_bind)
 
 _spentry(destructuring_bind_inner)
-	__(mov %arg_z,%whole_reg)
+	__(movl %arg_z,%rcontext:tcr.save0)	/* %whole_reg */
 	__(jmp C(destbind1))
 _endsubp(destructuring_bind_inner)
@@ -2874,5 +3067,4 @@
 /* values. This makes recover_values harder.   */
 _spentry(add_values)
-	__(int $3)
 	/* do we need to preserve imm0? */
 	__(test %nargs,%nargs)
@@ -2935,5 +3127,4 @@
 
 _spentry(recover_values_for_mvcall)
-	__(int $3)
 	__(movl %ra0,%rcontext:tcr.save0) /* temp0 */
 	/* First, walk the segments reversing the pointer to previous  */
@@ -3690,4 +3881,5 @@
 
 _spentry(builtin_aset1)
+	__(movl %temp1,%temp0)
 	__(extract_typecode(%temp0,%imm0))
 	__(box_fixnum(%imm0,%temp1))
@@ -3697,6 +3889,6 @@
 	__(push $reserved_frame_marker)
 	__(push $reserved_frame_marker)
-	__(push %temp0)	/* vector */
-	__(push %temp1)	/* return addr */
+	__(push %temp0)
+	__(push %temp1)
 	__(jump_builtin(_builtin_aset1,3))
 _endsubp(builtin_aset1)
@@ -3870,9 +4062,13 @@
 	/* lexpr count is two or more: vpush args from the lexpr until */
 	/* we have only two left, then assign them to arg_y and arg_z */
-2:	__(cmpl $(3*node_size),%imm0)
+2:	__(cmpl $(2*node_size),%imm0)
+	__(je local_label(push_loop_end))
+local_label(push_loop):
 	__(lea -1*node_size(%imm0),%imm0)
 	__(push -node_size(%arg_y))
 	__(lea -1*node_size(%arg_y),%arg_y)
+	__(cmpl $(2*node_size),%imm0)
 	__(jne 2b)
+local_label(push_loop_end):
         __(movl -node_size*2(%arg_y),%arg_z)
 	__(movl -node_size*1(%arg_y),%arg_y)
@@ -3940,6 +4136,39 @@
 _endsubp(callback)
 
+/* temp0 = array, arg_y = i, arg_z = j. Typecheck everything.
+   We don't know whether the array is alleged to be simple or
+   not, and don't know anythng about the element type.  */
+
 _spentry(aref2)
-	__(int $3)
+        __(testl $fixnummask,%arg_y)
+        __(je 0f)
+        __(uuo_error_reg_not_fixnum(Rarg_y))
+0:      __(testb $fixnummask,%arg_z_b)
+        __(je 1f)
+        __(uuo_error_reg_not_fixnum(Rarg_z))
+1:      __(extract_typecode(%temp0,%imm0))
+        __(cmpb $subtag_arrayH,%imm0_b)
+        __(jne 2f)
+        __(cmpl $2<<fixnumshift,arrayH.rank(%temp0))
+        __(je 3f)
+2:      __(uuo_error_reg_not_type(Rtemp0,error_object_not_array_2d))
+3:      __(cmpl arrayH.dim0(%temp0),%arg_y)
+        __(jb 4f)
+        __(uuo_error_array_bounds(Rarg_y,Rtemp0))
+4:      __(movl arrayH.dim0+node_size(%temp0),%imm0)
+        __(cmpl %imm0,%arg_z)
+        __(jb 5f)
+        __(uuo_error_array_bounds(Rarg_z,Rtemp0))
+5:      __(sarl $fixnumshift,%imm0)
+        __(imull %arg_y,%imm0)
+        __(addl %imm0,%arg_z)
+        __(movl %temp0,%arg_y)
+	__(xorl %temp1,%temp1)
+6:      __(addl arrayH.displacement(%arg_y),%arg_z)
+        __(movl arrayH.data_vector(%arg_y),%arg_y)
+        __(extract_subtag(%arg_y,%imm0_b))
+        __(cmpb $subtag_vectorH,%imm0_b)
+        __(ja C(misc_ref_common))
+        __(jmp 6b)
 _endsubp(aref2)
 
@@ -3948,6 +4177,36 @@
 _endsubp(aref3)
 
+/* As with aref2, but temp1 = array, temp0 = i, arg_y = j, arg_z = new_value */
 _spentry(aset2)
-	__(int $3)
+        __(testb $fixnummask,%temp0_b)
+        __(je 0f)
+        __(uuo_error_reg_not_fixnum(Rtemp0))
+0:      __(testl $fixnummask,%arg_y)
+        __(je 1f)
+        __(uuo_error_reg_not_fixnum(Rarg_y))
+1:      __(extract_typecode(%temp1,%imm0))
+        __(cmpb $subtag_arrayH,%imm0_b)
+        __(jne 2f)
+        __(cmpl $2<<fixnumshift,arrayH.rank(%temp1))
+        __(je 3f)
+2:      __(uuo_error_reg_not_type(Rtemp1,error_object_not_array_2d))
+3:      __(cmpl arrayH.dim0(%temp1),%temp0)
+        __(jb 4f)
+        __(uuo_error_array_bounds(Rtemp0,Rtemp1))
+4:      __(movl arrayH.dim0+node_size(%temp1),%imm0)
+        __(cmpl %imm0,%arg_y)
+        __(jb 5f)
+        __(uuo_error_array_bounds(Rarg_y,Rtemp1))
+5:      __(sarl $fixnumshift,%imm0)
+        __(imull %temp0,%imm0)
+        __(addl %imm0,%arg_y)
+        __(movl %temp1,%temp0)
+	__(xorl %temp1,%temp1)
+6:      __(addl arrayH.displacement(%temp0),%arg_y)
+        __(movl arrayH.data_vector(%temp0),%temp0)
+        __(extract_subtag(%temp0,%imm0_b))
+        __(cmpb $subtag_vectorH,%imm0_b)
+        __(ja C(misc_set_common))
+        __(jmp 6b)
 _endsubp(aset2)
 
@@ -4160,2 +4419,93 @@
 _endsubp(unused_6)
 
+/* %temp1 = array, %temp0 = i,%arg_y = j, %arg_z = k */
+/*
+_spentry(aref3)
+        __(testb $fixnummask,%temp0_b)
+        __(je 0f)
+        __(uuo_error_reg_not_fixnum(Rtemp0))
+0:      __(testl $fixnummask,%arg_y)
+        __(je 1f)
+        __(uuo_error_reg_not_fixnum(Rarg_y))
+1:      __(testb $fixnummask,%arg_z_b)
+        __(je 2f)
+        __(uuo_error_reg_not_fixnum(Rarg_z))
+2:      __(extract_typecode(%temp1,%imm0))
+        __(cmpb $subtag_arrayH,%imm0_b)
+        __(jne 3f)
+        __(cmpl $3<<fixnumshift,arrayH.rank(%temp1))
+        __(je 4f)
+3:      __(uuo_error_reg_not_type(Rtemp1,error_object_not_array_3d))
+4:      __(cmpl arrayH.dim0(%temp1),%temp0)
+        __(jb 5f)
+        __(uuo_error_array_bounds(Rtemp0,Rtemp1))
+5:      __(movl arrayH.dim0+node_size(%temp1),%imm0)
+        __(cmpl %imm0,%arg_y)
+        __(jb 6f)
+        __(uuo_error_array_bounds(Rarg_y,Rtemp1))
+6:      __(unbox_fixnum(%imm0,%imm0))
+        __(movl arrayH.dim0+(node_size*2)(%temp1),%imm1)
+        __(cmpq %imm1,%arg_z)
+        __(jb,pt 7f)
+        __(uuo_error_array_bounds(Rarg_z,Rtemp0))
+7:      __(unbox_fixnum(%imm1,%imm1))
+        __(imulq %imm1,%arg_y)
+        __(mulq %imm1)
+        __(imulq %imm0,%arg_x)
+        __(addq %arg_x,%arg_z)
+        __(addq %arg_y,%arg_z)
+        __(movq %temp0,%arg_y)
+8:      __(addq arrayH.displacement(%arg_y),%arg_z)
+        __(movq arrayH.data_vector(%arg_y),%arg_y)
+        __(extract_subtag(%arg_y,%imm1_b))
+        __(cmpb $subtag_vectorH,%imm1_b)
+        __(ja C(misc_ref_common))
+        __(jmp 8b)
+_endsubp(aref3)
+*/        
+
+/* %temp1 = array, %imm0 = i, %temp0 = j, %arg_y = k, %arg_z = newval. */
+/*
+_spentry(aset3)
+        __(testb $fixnummask,%temp0_b)
+        __(je,pt 0f)
+        __(uuo_error_reg_not_fixnum(Rtemp0))
+0:      __(testb $fixnummask,%arg_x_b)
+        __(je,pt 1f)
+        __(uuo_error_reg_not_fixnum(Rarg_x))
+1:      __(testb $fixnummask,%arg_y_b)
+        __(je,pt 2f)
+        __(uuo_error_reg_not_fixnum(Rarg_y))
+2:      __(extract_typecode(%temp1,%imm0))
+        __(cmpb $subtag_arrayH,%imm0_b)
+        __(jne 3f)
+        __(cmpq $3<<fixnumshift,arrayH.rank(%temp1))
+        __(je,pt 4f)
+3:      __(uuo_error_reg_not_type(Rtemp1,error_object_not_array_3d))
+4:      __(cmpq arrayH.dim0(%temp1),%temp0)
+        __(jb,pt 5f)
+        __(uuo_error_array_bounds(Rtemp0,Rtemp1))
+5:      __(movq arrayH.dim0+node_size(%temp1),%imm0)
+        __(cmpq %imm0,%arg_x)
+        __(jb,pt 6f)
+        __(uuo_error_array_bounds(Rarg_x,Rtemp1))
+6:      __(unbox_fixnum(%imm0,%imm0))
+        __(movq arrayH.dim0+(node_size*2)(%temp1),%imm1)
+        __(cmpq %imm1,%arg_y)
+        __(jb,pt 7f)
+        __(uuo_error_array_bounds(Rarg_y,Rtemp1))
+7:      __(unbox_fixnum(%imm1,%imm1))
+        __(imulq %imm1,%arg_x)
+        __(mulq %imm1)
+        __(imulq %imm0,%temp0)
+        __(addq %temp0,%arg_y)
+        __(addq %arg_x,%arg_y)
+        __(movq %temp1,%arg_x)
+8:      __(addq arrayH.displacement(%arg_x),%arg_y)
+        __(movq arrayH.data_vector(%arg_x),%arg_x)
+        __(extract_subtag(%arg_x,%imm1_b))
+        __(cmpb $subtag_vectorH,%imm1_b)
+        __(ja C(misc_set_common))
+        __(jmp 8b)
+_endsubp(aset3)
+*/
