[Openmcl-devel] Problem with array indexing on ARM

Waldek Hebisch hebisch at math.uni.wroc.pl
Thu Dec 27 18:45:25 PST 2012


With the following:

(DEFMACRO |sub_SI| (X Y)
          `(THE FIXNUM (- (THE FIXNUM ,X) (THE FIXNUM ,Y))))

(defmacro QSETAREF2O (m i j r oi oj)
    `(setf (aref (the (simple-array T (* *)) ,m)
                 (|sub_SI| ,i ,oi)
                 (|sub_SI| ,j ,oj))
           ,r))

(DEFUN |qsetelt!| (|m| |i| |j| |r|)
  (QSETAREF2O |m| |i| |j| |r| 1 1))

in file "ts2.lisp" I get:

$ /home/hebisch/lisp/ccl/scripts/ccl
Welcome to Clozure Common Lisp Version 1.9-dev  (LinuxARM32)!
? (compile-file "ts2.lisp")
#P"/home/hebisch/fricas/axp1/ax-build1/ts2.lafsl"
NIL
NIL
? (load "ts2.lafsl")
#P"/home/hebisch/fricas/axp1/ax-build1/ts2.lafsl"
? (setf m (make-array '(2 2)))
#2A((0 0) (0 0))
? (|qsetelt!| m 2 2 17)
17
? m
#2A((0 17) (0 0))


So, an elemnt of the first row is modified instead of element
of the second row.

This is on Raspberry Pi using recent trunk recompiled to use
hard float ABI.

-- 
                              Waldek Hebisch
hebisch at math.uni.wroc.pl 



More information about the Openmcl-devel mailing list