x86 string instructions Intel -> AT&T

Programming, for all ages and all languages.
Post Reply
srg

x86 string instructions Intel -> AT&T

Post by srg »

Hi

What are the x86 string instructions in AT&T syntax

for example

CMPS m8, m8
CMPS m16, m16
CMPS m32, m32
CMPSB
CMPSW
CMPSD

the last three allready have b, w, and d at the end would these all be:

CMPSb m8, m8
CMPSd m16, m16
CMPSl m32, m32
CMPSBb
CMPSWw
CMPSDl

thanks
srg
AR

Re:x86 string instructions Intel -> AT&T

Post by AR »

CMPSB, CMPSW and CMPSD already have the letters suffixed on. They work as is. (So does STOSB, STOSW and STOSD as well)

As for CMPS, you are right with the suffixes.
srg

Re:x86 string instructions Intel -> AT&T

Post by srg »

Another problem I'm having:

movl $(PAGE_SIZE / 4), %ecx

I get: Error: unbalanced parenthesis in operand 1.

yet earlier in the program

movl $(PAGE_SIZE * 5), %ecx

is fine

PAGE_SIZE is a define BTW:
#define PAGE_SIZE            0x1000
Post Reply