:96: Error: `(%rax,%edx,4)' is not a valid base/index expression
line97: Error: `-4(%rax,%edx,4)' is not a valid base/index expression
line101: Error: `(%rax,%edx,4)' is not a valid base/index expression
line102: Error: `-4(%rax,%edx,4)' is not a valid base/index expression
I get these error messages and am not sure how to fix it.
This is my code:
__asm__ (
"loop: \n\t"
"movl $1,%3\n\t"
"movl $0, %6\n"
"start: \n\t"
"movl (%1,%3,4),%4\n\t"
"movl -4(%1, %3, 4), %5\n\t"
"cmpl %4, %5\n\t"
"jle next\n\t"
"xchgl %4, %5\n\t"
"movl %4, (%1, %3, 4)\n\t"
"movl %5, -4(%1, %3, 4)\n\t"
"movl $1, %6\n\t"
"next: \n\t"
"incl %3 \n\t"
"cmpl %3, %2\n\t"
"jge start\n\t"
"cmpl $0, %6\n\t"
"je end\n\t"
"jmp loop\n\t"
"end: \n\t"
Some help explaining how to fix these error message, please. I am trying to make a bubble sort in ASM.