I am really confused with this subject. I am using LLVM 4.1 compiler on Xcode and when I compile a simple basic code like this in 32 bit or x64 or x64-x86 mode with ARC off, everything is ok
but if I compile with Automatic Reference Counting mode; I receive BAD_ACCESS
error.
This is a sample code:
-(void) doNothing{
__asm__ volatile(
"pushl %ebp;"
"movl %esp , %ebp ;"
"movl %eax , -4(%ebp);"
"movl %ebp, %esp;"
"popl %ebp;"
"leave;"
"ret " // retl in x86
);
}
I tried to figure out the source of error I found that the push/pops are the only parts that work in ARC mode!
It is so frustrating because I have written a huge code in past in inline assembly and now I have to joint it to a module with ARC. Now if I can't solve it , I may need to revise all that module for working without ARC !
Can anyone help me on that?