On Wed, Mar 2, 2011 at 9:40 PM, Alexander Gavrilov <firstname.lastname@example.org>
> ;;; Compiling (DEF-UTILITY NEG-SS ...).That's probably because of the change below. SSE packs can currently
> Condition of type: SIMPLE-ERROR
> Cannot externalize object #<SSE -0.0 0.0 0.0 0.0>
> Available restarts:
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.