Open Quuxplusone opened 10 years ago
By the way, this syntax is documented in MSDN: http://msdn.microsoft.com/en-us/library/78cxesy1.aspx
"As in MASM programs, the dollar symbol ($) serves as the current location counter. It is a label for the instruction currently being assembled. In __asm blocks, its main use is to make long conditional jumps"
*blink* OK, sounds good, let's do it. :)
Attached MSVC-InlineAsm-Dollar.patch
(2473 bytes, application/octet-stream): MSVC Inline Asm Dollar WIP patch
I've spent a couple hours trying learning this part of the codebase and trying to add this to Clang but I've not been able to get it working. I've attached a work in progress patch, it goes a bit further and emits the inline assembly but there's some asm rewriting going on for translating immediates and it's output as "call $$$" which the assembler fails to deal with.
I'm not that familiar with either AT&T or Intel assembly and neither am I sure that the approach I am taking is the correct one so I'll leave more knowledge souls to deal with this.
FWIW I just rewrote this part of code in Mono to use labels and that works as an alternative in this specific case.
This was also the only issue I've found so far while compiling Mono with clang-cl, awesome job Reid & co. on improving the MS ABI these last couple of months.
MSVC-InlineAsm-Dollar.patch
(2473 bytes, application/octet-stream)