gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] gcl bad code generation for setf fill-pointer


From: Camm Maguire
Subject: Re: [Gcl-devel] gcl bad code generation for setf fill-pointer
Date: 18 Dec 2007 11:00:19 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!  This is fixed in cvs head:

address@hidden:/fix/t1/camm/cvs/foo/unixport$ 
address@hidden:/fix/t1/camm/cvs/foo/unixport$ cda
address@hidden:/fix/t1/camm/cvs/foo/ansi-tests$ sa
GCL (GNU Common Lisp)  2.7.0 ANSI    Dec 18 2007 09:08:42
Source License: LGPL(gcl,gmp,pargcl), GPL(unexec,bfd,xgcl)
Binary License:  GPL due to GPL'ed components: (XGCL READLINE BFD UNEXEC)
Modifications of this banner must retain notice of a compatible license
Dedicated to the memory of W. Schelter

Use (help) to get some basic information on how to use GCL.

Temporary directory for compiler files set to /tmp/

>(compile-file "/tmp/i.l")

;; Compiling /tmp/i.l.
;; End of Pass 1.  
;; End of Pass 2.  
;; OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3, 
(Debug quality ignored)
;; Finished compiling /tmp/i.o.
#P"/tmp/i.o"
NIL
NIL

>(load *)

;; Loading /tmp/i.o
 ;; start address -T 0xb4d900 ;; Finished loading /tmp/i.o
48

>(disassemble 'init-token-chars)

;; Compiling /tmp/gazonk_22670_0.lsp.
;; End of Pass 1.  
;; End of Pass 2.  
;; OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3, 
(Debug quality ignored)
;; Finished compiling /tmp/gazonk_22670_0.o.

#include "gazonk_22670_0.h"
void init_code(){do_init((void *)VV);}
/*      local entry for function COMMON-LISP-USER::INIT-TOKEN-CHARS     */

static fixnum LI1__INIT_TOKEN_CHARS___gazonk_22670_0()

{        VMB1 VMS1 VMV1
        goto TTL;
TTL:;
        {fixnum V1 = 
(fixnum)((((((object)VV[0])->s.s_dbind))->st.st_fillp)=((((((object)VV[0])->s.s_dbind))->st.st_hasfillp)
 ? ((fixnum)0) : (((((object)VV[0])->s.s_dbind))->st.st_fillp)));VMR1
        (V1);}
}
#(#(*CURRENT-TOKEN-CHARS*
    (%INIT
     . #((LET ((*DISABLE-RECOMPILE* T))
           (MFSFUN 'INIT-TOKEN-CHARS 0 256 0)
           (ADD-HASH 'INIT-TOKEN-CHARS '(NIL SEQIND)
               '((FILL-POINTER-SET (VECTOR FIXNUM) SEQIND))
static fixnum LI1__INIT_TOKEN_CHARS___gazonk_22670_0();
#define VMB1
#define VMS1
#define VMV1
#define VMR1(VMT1) return(VMT1);
#define VM1 0
static void * VVi[2]={
#define Cdata VV[1]
(void *)(LI1__INIT_TOKEN_CHARS___gazonk_22670_0)
};
#define VV (VVi)

/tmp/gazonk_22670_0.o:     file format elf32-i386

Disassembly of section .text:

00000000 <LI1__INIT_TOKEN_CHARS___gazonk_22670_0>:
   0:   a1 00 00 00 00          mov    0x0,%eax
   5:   8b 50 08                mov    0x8(%eax),%edx
   8:   31 c0                   xor    %eax,%eax
   a:   f6 42 08 01             testb  $0x1,0x8(%edx)
   e:   75 03                   jne    13 
<LI1__INIT_TOKEN_CHARS___gazonk_22670_0+0x13>
  10:   8b 42 10                mov    0x10(%edx),%eax
  13:   89 42 10                mov    %eax,0x10(%edx)
  16:   c3                      ret    

00000017 <init_code>:
  17:   83 ec 18                sub    $0x18,%esp
  1a:   68 00 00 00 00          push   $0x0
  1f:   e8 fc ff ff ff          call   20 <init_code+0x9>
  24:   83 c4 1c                add    $0x1c,%esp
  27:   c3                      ret    
NIL

>

Take care,

Tim Josling <address@hidden> writes:

> System:
> uname -a
> Linux tim-gcc 2.6.20-15-generic #2 SMP Sun Apr 15 06:17:24 UTC 2007
> x86_64 GNU/Linux
> 
> GCL:
> GCL (GNU Common Lisp)  2.6.7 CLtL1    Nov 10 2006 14:25:02
> 
> Run log of error:
> 
> make cobol-tests
> gcl  \
>        -eval  "(compile-file
> \"/home2/gcb/gcb/gcc/gcc/gcb/gcbc-compiler-lexer.lisp\")"
> GCL (GNU Common Lisp)  2.6.7 CLtL1    Nov 10 2006 14:25:02
> Source License: LGPL(gcl,gmp), GPL(unexec,bfd,xgcl)
> Binary License:  GPL due to GPL'ed components: (XGCL READLINE BFD
> UNEXEC)
> Modifications of this banner must retain notice of a compatible license
> Dedicated to the memory of W. Schelter
> 
> Use (help) to get some basic information on how to use GCL.
> Temporary directory for compiler files set to /tmp/
> Compiling /home2/gcb/gcb/gcc/gcc/gcb/gcbc-compiler-lexer.lisp.
> End of Pass 1.  
> End of Pass 2.  
> /home2/gcb/gcb/gcc/gcc/gcb/gcbc-compiler-lexer.c: In function 'L1':
> /home2/gcb/gcb/gcc/gcc/gcb/gcbc-compiler-lexer.c:5158: error: invalid
> lvalue in assignment
> 
> Error: (SYSTEM "gcc -c -Wall -DVOL=volatile -fsigned-char -pipe
> -I/usr/lib/gcl-2.6.7/unixport/../h  -O3 -fomit-frame-pointer -c
> \"/home2/gcb/gcb/gcc/gcc/gcb/gcbc-compiler-lexer.c\" -o
> \"/home2/gcb/gcb/gcc/gcc/gcb/gcbc-compiler-lexer.o\" -w") returned a
> non-zero value 0.
> Fast links are on: do (si::use-fast-links nil) for debugging
> Error signalled by UNLESS.
> Broken at CERROR.  Type :H for Help.
> >>
> 
> Input program:
> ;;; -*- lisp -*-
> 
> (defvar *current-token-chars* nil)
> 
> (defun init-token-chars () 
>   (setf (fill-pointer *current-token-chars*) 0))
> 
> Output C code (excerpt):
> 
> #include "gcbc-compiler-lexer.h"
> void init_code(){do_init((void *)VV);}
> /*    function definition for INIT-TOKEN-CHARS        */
> 
> static void L1()
> {register object *base=vs_base;
>       register object *sup=base+VM1; VC1
>       vs_check;
>       vs_top=sup;
>       goto TTL;
> TTL:;
>       base[0]=
> CMPmake_fixnum((long)(((((object)VV[0])->s.s_dbind))->st.st_fillp)=((long)0));
>  
>       vs_top=(vs_base=base+0)+1;
>       return;
> }
> 
> This is the bad line:
> CMPmake_fixnum((long)(((((object)VV[0])->s.s_dbind))->st.st_fillp)=((long)0));
>  
> 
> Regards,
> Tim Josling
> 
> 
> 
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gcl-devel
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]