Re: What does 32 bit application mean?

Florian Weimer <fw@deneb.enyo.de>
1 Aug 2005 15:20:33 -0400

          From comp.compilers

Related articles
What does 32 bit application mean? jatinb@noida.hcltech.com (Jatin Bhateja, Noida) (2005-07-28)
Re: What does 32 bit application mean? Juergen.Kahrs@vr-web.de (=?ISO-8859-1?Q?J=FCrgen_Kahrs?=) (2005-07-31)
Re: What does 32 bit application mean? DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2005-07-31)
Re: What does 32 bit application mean? fw@deneb.enyo.de (Florian Weimer) (2005-08-01)
Re: What does 32 bit application mean? marcov@stack.nl (Marco van de Voort) (2005-08-03)
Re: What does 32 bit application mean? marcov@stack.nl (Marco van de Voort) (2005-08-05)
Re: What does 32 bit application mean? freitag@alancoxonachip.com (Andi Kleen) (2005-08-05)
| List of all articles for this month |
From: Florian Weimer <fw@deneb.enyo.de>
Newsgroups: comp.compilers
Date: 1 Aug 2005 15:20:33 -0400
Organization: Compilers Central
References: 05-07-110
Keywords: architecture, practice
Posted-Date: 01 Aug 2005 15:20:33 EDT

* Jatin Bhateja:


> My question might sound trivial but I am not able to get an
> satisfying answer yet. Question is what do one understand when we
> say that an application is 32 bit or 64bit. Does this means that the
> compiler is compiled for 32 bit machine. If so this means that the
> application will use 32/64 bit registers. I have got two answers
> with me but I don't know exactly which one is correct. Kindly clear
> my doubt :


The term "32-bit application" mostly dates back to the days of
Windows 95, where it was used to differentiate between traditional
16-bit Windows applications and Win32 applications.


> Answer 1: When an application is compiled for and if the assembly
> generated by the compiler uses 32 bit register then we say that an
> application is 32 bit application. Thus it corresponds to the register
> size of an architecture.
>
> Answer 2: An application which contains 32 bit (virtual) addresses in
> its assembly is called an 32 bit application.


AFAIK, the terminology used to tell these two cases apart is
platform-dependent (both cases fall under the ILP32 model). On IRIX,
the first option is called the o32 ABI, and the second one is n32. I
believe Solaris/SPARC offers a similar choice.


Most operating systems supporting AMD64 do not currently offer such a
choice, which is a bit disappointing. The extended register set would
benefit ILP32 applications as well (which generally run faster because
smaller pointers result in a smaller working set).


> If my logical understanding is correct then can we make some tool
> such that if the compiler produces 64 bit code (contain 64 bit
> register) the tool will convert the 64 bit instructions to 32 bit
> instructions. Thus this 32 bit code can then be processed by
> assembler for 32 bit architecture.


This might work efficiently for some RISC architectures (but I doubt
it's worth the effort), but on AMD64, it will fail completely.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.