Title: [140438] trunk/Source/_javascript_Core
- Revision
- 140438
- Author
- commit-qu...@webkit.org
- Date
- 2013-01-22 10:34:54 -0800 (Tue, 22 Jan 2013)
Log Message
Yarr JIT isn't big endian compatible
https://bugs.webkit.org/show_bug.cgi?id=102897
Patch by Tobias Netzel <tobias.net...@googlemail.com> on 2013-01-22
Reviewed by Oliver Hunt.
This patch was tested in the current mozilla codebase only and has passed the regexp tests there.
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::generatePatternCharacterOnce):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (140437 => 140438)
--- trunk/Source/_javascript_Core/ChangeLog 2013-01-22 18:27:23 UTC (rev 140437)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-01-22 18:34:54 UTC (rev 140438)
@@ -1,3 +1,15 @@
+2013-01-22 Tobias Netzel <tobias.net...@googlemail.com>
+
+ Yarr JIT isn't big endian compatible
+ https://bugs.webkit.org/show_bug.cgi?id=102897
+
+ Reviewed by Oliver Hunt.
+
+ This patch was tested in the current mozilla codebase only and has passed the regexp tests there.
+
+ * yarr/YarrJIT.cpp:
+ (JSC::Yarr::YarrGenerator::generatePatternCharacterOnce):
+
2013-01-22 David Kilzer <ddkil...@apple.com>
Fix DateMath.cpp to compile with -Wshorten-64-to-32
Modified: trunk/Source/_javascript_Core/yarr/YarrJIT.cpp (140437 => 140438)
--- trunk/Source/_javascript_Core/yarr/YarrJIT.cpp 2013-01-22 18:27:23 UTC (rev 140437)
+++ trunk/Source/_javascript_Core/yarr/YarrJIT.cpp 2013-01-22 18:34:54 UTC (rev 140438)
@@ -746,7 +746,11 @@
const RegisterID character = regT0;
int maxCharactersAtOnce = m_charSize == Char8 ? 4 : 2;
unsigned ignoreCaseMask = 0;
+#if CPU(BIG_ENDIAN)
+ int allCharacters = ch << (m_charSize == Char8 ? 24 : 16);
+#else
int allCharacters = ch;
+#endif
int numberCharacters;
int startTermPosition = term->inputPosition;
@@ -755,7 +759,11 @@
ASSERT(!m_pattern.m_ignoreCase || isASCIIAlpha(ch) || isCanonicallyUnique(ch));
if (m_pattern.m_ignoreCase && isASCIIAlpha(ch))
+#if CPU(BIG_ENDIAN)
+ ignoreCaseMask |= 32 << (m_charSize == Char8 ? 24 : 16);
+#else
ignoreCaseMask |= 32;
+#endif
for (numberCharacters = 1; numberCharacters < maxCharactersAtOnce && nextOp->m_op == OpTerm; ++numberCharacters, nextOp = &m_ops[opIndex + numberCharacters]) {
PatternTerm* nextTerm = nextOp->m_term;
@@ -768,7 +776,11 @@
nextOp->m_isDeadCode = true;
+#if CPU(BIG_ENDIAN)
+ int shiftAmount = (m_charSize == Char8 ? 24 : 16) - ((m_charSize == Char8 ? 8 : 16) * numberCharacters);
+#else
int shiftAmount = (m_charSize == Char8 ? 8 : 16) * numberCharacters;
+#endif
UChar currentCharacter = nextTerm->patternCharacter;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes