Compaq ECQD2KCTE manual Byte Manipulation Instructions, Instruction Meaning Described in Section

Models: ECQD2KCTE

1 371
Download 371 pages 20.35 Kb
Page 103
Image 103

4.6 Byte Manipulation Instructions

Alpha implementations that support the BWX extension provide the following instructions for loading, sign-extending, and storing bytes and words between a register and memory:

Instruction

Meaning

Described in Section

 

 

 

LDBU/LDWU

Load byte/word unaligned

4.2.2

SEXTB/SEXTW

Sign-extend byte/word

4.6.5

STB/STW

Store byte/word

4.2.6

 

 

 

The AMASK instruction reports whether a particular Alpha implementation supports the BWX extension. AMASK is described in Sections 4.11.1 and D.3.

LDBU and STB are the recommended way to perform byte load and store operations on Alpha implementations that support them; use them rather than the extract, insert, and mask byte instructions described in this section. In particular, the implementation examples in this sec- tion that illustrate byte operations are not appropriate for Alpha implementations that support the BWX extension – instead use the recommendations in Section A.4.1.

In addition to LDBU and STB, Alpha provides the instructions in Table 4–7for operating on byte operands within registers.

Table 4–7: Byte-Within-Register Manipulation Instructions Summary

Mnemonic

Operation

 

 

CMPBGE

Compare Byte

EXTBL

Extract Byte Low

EXTWL

Extract Word Low

EXTLL

Extract Longword Low

EXTQL

Extract Quadword Low

EXTWH

Extract Word High

EXTLH

Extract Longword High

EXTQH

Extract Quadword High

INSBL

Insert Byte Low

INSWL

Insert Word Low

INSLL

Insert Longword Low

INSQL

Insert Quadword Low

 

 

Instruction Descriptions 4–47

Page 103
Image 103
Compaq ECQD2KCTE manual Byte Manipulation Instructions, Instruction Meaning Described in Section