[Webkit-unassigned] [Bug 198604] Refactoring of architectural Register Information

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 12 02:20:51 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=198604

--- Comment #24 from Paulo Matos <pmatos at igalia.com> ---
(In reply to Christopher Reid from comment #21)
> Comment on attachment 371733 [details]
> Revised Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=371733&action=review
> 
> > Source/JavaScriptCore/assembler/X86_64Registers.h:33
> > +#define macro(m, ...) m(__VA_ARGS__)
> 
> The wincairo build is failing because MSVC expands the m(__VA_ARGS__)
> differently.
> Instead of expanding each VA_ARG in to its own parameter for the REGISTER_ID
> macro call, it calls REGISTER_ID with all the VA_ARGS as the first parameter.
> The RegisterID enum was expanding out to
> > typedef enum : int8_t {
> >    eax, X86Registers::eax, "rax", 0, 0, ecx, X86Registers::ecx, ...
> >    InvalidGPRReg = -1,
> > } RegisterID;
> https://godbolt.org/z/4FzLe4
> 
> Adding something like this in X86Registers.h and X86_64Registers.h got
> wincairo building locally
> > #if COMPILER(MSVC)
> > #define EXPAND_ARGS(x) x
> > #define macro(m, ...) EXPAND_ARGS(m(__VA_ARGS__))
> > #else
> > #define macro(m, ...) m(__VA_ARGS__)
> > #endif
> 
> I'm not too sure why apple win didn't also get hit by this.
> I created a bug to look at switching to MSVC's experimental preprocessor to
> try and avoid these in the future
> https://bugs.webkit.org/show_bug.cgi?id=198778.


Thanks Chris. I will use your workaround for now for MSVC and keep an eye on your bug. If we adopt the new preprocessor then we can come back and simplify the code.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190612/cb46dffa/attachment.html>


More information about the webkit-unassigned mailing list