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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 11 19:23:06 PDT 2019


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

Christopher Reid <chris.reid at sony.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |chris.reid at sony.com

--- Comment #21 from Christopher Reid <chris.reid at sony.com> ---
Comment on attachment 371733
  --> https://bugs.webkit.org/attachment.cgi?id=371733
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.

-- 
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/3c2f60ec/attachment.html>


More information about the webkit-unassigned mailing list