<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>198014</bug_id>
          
          <creation_ts>2019-05-18 08:36:03 -0700</creation_ts>
          <short_desc>aarch64: ‘JSC::ARM64Assembler::LinkRecord::&lt;unnamed union&gt;::RealTypes::m_compareRegister’ is too small to hold all values of ‘JSC::ARM64Assembler::RegisterID’ {aka ‘enum JSC::ARM64Registers::RegisterID’}</short_desc>
          <delta_ts>2019-06-06 06:42:03 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Michael Catanzaro">mcatanzaro</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>commit-queue</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>fujii</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>msaboff</cc>
    
    <cc>saam</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1537412</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-05-18 08:36:03 -0700</bug_when>
    <thetext>Building 2.24.1 (or maybe 2.24.2, not exactly sure tbh) on aarch64 we have a tremendous warning spam:

[1452/2817] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-02aa2997-2.cpp.o
In file included from ../Source/JavaScriptCore/assembler/MacroAssemblerARM64.h:30,
                 from ../Source/JavaScriptCore/assembler/MacroAssembler.h:46,
                 from ../Source/JavaScriptCore/runtime/BasicBlockLocation.h:30,
                 from ../Source/JavaScriptCore/runtime/ControlFlowProfiler.h:29,
                 from ../Source/JavaScriptCore/runtime/VM.h:35,
                 from ../Source/JavaScriptCore/interpreter/CallFrame.h:30,
                 from ../Source/JavaScriptCore/bytecode/VirtualRegister.h:29,
                 from ../Source/JavaScriptCore/ftl/FTLExitArgumentForOperand.h:31,
                 from ../Source/JavaScriptCore/ftl/FTLExitArgumentForOperand.cpp:27,
                 from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-02aa2997-2.cpp:1:
../Source/JavaScriptCore/assembler/ARM64Assembler.h:465:48: warning: ‘JSC::ARM64Assembler::LinkRecord::&lt;unnamed union&gt;::RealTypes::m_compareRegister’ is too small to hold all values of ‘JSC::ARM64Assembler::RegisterID’ {aka ‘enum JSC::ARM64Registers::RegisterID’}
                 RegisterID m_compareRegister : 6;
                                                ^</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1541089</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-06-02 07:15:40 -0700</bug_when>
    <thetext>This is making it extremely difficult to find build errors.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1542135</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-06-05 13:24:03 -0700</bug_when>
    <thetext>CCing people who have touched this code before. Looks like this is a sequel to bug #135906. The enum is:

typedef enum : int8_t {
    // Parameter/result registers.
    x0,
    x1,
    x2,
    x3,
    x4,
    x5,
    x6,
    x7,
    // Indirect result location register.
    x8,
    // Temporary registers.
    x9,
    x10,
    x11,
    x12,
    x13,
    x14,
    x15,
    // Intra-procedure-call scratch registers (temporary).
    x16,
    x17,
    // Platform Register (temporary).
    x18,
    // Callee-saved.
    x19,
    x20,
    x21,
    x22,
    x23,
    x24,
    x25,
    x26,
    x27,
    x28,
    // Special.
    fp,
    lr,
    sp,

    ip0 = x16,
    ip1 = x17,
    x29 = fp,
    x30 = lr,
    zr = 0x3f, // &lt;-- problem is here
    InvalidGPRReg = -1,
} RegisterID;

The bitfield is six bits large, so only 32 values are allowed. But 0x3f is 63 decimal. It just doesn&apos;t fit. I think actually only 16 nonnegative values are allowed, because it&apos;s signed. So yeah, I don&apos;t understand how this could work properly without clobbering.

Expanding the bitfield to seven bits is not enough. 8 bits makes the warning go away.

We might not want it to be a bitfield at all at 8 bits, since it&apos;s an int8_t enum anyway, but just changing it to eight bits suffices.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1542141</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-06-05 13:28:07 -0700</bug_when>
    <thetext>Ah, I tried just changing : 6 to : 8, but style checker hates it:

ERROR: Source/JavaScriptCore/assembler/ARM64Assembler.h:465:  Please declare enum bitfields as unsigned integral types.  [runtime/enum_bitfields] [5

Better not use a bitfield, then.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1542142</commentid>
    <comment_count>4</comment_count>
      <attachid>371434</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-06-05 13:29:24 -0700</bug_when>
    <thetext>Created attachment 371434
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1542179</commentid>
    <comment_count>5</comment_count>
      <attachid>371434</attachid>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2019-06-05 14:54:20 -0700</bug_when>
    <thetext>Comment on attachment 371434
Patch

r=me. If we can shrink LinkRecord, we should represent the register in a bit fields, but in this case, it does not matter much, sizeof(LinkedRecord) does not change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1542381</commentid>
    <comment_count>6</comment_count>
      <attachid>371434</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-06-06 06:41:27 -0700</bug_when>
    <thetext>Comment on attachment 371434
Patch

Clearing flags on attachment: 371434

Committed r246151: &lt;https://trac.webkit.org/changeset/246151&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1542382</commentid>
    <comment_count>7</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-06-06 06:41:29 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>371434</attachid>
            <date>2019-06-05 13:29:24 -0700</date>
            <delta_ts>2019-06-06 06:41:27 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-198014-20190605152923.patch</filename>
            <type>text/plain</type>
            <size>2123</size>
            <attacher name="Michael Catanzaro">mcatanzaro</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjQ2MTE3CmRpZmYgLS1naXQgYS9Tb3VyY2UvSmF2YVNjcmlw
dENvcmUvQ2hhbmdlTG9nIGIvU291cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwppbmRleCA5
MTU3YzU0YTJkN2IzYTI0YTI0ZDU4NWRkMTNlZmViZGM1NWUzYjE3Li45YjYxYzY3ZDc1MzFlN2Nk
YjM5OGUxM2FlMjBhNjFmMGQ2MDJiMjEyIDEwMDY0NAotLS0gYS9Tb3VyY2UvSmF2YVNjcmlwdENv
cmUvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKQEAgLTEs
MyArMSwyMCB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ogODsKICAgICAgICAgICAgICAgICBDb25kaXRpb24gbV9jb25kaXRpb24gOiA0OwogICAg
ICAgICAgICAgICAgIHVuc2lnbmVkIG1fYml0TnVtYmVyIDogNjsKLSAgICAgICAgICAgICAgICBS
ZWdpc3RlcklEIG1fY29tcGFyZVJlZ2lzdGVyIDogNjsKICAgICAgICAgICAgICAgICBib29sIG1f
aXM2NEJpdCA6IDE7CiAgICAgICAgICAgICB9IHJlYWxUeXBlczsKICAgICAgICAgICAgIHN0cnVj
dCBDb3B5VHlwZXMgewo=
</data>

          </attachment>
      

    </bug>

</bugzilla>