Skip to content

Commit

Permalink
Merge r184170 - Workaround for Cortex-A53 erratum 843419
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=144680

Reviewed by Michael Saboff.

This patch is about to give simple workaround for Cortex-A53 erratum 843419.
It inserts nops after ADRP instruction to avoid wrong address accesses.

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::adrp):
(JSC::ARM64Assembler::nopCortexA53Fix843419):
  • Loading branch information
loki04 authored and carlosgcampos committed May 12, 2015
1 parent f069a2b commit 3f423db
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,17 @@
2015-05-12 Gabor Loki <loki@webkit.org>

Workaround for Cortex-A53 erratum 843419
https://bugs.webkit.org/show_bug.cgi?id=144680

Reviewed by Michael Saboff.

This patch is about to give simple workaround for Cortex-A53 erratum 843419.
It inserts nops after ADRP instruction to avoid wrong address accesses.

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::adrp):
(JSC::ARM64Assembler::nopCortexA53Fix843419):

2015-04-29 Mark Lam <mark.lam@apple.com>

Safari WebKit crash when loading Google Spreadsheet.
Expand Down
12 changes: 12 additions & 0 deletions Source/JavaScriptCore/assembler/ARM64Assembler.h
Expand Up @@ -947,6 +947,7 @@ class ARM64Assembler {
{
ASSERT(!(offset & 0xfff));
insn(pcRelative(true, offset >> 12, rd));
nopCortexA53Fix843419();
}

template<int datasize, SetFlags setFlags = DontSetFlags>
Expand Down Expand Up @@ -3655,6 +3656,17 @@ class ARM64Assembler {
#endif
}

// Workaround for Cortex-A53 erratum (843419). Emit extra nops to avoid
// wrong address access after ADRP instruction.
ALWAYS_INLINE void nopCortexA53Fix843419()
{
#if CPU(ARM64_CORTEXA53)
nop();
nop();
nop();
#endif
}

AssemblerBuffer m_buffer;
Vector<LinkRecord, 0, UnsafeVectorOverflow> m_jumpsToLink;
int m_indexOfLastWatchpoint;
Expand Down

0 comments on commit 3f423db

Please sign in to comment.