This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Use of DI mode on 32-bit hosts


On Mon, Jun 02, 2003 at 10:45:13AM -0700, Doug Evans wrote:
> Michael Meissner writes:
>  > Where is the decision made about the sizes of integer (particularly whether DI
>  > mode is available on 32-bit systems)?  Is it in the scheme interpreter or is it
>  > in the scm code?  Is there any configure option to say assume we are using GCC
>  > and that long long (or __attribute__((__mode__(__DI__)))) is available?
> 
> I'm guessing you're refering to host tool issues instead of
> target architecture issues.
> Assuming that's the case ...
> 
> It's up to each application to choose how it wants to do this.
> cgen proper does not get involved.
> 
> To pick an arbitrary example of the m32r simulator in src/sim,
> the code generators just always emit DI for the type, and then leave it
> to other code to decide whether to make DI an integral type or a struct.
> DI_FN_SUPPORT gets defined if the host compiler doesn't have a suitable
> integral mode for DI's, which in turn is based on HAVE_LONGLONG.
> 
> >From cgen-types.h:
> 
> #ifdef __GNUC__
> #define HAVE_LONGLONG
> #undef DI_FN_SUPPORT
> #else
> #undef HAVE_LONGLONG
> #define DI_FN_SUPPORT
> #endif
> 
> And in cgen-ops.h different versions of the DI mode operations
> get used depending on ifdef DI_FN_SUPPORT.
> 
> No claim is made that the !ifdef version is well tested recently.
> I do remember it working way back when though.
> 
> Which application did you have in mind?


Basically I'm trying to build the gas tables at present, though the simulator
will be next after I get gas/bfd/ld working.  My machine is sort of like the
IA-64 in that it is a 64-bit machine with a 64-bit address space, and the
instructions are encoded as 3 instructions within a 128-bit field.  I see the
error when trying to use the ia64 machine as a reference port:

--> /home/meissner/fsf-src/uberbaum/cgen --prefix=/home/meissner/tools/linux --target=ia64-linux
--> make GUILE=~/install/guile-1.4.1/bin/guile opcodes
rm -f tmp-opc.h tmp-itab.c
rm -f tmp-asm.in tmp-dis.in tmp-ibld.h tmp-ibld.in
/home/meissner/install/guile-1.4.1/bin/guile -s /home/meissner/fsf-src/uberbaum/cgen/cgen-opc.scm \
-s /home/meissner/fsf-src/uberbaum/cgen \
-v \
-f " opinst" \
        -m all -a ia64 \
        -O tmp-opc.h -P tmp-opc.c -Q tmp-opinst.c \
        -B tmp-ibld.h -L tmp-ibld.in \
        -A tmp-asm.in -D tmp-dis.in
Skipping slib/sort, already loaded.
Skipping slib/random, already loaded.
cgen -s /home/meissner/fsf-src/uberbaum/cgen/cgen-opc.scm -s /home/meissner/fsf-src/uberbaum/cgen -v -f " opinst" -m all -a ia64 -O tmp-opc.h -P tmp-opc.c -Q tmp-opinst.c -B tmp-ibld.h -L tmp-ibld.in -A tmp-asm.in -D tmp-dis.in 
Setting option `opinst' to "".
Loading cpu description /home/meissner/fsf-src/uberbaum/cgen/cpu/ia64.cpu
Including file simplify.inc ...
ERROR: /home/meissner/fsf-src/uberbaum/cgen/cpu/ia64.cpu:55: unknown entry type:
 (eval (begin (set! INT (mode:add! (quote INT) (mode:lookup (quote DI)))) (set! UINT (mode:add! (quote UINT) (mode:lookup (quote UDI)))) (set! WI (mode:add! (quote WI) (mode:lookup (quote DI)))) (set! UWI (mode:add! (quote UWI) (mode:lookup (quote UDI)))) (set! AI (mode:add! (quote AI) (mode:lookup (quote UDI)))) (set! IAI (mode:add! (quote IAI) (mode:lookup (quote UDI))))))
No backtrace available.
make: *** [opcodes] Error 1

If I just do a (mode:lookup (quote DI)) it gives the same error message.

-- 
Michael Meissner
email: gnu@the-meissners.org
http://www.the-meissners.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]