<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 16, 2010, at 12:30 AMPDT, Fred / Kettch wrote:</div><blockquote type="cite"><font class="Apple-style-span" color="#000000"><br></font>I recently switched to LLVM-GCC 4.2 on OS X, to go around a bug caused by gcc with optimized code. Unfortunately, I ran into another weird problem on LLVM-GCC. In my code, there's a file with a bunch of inline assembly blocks, that worked fine with GCC 4.2. Now, when compiling with LLVM-GCC 4.2, weird things happen.<br>
<br>Here's an example: (the blocks are larger than that, but a single line will do to show you what's happening)<br>__asm {<br>   mov ebx, iObject<br>}<br><br>The problem occurs in debug, and the code looks like this :<br>
## InlineAsm Start<br>
.file "... my filename"<br>
## InlineAsm End<br>
## InlineAsm Start<br>
.line 1454<br>
## InlineAsm End<br>
## InlineAsm Start<br>
movl -20(%ebp), $ebx<br>
## InlineAsm End<br>movl %ebx, %eax<br>movl %eax, -52(%ebp)<br></blockquote></div><br><div>This is something I fixed recently; I think it produces functionally correct code at -O0 now in TOT.  You will still see interpolated copies, and stack loads and stores, but it should no longer clobber registers that are explicitly used for something else.  You need to use -O to get good performance though.</div><div><br></div><div><br></div><div><br></div></body></html>