12.07.2015 Views

Intel® Extended Memory 64 Technology Software Developer's Guide

Intel® Extended Memory 64 Technology Software Developer's Guide

Intel® Extended Memory 64 Technology Software Developer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1.7. GENERAL RULES FOR <strong>64</strong>-BIT MODEIn <strong>64</strong>-bit mode, the following general rules apply to changes in instructions and their operands:• If an instruction's operand size in legacy mode (16-bit or 32-bit) depends on the effective operand size(dependent on CS.D and prefix overrides); operand-size choices are extended in <strong>64</strong>-bit mode from 16-bit and 32-bit to include <strong>64</strong> bits, or the operand size is fixed at a size that supports <strong>64</strong>-bit operands. Such instructions are saidto be ‘promoted to <strong>64</strong> bits’. However, byte-operand opcodes of such instructions are not promoted.• As stated above, the byte-operand opcodes of promoted instructions are not usually promoted. Those instructionscontinue to operate only on bytes.• If an instruction's operand size is fixed in legacy mode (independent of CS.D and prefix overrides), that operandsize is usually fixed at the same size in <strong>64</strong>-bit mode. For example, CPUID operates on the same-size operands inlegacy mode and <strong>64</strong>-bit mode. There are some exceptions.• Operations on 32-bit operands in <strong>64</strong>-bit mode zero-extend the high 32 bits of <strong>64</strong>-bit GPR destination registers.• When operating on 8-bit (or 16-bit) operands in <strong>64</strong>-bit mode, the high 56 (or 48) bits of <strong>64</strong>-bit GPR destinationregisters are unchanged.• When the operand size is <strong>64</strong> bits, the shift and rotate instructions use one additional bit (6 bits total) to specifyshift-count or rotate-count, allowing <strong>64</strong>-bit shifts and rotates.• The maximum size of immediate operands remains 32 bits, except that <strong>64</strong>-bit immediates can be moved to <strong>64</strong>-bitGPRs. When the operand size is <strong>64</strong> bits, immediates are sign-extended to <strong>64</strong> bits prior to using them.• Branch-address displacements remains 8 bits or 32 bits, but they are sign-extended to <strong>64</strong> bits prior to using them.• When the processor makes transitions from <strong>64</strong>-bit mode to compatibility or legacy modes, it does not preservethe upper 32 bits of the <strong>64</strong>-bit GPRs. In compatibility or legacy mode, only the lower 32 bits of the GPRS aredefined.1.7.1. Other <strong>Guide</strong>lines• In the initial implementation of Intel EM<strong>64</strong>T, an operand-size prefix (66H) is ignored when used in <strong>64</strong>-bit modewith a near branch. In <strong>64</strong>-bit mode, a near branch uses 32-bit displacement (the instruction pointer is advanced toa linear address that is the next sequential instruction offset by a 32 bit displacement, sign extended to <strong>64</strong>-bit).<strong>Software</strong> must not rely on this behavior as future implementations may be different.• In <strong>64</strong>-bit mode, when the value of the source operand for BSR/BSF is 0, the upper 32 bits of the registers arecleared.Vol. 1 1-37

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!