3.2.8 String Instructions
The string instructions operate on strings of bytes. Operations
include storing strings in memory, loading strings from memory, comparing
strings, and scanning strings for substrings.
Note - The Oracle Solaris mnemonics for certain instructions differ slightly
from the Intel/AMD mnemonics. Alphabetization of the table below is by the
Oracle Solaris mnemonic. All string operations default to long (doubleword).
Table 3-9 String Instructions
| | | |
| CMPS
| compare string
| cmpsq valid only under –m64
|
| CMPSB
| compare byte string
|
|
| CMPSD
| compare doubleword string
|
|
| CMPSW
| compare word string
|
|
| LODS
| load string
| lodsq valid only under –m64
|
| LODSB
| load byte string
|
|
| LODSD
| load doubleword string
|
|
| LODSW
| load word string
|
|
| MOVS
| move string
| movsq valid only under –m64
|
| MOVSB
| move byte string
|
|
| MOVSD
| move doubleword string
|
|
| MOVSW
| move word string
|
|
| REP
| repeat while %ecx not zero
|
|
| REPNE
| repeat while not equal
|
|
repnz
| REPNZ
| repeat while not zero
|
|
| REPE
| repeat while equal
|
|
repz
| REPZ
| repeat while zero
|
|
| SCAS
| scan string
| scasq valid only under –m64
|
| SCASB
| scan byte string
|
|
| SCASD
| scan doubleword string
|
|
| SCASW
| scan word string
|
|
| STOS
| store string
| stosq valid only under –m64
|
| STOSB
| store byte string
|
|
| STOSD
| store doubleword string
|
|
| STOSW
| store word string
|
|
|