Hello, When looking at the cmp/ proclamations, it's unclear to me why the following code does not inline to C << and |. Perhaps I'm missing something obvious?
(defun address-fixnum (addr) (declare (optimize (speed 3) (safety 0) (debug 0)) (type (simple-array fixnum (4)) addr)) (the fixnum (logior (the fixnum (ash (the fixnum (aref addr 0)) 24)) (the fixnum (ash (the fixnum (aref addr 1)) 16)) (the fixnum (ash (the fixnum (aref addr 2)) 8)) (the fixnum (aref addr 3))))) The following C code is generated (using ECL HEAD): /* function definition for ADDRESS-FIXNUM */ /* optimize speed 3, debug 0, space 0, safety 0 */ static cl_object L1address_fixnum(cl_object V1) { VT2 VLEX2 CLSR2 STCK2 const cl_env_ptr cl_env_copy = ecl_process_env(); cl_object value0; TTL: { cl_fixnum V2; V2 = (cl_fixnum) ((V1)->vector.self.i32[0]); T0 = cl_ash(MAKE_FIXNUM(V2), MAKE_FIXNUM(24)) /* ASH */ ; { cl_fixnum V3; V3 = (cl_fixnum) ((V1)->vector.self.i32[1]); T1 = cl_ash(MAKE_FIXNUM(V3), MAKE_FIXNUM(16)) /* ASH */ ; { cl_fixnum V4; V4 = (cl_fixnum) ((V1)->vector.self.i32[2]); T2 = cl_ash(MAKE_FIXNUM(V4), MAKE_FIXNUM(8)) /* ASH */ ; { cl_fixnum V5; V5 = (cl_fixnum) ((V1)->vector.self.i32[3]); value0 = cl_logior(4, T0, T1, T2, MAKE_FIXNUM(V5)) /* LOGIOR */ ; return value0; } } } } } Thanks, -- Matt ------------------------------------------------------------------------------ Magic Quadrant for Content-Aware Data Loss Prevention Research study explores the data loss prevention market. Includes in-depth analysis on the changes within the DLP market, and the criteria used to evaluate the strengths and weaknesses of these DLP solutions. http://www.accelacomm.com/jaw/sfnl/114/51385063/ _______________________________________________ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list