amd64 bit chips

Ed Hill ed at eh3.com
Tue Oct 18 03:01:12 UTC 2005


On Mon, 2005-10-17 at 18:49 -0700, Kenneth Porter wrote:
> Do you happen to know of any CPU-detection resources for 64-bit? I'm doing 
> some game development and there's a piece of assembler that determines what 
> CPU features are available, and I need to port that to AMD64.
> 
> The other piece of code I need to port is serialization logic that turns 
> pointers into 32-bit unsigned tags, and stores the tag back into the 
> pointer before streaming to disk or network. I'll probably have to create 
> dual class stacks to hold the on-media 32-bit-compatible form and the 
> in-memory version with 64-bit pointers.

Hi Kenneth,

Do you have to write the hardware-detection code in C or assembly?  I
ask because one way to solve the hardware-detection problem is to ship
two or more binaries that have each been optimized/tuned for different
processors or processor capabilities (eg. multi-processor, SSE2, SSE3,
etc.).  When the user runs the program, he/she calls a shell script (eg.
bash) that determines what sort of hardware and OS support are present
and then selects and runs the best binary for that machine.  I've seen
many applications that use this shell-script-wrapper approach and it can
work in a graceful and user-friendly fashion.

And I've yet to encounter the pointer serialization problem that you
describe (luckily, all my C++ objects can be serialized without use of
pointers).

Good luck with your code!

Ed

-- 
Edward H. Hill III, PhD
office:  MIT Dept. of EAPS;  Rm 54-1424;  77 Massachusetts Ave.
             Cambridge, MA 02139-4307
emails:  eh3 at mit.edu                ed at eh3.com
URLs:    http://web.mit.edu/eh3/    http://eh3.com/
phone:   617-253-0098
fax:     617-253-4464




More information about the fedora-list mailing list