I am trying to make a simple asm built-in command Cand compile it with gcc. I want to push a variable numonto the stack:
asm (
"push %0"
:
: "r"(num)
:
);
The above error:
Error: expression too complex -- `push r3'
I am following this tutorial and I have not found anything about the team push.
I also tried:
asm ( "push %num" );
and
asm ( "push %[num]" ); //gcc error: undefined named operand 'num'
But no one worked.
change
I use this compiler: arm-linux-gnueabihf-gcc
source
share