[Ecls-list] BUG: LDB returning incorrect results in compiled code

Eric Marsden eric.marsden at free.fr
Mon Oct 1 19:34:34 UTC 2007

>>>>> "jg" == Juan Jose Garcia-Ripoll <jjgarcia at users.sourceforge.net> writes:

  jg> Hi Eric, do you have any special optimization settings? I do not have
  jg> this problem with a recently built version (see below) As shown below
  jg> the code is pretty harmless: it just calls the full functions (BYTE
  jg> and LDB), without any further optimization. Can you please post the
  jg> code of DISASSEMBLE in your system? I currently do not have access to
  jg> a 64bit machine.


  Below is the output from DISASSEMBLE, which differs from that you
  show. This is with an ECL compiled from current anoncvs, with no
  special flags. I am using default optimization settings. 

  (I suggest in passing that you add something like "CVS-2007-10-01"
  to the LISP-IMPLEMENTATION-VERSION when compiling non-release
  builds from CVS; this would perhaps facilitate comparison of
  version strings.)
| > (disassemble '(lambda () (ldb (byte 27 5) -1)))
| ;;; Loading #P"/usr/local/lib/ecl/cmp.fas"
| ;;; Loading #P"/usr/local/lib/ecl/sysfun.lsp"
| ;;; Compiling (DEFUN C::GAZONK ...).
| ;;; Emitting code for C::GAZONK.
| /*	function definition for GAZONK                                */
| static cl_object L1c__gazonk()
| 	cl_object value0;
| 	{
| TTL:
| 	value0=MAKE_FIXNUM((((~(-1 << (27))) << (5)) & (-1)) >> (5)); NVALUES=1;
| 	return value0;
| 	}
| }

Eric Marsden

More information about the ecl-devel mailing list