Handle (aref v (+ i k)), with i negative
[sbcl.git] / src / compiler / x86 / array.lisp
index 1b6c8f2..ecd91fd 100644 (file)
   (:args (object :scs (descriptor-reg))
          (index :scs (any-reg immediate)))
   (:info offset)
-  (:arg-types simple-array-single-float positive-fixnum
+  (:arg-types simple-array-single-float tagged-num
               (:constant (constant-displacement other-pointer-lowtag
                                                 4 vector-data-offset)))
   (:results (value :scs (single-reg)))
          (index :scs (any-reg immediate))
          (value :scs (single-reg) :target result))
   (:info offset)
-  (:arg-types simple-array-single-float positive-fixnum
+  (:arg-types simple-array-single-float tagged-num
               (:constant (constant-displacement other-pointer-lowtag
                                                 4 vector-data-offset))
               single-float)
          (index :scs (any-reg immediate)))
   (:info offset)
   (:arg-types simple-array-double-float
-              positive-fixnum
+              tagged-num
               (:constant (constant-displacement other-pointer-lowtag
                                                 8 vector-data-offset)))
   (:results (value :scs (double-reg)))
          (index :scs (any-reg immediate))
          (value :scs (double-reg) :target result))
   (:info offset)
-  (:arg-types simple-array-double-float positive-fixnum
+  (:arg-types simple-array-double-float tagged-num
               (:constant (constant-displacement other-pointer-lowtag
                                                 8 vector-data-offset))
               double-float)
   (:args (object :scs (descriptor-reg))
          (index :scs (any-reg immediate)))
   (:info offset)
-  (:arg-types simple-array-complex-single-float positive-fixnum
+  (:arg-types simple-array-complex-single-float tagged-num
               (:constant (constant-displacement other-pointer-lowtag
                                                 8 vector-data-offset)))
   (:results (value :scs (complex-single-reg)))
          (index :scs (any-reg immediate))
          (value :scs (complex-single-reg) :target result))
   (:info offset)
-  (:arg-types simple-array-complex-single-float positive-fixnum
+  (:arg-types simple-array-complex-single-float tagged-num
               (:constant (constant-displacement other-pointer-lowtag
                                                 8 vector-data-offset))
               complex-single-float)
   (:args (object :scs (descriptor-reg))
          (index :scs (any-reg immediate)))
   (:info offset)
-  (:arg-types simple-array-complex-double-float positive-fixnum
+  (:arg-types simple-array-complex-double-float tagged-num
               (:constant (constant-displacement other-pointer-lowtag
                                                 16 vector-data-offset)))
   (:results (value :scs (complex-double-reg)))
          (index :scs (any-reg immediate))
          (value :scs (complex-double-reg) :target result))
   (:info offset)
-  (:arg-types simple-array-complex-double-float positive-fixnum
+  (:arg-types simple-array-complex-double-float tagged-num
               (:constant (constant-displacement other-pointer-lowtag
                                                 16 vector-data-offset))
               complex-double-float)
       (:translate data-vector-ref-with-offset)
       (:policy :fast-safe)
       (:args (object :scs (descriptor-reg))
-             (index :scs (unsigned-reg immediate)))
+             (index :scs (signed-reg immediate)))
       (:info offset)
-      (:arg-types ,ptype positive-fixnum
+      (:arg-types ,ptype tagged-num
                   (:constant (constant-displacement other-pointer-lowtag
                                                     1 vector-data-offset)))
       (:results (value :scs ,scs))
       (:translate data-vector-set-with-offset)
       (:policy :fast-safe)
       (:args (object :scs (descriptor-reg) :to (:eval 0))
-             (index :scs (unsigned-reg immediate) :to (:eval 0))
+             (index :scs (signed-reg immediate) :to (:eval 0))
              (value :scs ,scs ,@(unless 8-bit-tns-p
                                   '(:target eax))))
       (:info offset)
-      (:arg-types ,ptype positive-fixnum
+      (:arg-types ,ptype tagged-num
                   (:constant (constant-displacement other-pointer-lowtag
                                                     1 vector-data-offset))
                   ,element-type)
         (:translate data-vector-ref-with-offset)
         (:policy :fast-safe)
         (:args (object :scs (descriptor-reg))
-               (index :scs (unsigned-reg immediate)))
+               (index :scs (signed-reg immediate)))
         (:info offset)
-        (:arg-types ,ptype positive-fixnum
+        (:arg-types ,ptype tagged-num
                     (:constant (constant-displacement other-pointer-lowtag
                                                       2 vector-data-offset)))
         (:results (value :scs ,scs))
         (:translate data-vector-set-with-offset)
         (:policy :fast-safe)
         (:args (object :scs (descriptor-reg) :to (:eval 0))
-               (index :scs (unsigned-reg immediate) :to (:eval 0))
+               (index :scs (signed-reg immediate) :to (:eval 0))
                (value :scs ,scs :target eax))
         (:info offset)
-        (:arg-types ,ptype positive-fixnum
+        (:arg-types ,ptype tagged-num
                     (:constant (constant-displacement other-pointer-lowtag
                                                       2 vector-data-offset))
                     ,element-type)