[cfe-dev] Question about inline Assembler - Visual Studio Style
via cfe-dev
cfe-dev at lists.llvm.org
Tue Feb 21 07:26:04 PST 2017
Hello friendly Clang-World,
this is my first time using a mailing list, so I hope I do everything
right. For my company I try to compile some old x86 code with clang, which
compiled with Visual Studio 6. There I found the following macro:
#define POINT_TO_LABEL(variable, address) { void* dest; __asm push eax
__asm mov eax, offset seq_lbl##address __asm mov dest,eax __asm {pop eax}
variable = dest;}
Clang says:
error: unexpected token in
argument list
POINT_TO_LABEL(pTableOfEntryPoints[seq_BEGINROW(1)],seq_BeginRow1);
^
Include\vSeqCodeModule.h(183,155): note: expanded from macro
'POINT_TO_LABEL'
...seq_lbl##address __asm mov dest,eax __asm {pop eax} variable = dest;}
^
When I remove the {} from the last __asm code, the error from the '='
disappears, but the first message keeps coming.
So... What is the problem? Is this kind of inline assembler not compatible
with Clang?
I have a second question for a private project. Do I have to send another
mail with this question?
Kind regards from Germany
Björn
Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816,
USt.ID-Nr. DE 114 165 789
Geschäftsführer: Hiroshi Kawamura, Dr Hiroshi Nakamura, Markus Bode, Heiko
Lampert, Takashi Nagano, Takeshi Fukushima.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170221/6e4250e2/attachment.html>
More information about the cfe-dev
mailing list