Ticket #1012 (closed defect: fixed)

Opened 2 years ago

Last modified 19 months ago

%unbox-s8 vinsin missing

Reported by: wws Owned by: gb
Priority: normal Milestone: Clozure CL 1.9
Component: Compiler Version: trunk
Keywords: Cc: wws@…

Description

I was loading a matrix math package, via (ql:quickload "clem"), and got an error that the %unbox-s8 vinsin is missing. It's missing in both x8664-vinsins.lisp and x8632-vinsins.lisp. I have a fix that I'll commit to trunk soon.

To test, evaluate the following two forms. The first one errors before the fix.

(defun foo (m x)
  (declare (optimize (speed 3) (safety 0)))
  (declare (type (simple-array (signed-byte 8) *) m))
  (setf (aref m 0) x))

(let ((a (make-array 2 :element-type '(signed-byte 8))))
  (foo a -128)
  (assert (eql -128 (aref a 0)))
  (foo a 127)
  (assert (eql 127 (aref a 0)))
  (foo a 128)
  (assert (eql -128 (aref a 0))))

Change History

comment:1 Changed 2 years ago by wws

  • Status changed from new to closed
  • Resolution set to fixed

(In [15455]) Fix #1012 - add %unbox-s8 vinsin to both x8664-vinsins.lisp and x8632-vinsins.lisp

comment:2 Changed 2 years ago by wws

  • Status changed from closed to reopened
  • Resolution fixed deleted

Reopening. ARM and PPC need the same fix. I can do the ARM fix, on my emulated Raspberry Pi, but I don't have a PPC to test that fix on.

comment:3 Changed 2 years ago by wws

I committed an ARM fix for this, but my FOO function above doesn't cause the ARM compiler to use the %unbox-s8 vinsin. It uses unbox-s8 instead, and does type checking, causing an error on (foo a 128). So my fix is untested.

comment:4 Changed 2 years ago by wws

  • Cc wws@… added
  • Owner changed from wws to gb
  • Status changed from reopened to new

Somebody needs to do the PPC version of the %unbox-s8 vinsin. I could probably generate the proper code, but I have no way of testing it, so I'll leave that to gb or rme. Assigning to gb. rme take it if you want.

It would also be good to have a fix for whatever is preventing the compiler from using %unbox-s8 on the ARM.

comment:5 Changed 19 months ago by gb

  • Status changed from new to closed
  • Resolution set to fixed

The vinsn exists on whatever platforms try to use it.

Note: See TracTickets for help on using tickets.