user3089627
user3089627

Reputation: 11

inline-Assembler compiler error messages

The machine i use is 64-bit, I wrote inline assembly code like this

__asm__ (
     "mov %cl TEMP_CHAR \n"
     "xor %eax, %eax \n"
     "mov %eax, A \n"
     "rcr %eax, %cl \n"
     "mov TEMP_B, %eax \n"
     )

Using gcc compiler, When I compile with it using commaand line It turns out errors as follow

/tmp/ccK8W7qx.s: Assembler messages: /tmp/ccK8W7qx.s:177 : Error: suffix or operands invalid for 'rcr'

I wonder why this happens. Could anybody help me out?

Upvotes: 1

Views: 194

Answers (1)

gsg
gsg

Reputation: 9377

AT&T syntax has the operands the other way: rcr %cl, %eax. You'll probably want to change the other intructions, too.

Upvotes: 0

Related Questions