[Openmcl-devel] Re: MISC-SET-{S,U}64

Gary Byers gb at clozure.com
Wed Jul 13 01:12:27 PDT 2005



On Wed, 13 Jul 2005, James Bielman wrote:

> Gary Byers <gb at clozure.com> writes:
>
>> This is fixed in CVS.
>>
>> As always, it's a good idea to recompile everything after a "cvs update".
>
> Cool, all the CFFI tests pass now.

I'd botched the PPC32 case of the bug that (MAKE-SOCKET) triggered on
PPC64; someone pointed that out, and that should now be fixed in CVS.
Honest.  This time, for sure.

>
> I ran into this compiler error trying to compile CL-PPCRE:
>
> Welcome to OpenMCL Version (Alpha: DarwinPPC64) 0.14.3-050711!
> ? (require "cl-ppcre")
> ;Compiling "/Users/jamesjb/.asdf-install-dir/site/cl-ppcre-1.2.9/repetition-closures.lisp"...
>> Error in process listener(1): Unknown vinsn: CCL::MISC-SET-S64
>> While executing: CCL::NEED-VINSN-TEMPLATE
>> Type :POP to abort.

I'll try to enable something that'd conditionally warn about vinsns that're
referenced by the compiler but not defined.  (There should be -some- cases
of this - some things are platform-specific - but it'd be good to know
about this earlier.)

>
> The code in question boiled down to basically:
>
>  (defparameter *a* (make-array 10 :element-type 'fixnum))
>  (declaim (type (array fixnum (*)) *a*))
>
>  (defun x (y)
>    (declare (type fixnum y))
>    (setf (aref *a* y) 100))
>
> I took at stab at writing the vinsn and the unsigned version:
>
> Index: compiler/PPC/PPC64/ppc64-vinsns.lisp
> ===================================================================
> RCS file: /usr/local/tmpcvs/ccl-0.14-dev/ccl/compiler/PPC/PPC64/ppc64-vinsns.lisp,v
> retrieving revision 1.28
> diff -u -r1.28 ppc64-vinsns.lisp
> --- compiler/PPC/PPC64/ppc64-vinsns.lisp	11 Jul 2005 09:07:10 -0000	1.28
> +++ compiler/PPC/PPC64/ppc64-vinsns.lisp	13 Jul 2005 07:11:37 -0000
> @@ -101,7 +101,17 @@
> 				     ())
>   (ld dest (:apply + ppc64::misc-data-offset (:apply ash idx ppc64::word-shift)) v))
>
> -
> +(define-ppc64-vinsn misc-set-u64 (()
> +                                  ((val :u64)
> +                                   (v :lisp)
> +                                   (scaled-idx :u64)))
> +  (stdx val v scaled-idx))
> +
> +(define-ppc64-vinsn misc-set-s64 (()
> +                                  ((val :s64)
> +                                   (v :lisp)
> +                                   (scaled-idx :u64)))
> +  (stdx val v scaled-idx))
>
>

Those look right; thanks.

It might be worth supporting arrays of element type FIXNUM (e.g.,
(SIGNED-BYTE 61)), since there are some leftover typecodes.
Storing/referencing fixnums in arrays of element-type (SIGNED-BYTE 64)
won't cons, but might do some extra (unnecessary) typechecking.

> (define-ppc64-vinsn misc-ref-u32  (((dest :u32))
>
>



More information about the Openmcl-devel mailing list