3 ms·
x86-64 does not have an addressing mode that uses the 8-bit register alias; in particular, the base and index registers are always either 32-bit (in 32-bit mode
by bdonlan 5y ago
x86-64 does not have an addressing mode that uses the 8-bit register alias; in particular, the base and index registers are always either 32-bit (in 32-bit mode) or 64-bit (in 64-bit mode). As such, you need to zero-extend AL to a 64-bit register before using it in an offset addressing mode (or use XLATB).
For more information on supported addressing modes, see the manual: https://www.intel.com/content/www/us/en/develop/download/intel-64-and-ia-32-architectures-sdm-combined-volumes-1-2a-2b-2c-2d-3a-3b-3c-3d-and-4.html https://www.intel.com/content/www/us/en/develop/download/int... (specifically volume 1, section 3.7.5)
- rep_lodsb 5y agoOne could get rid of the push / pop though, assuming that the high bits of EAX don't need to be saved: movzx eax,al ;could also do "and eax,0ffh" mov al,[rbx+rax]