windows - Are 32-bit software builds typically 64-bit optimized? -
edit: found out (thanks ben voigt pointing out) proposition wasn't possible. posterity here's basic question, less prior misconception amd's extensions:
i had been wondering whether common 32-bit builds of (particularly windows) software detect presence of 64-bit processor , utilize 64-bit operands , larger register file if 1 present. assuming possible 32-bit process utilize 64-bit instructions in same way possible 16-bit processes on i386 utilize 32-bit instructions when such cpu physically present, via encoding override prefixes. however, not possible pointed out in answers below.
why want use 64-bit instructions 32-bit addressing?
well, let's know dataset working on small enough fit in address space. instance, you've used 64-bit version of program and, you're using for, performance monitoring tells process using 2gb or less. (actually, according this, 32-bit process image_file_large_address_aware flag set 4gb user-space in 64-bit windows.)
some figure doesn't matter, actually, might. in 64-bit build, if not mistaken, every single pointer program stores consume twice physical ram needs to! if program uses lot of pointers (for instance, due linked lists or hash tables), add , reduce cache efficiency, etc.
unfortunately pointed out in ben voigt's answer below not possible @ in windows, while mode dedicated purpose has been done in linux.
in fact, whether program 32- or 64-bit image strictly speaking determines addressing mode, not cpu features uses, including data word size (barring api/library calls expect given size.)
no, incorrect. in windows, 32-bit vs 64-bit synonymous 2 supported intel architectures , instruction sets. (yes, there other architectures supported -- alpha, itanium, arm -- these explicitly stated.)
a binary such describe "x86_64 architecture, tiny memory model" (commonly called x32
short), tiny memory model means pointers smaller system word size, , data , code share same address space. people have made linux systems this.
it totally incompatible "32-bit" x86 code. x86 instructions don't have encodings additional registers. mode bits of cpu have set differently support x86_64 instructions. it's similar concept of "based-addressing" , relative pointers existed in days of 16-bit memory models.
x32 code uses x86_64 instructions, , uses instructions dealing 32-bit data accessing , performing computations pointers. made possible virtual memory logic restricts virtual addresses range (-2gb:+2gb), normal sign extension associated loading 32-bit variables 64-bit registers creates valid 64-bit pointers.
when cpu in "long mode" in order support instructions accessing registers, can't decode x86 instructions correctly. example, 0100 0000 add instruction in x86, mov in x86_64.
in summary, possible 64-bit code use 32-bit pointers, allocator. not possible mix use of additional registers 32-bit code.
Comments
Post a Comment