On Wed, Mar 2, 2011 at 9:40 PM, Alexander Gavrilov <angavrilov@...:
> > ;;; Compiling (DEF-UTILITY NEG-SS ...).
> > Condition of type: SIMPLE-ERROR
> > Cannot externalize object #<SSE -0.0 0.0 0.0 0.0>
> > Available restarts:
> That's probably because of the change below. SSE packs can currently
> only be compiled as static constants, and this really should be the
> way they are handled: that negation operation is really supposed
> to compile down to one XORPS instruction.
Static constants can only be used in code that is never unloaded. This is ok
for the ECL core library, but not for arbitrary compiled code, which may be
garbage collected -- we do not want a couple of statically generated
constants to force a library to stay in memory.
I have fixed this but...
> As an alternative, if there is a way to fuse the constant with
> the unboxing operation, the unboxed value can probably be represented
> as an expression using a couple of C intrinsic functions.
... this might be a better solution. ECL currently provides various hooks
for inlining functions. One I like quite much is the use of compiler macros.
You could replace current sse compilations with compiler macros that inline
the constants as C expressions.
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)