As title says, is there any elegant and safe way to determine if architecture is 32bit or 64bit. By elegant, you can think of precise, correct, short, clean, and smart way.
32-bit on the code bank or 32-bit on the data bank. :-) 8086 processors had 16-bit data with 20-bit code memory. Also, modern Havard machines do odd things with code/data separation...
You might check the cpuid
instruction for x86 processors. Other processor families may not have such an instruction...YMMV.