'Register size of the architecture' is an ambiguous term. An x86-64
machine running in compatibility mode (which is how 32bit programs are
run under a 64bit OS) has 16bit, 32bit and 64bit registers available,
According to
http://support.amd.com/us/Embedded_TechDocs/24593.pdf (S.
1.3 Operating Modes, p. 11) this is not true. In compatibility mode the
GPRs are limited to 32 bit. But that's not the point.
but the default address size is still 32 bits.
I would define a "32 bit program" or a "program built at/for 32 bits" as
an executable which was built to run at an architecture with 32 bit
registers (for example 686). It may run on an architecture where larger
registers are available but that't not the target architecture.
Of course there may be architectures with different register sizes (in
fact the x86 architecture is a good example because it has always had 80
bit FP registers (on an optional coprocessor until the 486), and in
this case "register size" is ambiguous.
The normal meaning of this question is 'what size are my pointers', to
which the answer is perl -V
trsize.
On the (2)86 a pointer could be (and frequently was) 32 bit. On a 386 a
pointer could be 48 bit (although I don't know any OS which ever
implemented it). I'd hesitate to call a program using far pointers on a
286 a 32-bit program and on a 386 a 48-bit program. To me the 286 was a
16-bit architecture and the 386 a 32 bit architecture, and I would call
programs built for the 286 16-bit programs and for the 386 32-bit
programs. (there is another ambiguity here: On the 386, a program was
able to access the 32-bit registers in real or 16-bit protected mode,
and there were programs which did this. They may even have used only
near (16-bit) pointers - were the 16-bit or 32-bit programs? But I'm
digressing)
[about the (lack of) relevance of use64bitint and iv_size]
It's possible at least on some architectures to choose whether to
use64bitall or not (otherwise the option wouldn't exist).
I meant that use64bitall=define is an indication that the architecture
supports 64 bit pointers, and therefore is almost certainly a 64 bit
architecture (but not necessarily: It could be segmented or
capability-based). I didn't mean to imply that use64bitall=undef means a
32 bit architecture.
hp