Skip to content

Commit

Permalink
Merge r246151 - aarch64: ‘JSC::ARM64Assembler::LinkRecord::<unnamed u…
Browse files Browse the repository at this point in the history
…nion>::RealTypes::m_compareRegister’ is too small to hold all values of ‘JSC::ARM64Assembler::RegisterID’ {aka ‘enum JSC::ARM64Registers::RegisterID’}

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

Reviewed by Yusuke Suzuki.

When building for aarch64, there is a huge warning spam here. It's impossible to see any
other warnings. This has been ongoing for so long I've begun to suspect that nobody works
on this architecture.

Anyway, the problem is because we need eight bits to store all possible RegisterID values,
but the bitfield is only six bits wide. Fix it. The COMPILE_ASSERT checking the size of this
struct is still happy, so I presume the change is OK.

* assembler/ARM64Assembler.h:
  • Loading branch information
mcatanzaro authored and carlosgcampos committed Jul 1, 2019
1 parent 903a02b commit 51fc47a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,20 @@
2019-06-06 Michael Catanzaro <mcatanzaro@igalia.com>

aarch64: ‘JSC::ARM64Assembler::LinkRecord::<unnamed union>::RealTypes::m_compareRegister’ is too small to hold all values of ‘JSC::ARM64Assembler::RegisterID’ {aka ‘enum JSC::ARM64Registers::RegisterID’}
https://bugs.webkit.org/show_bug.cgi?id=198014

Reviewed by Yusuke Suzuki.

When building for aarch64, there is a huge warning spam here. It's impossible to see any
other warnings. This has been ongoing for so long I've begun to suspect that nobody works
on this architecture.

Anyway, the problem is because we need eight bits to store all possible RegisterID values,
but the bitfield is only six bits wide. Fix it. The COMPILE_ASSERT checking the size of this
struct is still happy, so I presume the change is OK.

* assembler/ARM64Assembler.h:

2019-05-20 Carlos Garcia Campos <cgarcia@igalia.com>

[GLIB] Crash when instantiating a js object registered with jsc_context_register_class on window object cleared
Expand Down
2 changes: 1 addition & 1 deletion Source/JavaScriptCore/assembler/ARM64Assembler.h
Expand Up @@ -458,11 +458,11 @@ class ARM64Assembler {
struct RealTypes {
int64_t m_from;
int64_t m_to;
RegisterID m_compareRegister;
JumpType m_type : 8;
JumpLinkType m_linkType : 8;
Condition m_condition : 4;
unsigned m_bitNumber : 6;
RegisterID m_compareRegister : 6;
bool m_is64Bit : 1;
} realTypes;
struct CopyTypes {
Expand Down

0 comments on commit 51fc47a

Please sign in to comment.