This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Use of DI mode on 32-bit hosts
- From: Doug Evans <dje at transmeta dot com>
- To: Michael Meissner <cgen-mail at the-meissners dot org>
- Cc: cgen at sources dot redhat dot com
- Date: Mon, 2 Jun 2003 10:45:13 -0700 (PDT)
- Subject: Use of DI mode on 32-bit hosts
- References: <20030602173232.GA5871@tiktok.the-meissners.org>
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?