![Intel ITANIUM ARCHITECTURE Manual Download Page 64](http://html.mh-extra.com/html/intel/itanium-architecture/itanium-architecture_manual_2073403064.webp)
Volume 4: Base IA-32 Instruction Reference
4:57
CBW/CWDE—Convert Byte to Word/Convert Word to Doubleword
Description
Double the size of the source operand by means of sign extension. The CBW (convert
byte to word) instruction copies the sign (bit 7) in the source operand into every bit in
the AH register. The CWDE (convert word to doubleword) instruction copies the sign (bit
15) of the word in the AX register into the higher 16 bits of the EAX register.
The CBW and CWDE mnemonics reference the same opcode. The CBW instruction is
intended for use when the operand-size attribute is 16 and the CWDE instruction for
when the operand-size attribute is 32. Some assemblers may force the operand size to
16 when CBW is used and to 32 when CWDE is used. Others may treat these
mnemonics as synonyms (CBW/CWDE) and use the current setting of the operand-size
attribute to determine the size of values to be converted, regardless of the mnemonic
used.
The CWDE instruction is different from the CWD (convert word to double) instruction.
The CWD instruction uses the DX:AX register pair as a destination operand; whereas,
the CWDE instruction uses the EAX register as a destination.
Operation
IF OperandSize = 16 (* instruction = CBW *)
THEN AX
SignExtend(AL);
ELSE (* OperandSize = 32, instruction = CWDE *)
EAX
SignExtend(AX);
FI;
Flags Affected
None.
Additional Itanium System Environment Exceptions
Itanium Reg Faults NaT Register Consumption Abort.
Exceptions (All Operating Modes)
None.
Opcode
Instruction
Description
98
CBW
AX
sign-extend of AL
98
CWDE
EAX
sign-extend of AX
Summary of Contents for ITANIUM ARCHITECTURE
Page 1: ......
Page 7: ...402 Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Page 199: ...4 192 Volume 4 Base IA 32 Instruction Reference FWAIT Wait See entry for WAIT ...
Page 352: ...Volume 4 Base IA 32 Instruction Reference 4 345 ROL ROR Rotate See entry for RCL RCR ROL ROR ...
Page 589: ...4 582 Volume 4 IA 32 SSE Instruction Reference ...
Page 590: ...Index Intel Itanium Architecture Software Developer s Manual Rev 2 3 Index ...
Page 591: ...Index Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Page 603: ...INDEX Index 12 Index for Volumes 1 2 3 and 4 ...
Page 604: ......