* 32-bit gcc help
2004-07-07 16:22 ` steve
@ 2004-07-07 17:13 ` michal
2004-07-08 0:29 ` france
2004-07-08 2:11 ` mharris
2 siblings, 0 replies; 6+ messages in thread
From: michal @ 2004-07-07 17:13 UTC (permalink / raw)
On Wed, Jul 07, 2004 at 09:22:09AM -0700, Stephen Williams wrote:
>
> Also, the DEC compiler for alpha had a "32bit" mode that limited
> the sizes of things in the same way. It needed operating system
> support to keep the application address space within a 32bit
> pointer.
If you will dig deep enough then you will find out that gcc has also
this '-taso' (or this was '-xtaso'?) mode. At least in some version.
Pointers really have then an upper half always zero and you have to fix
binutils, a loader in particular, to load your program that way that
addresses satisfy that "zeros in high bits" condition. If you will dig
deep enough you should find some patches. I do not think that anybody
ever pursued that in depth and checked what else may then break. I guess
that you need to ensure somehow that library calls will not ever return
a "too wide" address or value which probably means "32-bit library
variants". A flag EF_ALPHA_32BIT for an ELF header is most likely still
there.
For the particular problem of OP I would rather look at fixing
that configure script and/or program. :-)
Michal
^ permalink raw reply [flat|nested] 6+ messages in thread
* 32-bit gcc help
2004-07-07 16:22 ` steve
2004-07-07 17:13 ` michal
@ 2004-07-08 0:29 ` france
2004-07-08 2:11 ` mharris
2 siblings, 0 replies; 6+ messages in thread
From: france @ 2004-07-08 0:29 UTC (permalink / raw)
Hi,
On Wednesday 07 July 2004 12:22 pm, Stephen Williams wrote:
> Mike A. Harris wrote:
> > If you were using AMD64 architecture, you could use -m32 to
> > compile 32bit x86 binaries, as the CPU can run both native 32bit
> > and 64bit code. ia64 can do similar with emulation, and ppc64
> > can run 32bit ppc binaries also. There never was a 32bit Alpha,
> > so it has no such capability.
>
> Actually, Windows NT/alpha and Microsoft C/RISC edition was
> definitely *32* bit. It was not compatible with any 32bit alpha
> which never existed) but int/long/void* were 32bit as the
> compiler generated them, so 32bit applications didn't need to
> be ported, per se. (M$ never made a 64bit system/compiler for
> alpha, so far as I know.)
>
Windows NT/Alpha was 64bit, not 32. The product announce is at the URL below:
http://www.winnetmag.com/Article/ArticleID/16872/16872.html
> Also, the DEC compiler for alpha had a "32bit" mode that limited
> the sizes of things in the same way. It needed operating system
> support to keep the application address space within a 32bit
> pointer.
This is also not accurate, but not worth going into at this time.
Best Regards,
--George
^ permalink raw reply [flat|nested] 6+ messages in thread
* 32-bit gcc help
2004-07-07 16:22 ` steve
2004-07-07 17:13 ` michal
2004-07-08 0:29 ` france
@ 2004-07-08 2:11 ` mharris
2 siblings, 0 replies; 6+ messages in thread
From: mharris @ 2004-07-08 2:11 UTC (permalink / raw)
On Wed, 7 Jul 2004, Stephen Williams wrote:
>Date: Wed, 07 Jul 2004 09:22:09 -0700
>From: Stephen Williams <steve at icarus.com>
>To: Linux and Red Hat on Alpha processors <axp-list at redhat.com>
>Content-Type: text/plain; charset=us-ascii; format=flowed
>Reply-To: Linux and Red Hat on Alpha processors <axp-list at redhat.com>
>X-BeenThere: axp-list at redhat.com
>Subject: Re: 32-bit gcc help
>
>Mike A. Harris wrote:
>
>> If you were using AMD64 architecture, you could use -m32 to
>> compile 32bit x86 binaries, as the CPU can run both native 32bit
>> and 64bit code. ia64 can do similar with emulation, and ppc64
>> can run 32bit ppc binaries also. There never was a 32bit Alpha,
>> so it has no such capability.
>
>Actually, Windows NT/alpha and Microsoft C/RISC edition was
>definitely *32* bit. It was not compatible with any 32bit alpha
>which never existed) but int/long/void* were 32bit as the
>compiler generated them, so 32bit applications didn't need to
>be ported, per se. (M$ never made a 64bit system/compiler for
>alpha, so far as I know.)
This information is very inaccurate and misleading.
>Also, the DEC compiler for alpha had a "32bit" mode that limited
>the sizes of things in the same way. It needed operating system
>support to keep the application address space within a 32bit
>pointer.
This isn't entirely accurate either.
The big problem with Windows, is that it was never designed to be
portable in the first place, so it has a lot of 32bit assumptions
everywhere which wont go away likely ever. Most Win32 developers
also write non-portably and their apps are doomed to remain 32bit
without major effort to port to be 64bit clean.
On the Win64 ABI on AMD64 architecture, Microsoft decided to nail
long at 4 bytes instead of the usual 8 bytes. It is this type of
trickery which will allow developers to recompile 32bit apps on
Win64 without a lot of problems related to invalid type size
assumptions.
Windows on Alpha has it's own quirks in a similar vein, but not
really something I care to delve into.
The Alpha is a 64bit CPU, which runs 64bit operating systems.
Not all 64bit operating systems or ABI's were created equal, and
Windows on Alpha shows that.
--
Mike A. Harris ftp://people.redhat.com/mharris
OS Systems Engineer - X11 Developer - Red Hat
^ permalink raw reply [flat|nested] 6+ messages in thread