[fbsd_questions] i386 vs amd64, on intel_64

spellberg_robert emailrob at emailrob.com
Mon Oct 4 21:33:08 UTC 2010


howdy, y'all ---

these may be stupid questions and, if so, i am prepared to slap my forehead with the palm of my hand.



i recently acquired my first batch of intel cpus with 64_bit integer registers [ celeron 440 ],
   specifically for the 16 registers and the potential for a truly_gargantuan datasize.
intel has called this many things, currently "intel 64 architecture".

to me, this is just a bigger, faster "386",
   just like my "486" and several flavors of "pentium" [ now, all retired ].
i have never owned an amd cpu.
this may be the source of my confusion.

what prompted my recent searches was the observation, while working on my "killer_app",
   in <machine/types.h>, as i recall, that the size of an "intptr" is 32_bits.
[ i am aware of the gcc "double_integer" implementation of "64_bit" data_integers.
   that is not the issue; i want big memory.
]
i want my app to exist in two sizes, small [ 8_, 16_ and 32_bit integers and 32_bit pointers ] and
   large [ 8_, 16_, 32_ and 64_bit integers and 48_bit pointers ],
   the choice between the two being made by my users, according to their needs.
my objective is to produce both versions, simultaneously.

so, i have been looking at many pages, mostly at freebsd.org [ http and ftp ] and gcc.gnu.org,
   as well as some others [ release notes, in particular ].
the last question is the big one.



consider a dvd_image [ to pick an approach ] of a release to be found on ftp.freebsd.org.

   q:    if the release_name includes the string "i386",
           am i restricted to 8 32_bit registers and 32_bit pointers,
           notwithstanding its installation on an intel_64 platform ?



next, from what i have been reading,
   those releases whose names contain "amd64" not only are for amd cpus, but, also,
   are for the intel_64 variant [ no doubt, probing the cpu for its feature_set ].

   q:    if i install an "amd64" version on an "intel_64" platform,
           am i restricted to 16 64_bit registers and 48_bit pointers or
           can i compile for both cpu_models
           [ perhaps, with nothing more complicated than a compiler option ] ?



please cc.
in advance, thanks big_time.

rob



More information about the freebsd-questions mailing list