Bug 135906 - [JSC] Build error on ARM64 with gcc: JSC::ARM64Assembler::RegisterID coerced into 5-bit bit field
Summary: [JSC] Build error on ARM64 with gcc: JSC::ARM64Assembler::RegisterID coerced ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 108645
  Show dependency treegraph
 
Reported: 2014-08-13 14:57 PDT by Akos Kiss
Modified: 2014-08-21 02:01 PDT (History)
3 users (show)

See Also:


Attachments
Proposed patch. (1.98 KB, patch)
2014-08-13 15:06 PDT, Akos Kiss
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Akos Kiss 2014-08-13 14:57:20 PDT
When compilig JSC for arm64 with gcc, the following error is raised:

Source/JavaScriptCore/assembler/ARM64Assembler.h:629:48: error: 'JSC::ARM64Assembler::LinkRecord::<anonymous union>::RealTypes::m_compareRegister' is too small to hold all values of 'JSC::ARM64Assembler::RegisterID {aka enum JSC::ARM64Registers::RegisterID}' [-Werror]
                 RegisterID m_compareRegister : 5;

This is because zr = 0x3f in RegisterID, so at least 6 bits are needed, but we only have 5.

CopyTypes, sharing an enum with RealTypes, is 3 x 64 bits, so increasing the size of the RealTypes::m_compareRegister bit field seems to be a valid solution.
Comment 1 Akos Kiss 2014-08-13 15:06:41 PDT
Created attachment 236554 [details]
Proposed patch.
Comment 2 WebKit Commit Bot 2014-08-13 15:07:36 PDT
Attachment 236554 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/assembler/ARM64Assembler.h:628:  Please declare enum bitfields as unsigned integral types.  [runtime/enum_bitfields] [5]
ERROR: Source/JavaScriptCore/assembler/ARM64Assembler.h:629:  Please declare enum bitfields as unsigned integral types.  [runtime/enum_bitfields] [5]
Total errors found: 2 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Michael Saboff 2014-08-13 22:31:21 PDT
Comment on attachment 236554 [details]
Proposed patch.

r=me
Comment 4 WebKit Commit Bot 2014-08-14 01:50:01 PDT
Comment on attachment 236554 [details]
Proposed patch.

Clearing flags on attachment: 236554

Committed r172578: <http://trac.webkit.org/changeset/172578>
Comment 5 WebKit Commit Bot 2014-08-14 01:50:04 PDT
All reviewed patches have been landed.  Closing bug.