<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[194976] trunk/Source/JavaScriptCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/194976">194976</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-01-13 12:52:46 -0800 (Wed, 13 Jan 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/194969">r194969</a>.
https://bugs.webkit.org/show_bug.cgi?id=153075
This change broke the iOS build (Requested by ryanhaddad on
#webkit).
Reverted changeset:
"[JSC] Legalize Memory Offsets for ARM64 before lowering to
Air"
https://bugs.webkit.org/show_bug.cgi?id=153065
http://trac.webkit.org/changeset/194969
Patch by Commit Queue <commit-queue@webkit.org> on 2016-01-13</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3Generatecpp">trunk/Source/JavaScriptCore/b3/B3Generate.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3LowerToAircpp">trunk/Source/JavaScriptCore/b3/B3LowerToAir.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3testb3cpp">trunk/Source/JavaScriptCore/b3/testb3.cpp</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreb3B3LegalizeMemoryOffsetscpp">trunk/Source/JavaScriptCore/b3/B3LegalizeMemoryOffsets.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3LegalizeMemoryOffsetsh">trunk/Source/JavaScriptCore/b3/B3LegalizeMemoryOffsets.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (194975 => 194976)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-01-13 20:17:53 UTC (rev 194975)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-01-13 20:52:46 UTC (rev 194976)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2016-01-13 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r194969.
+ https://bugs.webkit.org/show_bug.cgi?id=153075
+
+ This change broke the iOS build (Requested by ryanhaddad on
+ #webkit).
+
+ Reverted changeset:
+
+ "[JSC] Legalize Memory Offsets for ARM64 before lowering to
+ Air"
+ https://bugs.webkit.org/show_bug.cgi?id=153065
+ http://trac.webkit.org/changeset/194969
+
</ins><span class="cx"> 2016-01-13 Benjamin Poulain <bpoulain@apple.com>
</span><span class="cx">
</span><span class="cx"> [JSC] Legalize Memory Offsets for ARM64 before lowering to Air
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (194975 => 194976)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2016-01-13 20:17:53 UTC (rev 194975)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2016-01-13 20:52:46 UTC (rev 194976)
</span><span class="lines">@@ -1152,8 +1152,6 @@
</span><span class="cx">                 43422A631C158E6D00E2EB98 /* B3ConstFloatValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 43422A611C15871B00E2EB98 /* B3ConstFloatValue.h */; };
</span><span class="cx">                 43422A661C16267500E2EB98 /* B3ReduceDoubleToFloat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43422A641C16221E00E2EB98 /* B3ReduceDoubleToFloat.cpp */; };
</span><span class="cx">                 43422A671C16267800E2EB98 /* B3ReduceDoubleToFloat.h in Headers */ = {isa = PBXBuildFile; fileRef = 43422A651C16221E00E2EB98 /* B3ReduceDoubleToFloat.h */; };
</span><del>-                436E54531C468E7400B5AF73 /* B3LegalizeMemoryOffsets.h in Headers */ = {isa = PBXBuildFile; fileRef = 436E54521C468E5F00B5AF73 /* B3LegalizeMemoryOffsets.h */; };
-                436E54541C468E7700B5AF73 /* B3LegalizeMemoryOffsets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 436E54511C468E5F00B5AF73 /* B3LegalizeMemoryOffsets.cpp */; };
</del><span class="cx">                 43AB26C61C1A535900D82AE6 /* B3MathExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 43AB26C51C1A52F700D82AE6 /* B3MathExtras.h */; };
</span><span class="cx">                 43AB26C71C1A535C00D82AE6 /* B3MathExtras.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43AB26C41C1A52F700D82AE6 /* B3MathExtras.cpp */; };
</span><span class="cx">                 43C392AB1C3BEB0500241F53 /* AssemblerCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 43C392AA1C3BEB0000241F53 /* AssemblerCommon.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -3262,8 +3260,6 @@
</span><span class="cx">                 43422A611C15871B00E2EB98 /* B3ConstFloatValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3ConstFloatValue.h; path = b3/B3ConstFloatValue.h; sourceTree = "<group>"; };
</span><span class="cx">                 43422A641C16221E00E2EB98 /* B3ReduceDoubleToFloat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3ReduceDoubleToFloat.cpp; path = b3/B3ReduceDoubleToFloat.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 43422A651C16221E00E2EB98 /* B3ReduceDoubleToFloat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3ReduceDoubleToFloat.h; path = b3/B3ReduceDoubleToFloat.h; sourceTree = "<group>"; };
</span><del>-                436E54511C468E5F00B5AF73 /* B3LegalizeMemoryOffsets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3LegalizeMemoryOffsets.cpp; path = b3/B3LegalizeMemoryOffsets.cpp; sourceTree = "<group>"; };
-                436E54521C468E5F00B5AF73 /* B3LegalizeMemoryOffsets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3LegalizeMemoryOffsets.h; path = b3/B3LegalizeMemoryOffsets.h; sourceTree = "<group>"; };
</del><span class="cx">                 43AB26C41C1A52F700D82AE6 /* B3MathExtras.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3MathExtras.cpp; path = b3/B3MathExtras.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 43AB26C51C1A52F700D82AE6 /* B3MathExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3MathExtras.h; path = b3/B3MathExtras.h; sourceTree = "<group>"; };
</span><span class="cx">                 43C392AA1C3BEB0000241F53 /* AssemblerCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssemblerCommon.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -3376,8 +3372,8 @@
</span><span class="cx">                 7013CA8A1B491A9400CAE613 /* JSJob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSJob.h; sourceTree = "<group>"; };
</span><span class="cx">                 7035587C1C418419004BD7BF /* MapPrototype.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = MapPrototype.js; sourceTree = "<group>"; };
</span><span class="cx">                 7035587D1C418419004BD7BF /* SetPrototype.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = SetPrototype.js; sourceTree = "<group>"; };
</span><del>-                7035587E1C418458004BD7BF /* MapPrototype.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapPrototype.lut.h; sourceTree = "<group>"; };
-                7035587F1C418458004BD7BF /* SetPrototype.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SetPrototype.lut.h; sourceTree = "<group>"; };
</del><ins>+                7035587E1C418458004BD7BF /* MapPrototype.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MapPrototype.lut.h; path = MapPrototype.lut.h; sourceTree = "<group>"; };
+                7035587F1C418458004BD7BF /* SetPrototype.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SetPrototype.lut.h; path = SetPrototype.lut.h; sourceTree = "<group>"; };
</ins><span class="cx">                 704FD35305697E6D003DBED9 /* BooleanObject.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = BooleanObject.h; sourceTree = "<group>"; tabWidth = 8; };
</span><span class="cx">                 705B41A31A6E501E00716757 /* Symbol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Symbol.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 705B41A41A6E501E00716757 /* Symbol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Symbol.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -4714,8 +4710,6 @@
</span><span class="cx">                                 0FEC85B41BE1462F0080FF74 /* B3InsertionSet.cpp */,
</span><span class="cx">                                 0FEC85B51BE1462F0080FF74 /* B3InsertionSet.h */,
</span><span class="cx">                                 0FEC85B61BE1462F0080FF74 /* B3InsertionSetInlines.h */,
</span><del>-                                436E54511C468E5F00B5AF73 /* B3LegalizeMemoryOffsets.cpp */,
-                                436E54521C468E5F00B5AF73 /* B3LegalizeMemoryOffsets.h */,
</del><span class="cx">                                 0F338E191BF286EA0013C88F /* B3LowerMacros.cpp */,
</span><span class="cx">                                 0F338E1A1BF286EA0013C88F /* B3LowerMacros.h */,
</span><span class="cx">                                 4319DA011C1BE3C1001D260B /* B3LowerMacrosAfterOptimizations.cpp */,
</span><span class="lines">@@ -7943,7 +7937,6 @@
</span><span class="cx">                                 BCDE3AB80E6C82F5001453A7 /* Structure.h in Headers */,
</span><span class="cx">                                 7E4EE7090EBB7963005934AA /* StructureChain.h in Headers */,
</span><span class="cx">                                 2AAAA31218BD49D100394CC8 /* StructureIDBlob.h in Headers */,
</span><del>-                                436E54531C468E7400B5AF73 /* B3LegalizeMemoryOffsets.h in Headers */,
</del><span class="cx">                                 2AF7382D18BBBF92008A5A37 /* StructureIDTable.h in Headers */,
</span><span class="cx">                                 0FD2C92416D01EE900C7803F /* StructureInlines.h in Headers */,
</span><span class="cx">                                 C2FE18A416BAEC4000AF3061 /* StructureRareData.h in Headers */,
</span><span class="lines">@@ -8621,7 +8614,6 @@
</span><span class="cx">                                 0FEC85091BDACDAC0080FF74 /* B3Common.cpp in Sources */,
</span><span class="cx">                                 0FEC850B1BDACDAC0080FF74 /* B3Commutativity.cpp in Sources */,
</span><span class="cx">                                 0FEC850D1BDACDAC0080FF74 /* B3Const32Value.cpp in Sources */,
</span><del>-                                436E54541C468E7700B5AF73 /* B3LegalizeMemoryOffsets.cpp in Sources */,
</del><span class="cx">                                 0FEC850F1BDACDAC0080FF74 /* B3Const64Value.cpp in Sources */,
</span><span class="cx">                                 0FEC85111BDACDAC0080FF74 /* B3ConstDoubleValue.cpp in Sources */,
</span><span class="cx">                                 0FEC85131BDACDAC0080FF74 /* B3ControlValue.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3Generatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3Generate.cpp (194975 => 194976)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3Generate.cpp        2016-01-13 20:17:53 UTC (rev 194975)
+++ trunk/Source/JavaScriptCore/b3/B3Generate.cpp        2016-01-13 20:52:46 UTC (rev 194976)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #include "AirGenerate.h"
</span><span class="cx"> #include "AirInstInlines.h"
</span><span class="cx"> #include "B3Common.h"
</span><del>-#include "B3LegalizeMemoryOffsets.h"
</del><span class="cx"> #include "B3LowerMacros.h"
</span><span class="cx"> #include "B3LowerMacrosAfterOptimizations.h"
</span><span class="cx"> #include "B3LowerToAir.h"
</span><span class="lines">@@ -86,8 +85,6 @@
</span><span class="cx">
</span><span class="cx"> lowerMacrosAfterOptimizations(procedure);
</span><span class="cx">
</span><del>- legalizeMemoryOffsets(procedure);
-
</del><span class="cx"> moveConstants(procedure);
</span><span class="cx">
</span><span class="cx"> if (shouldValidateIR())
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3LegalizeMemoryOffsetscpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/b3/B3LegalizeMemoryOffsets.cpp (194975 => 194976)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3LegalizeMemoryOffsets.cpp        2016-01-13 20:17:53 UTC (rev 194975)
+++ trunk/Source/JavaScriptCore/b3/B3LegalizeMemoryOffsets.cpp        2016-01-13 20:52:46 UTC (rev 194976)
</span><span class="lines">@@ -1,92 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "B3LegalizeMemoryOffsets.h"
-
-#if ENABLE(B3_JIT)
-
-#include "AirArg.h"
-#include "B3InsertionSetInlines.h"
-#include "B3MemoryValue.h"
-#include "B3PhaseScope.h"
-#include "B3ProcedureInlines.h"
-
-namespace JSC { namespace B3 {
-
-namespace {
-
-class LegalizeMemoryOffsets {
-public:
- LegalizeMemoryOffsets(Procedure& proc)
- : m_proc(proc)
- , m_insertionSet(proc)
- {
- }
-
- void run()
- {
- if (!isARM64())
- return;
-
- for (BasicBlock* block : m_proc) {
- for (unsigned index = 0; index < block->size(); ++index) {
- MemoryValue* memoryValue = block->at(index)->as<MemoryValue>();
- if (!memoryValue)
- continue;
-
- int32_t offset = memoryValue->offset();
- Air::Arg::Width width = Air::Arg::widthForBytes(memoryValue->accessByteSize());
- if (!Air::Arg::isValidAddrForm(offset, width)) {
- Value* base = memoryValue->lastChild();
- Value* offsetValue = m_insertionSet.insertIntConstant(index, memoryValue->origin(), pointerType(), offset);
- Value* resolvedAddress = m_proc.add<Value>(Add, memoryValue->origin(), base, offsetValue);
- m_insertionSet.insertValue(index, resolvedAddress);
-
- memoryValue->lastChild() = resolvedAddress;
- memoryValue->setOffset(0);
- }
- }
- m_insertionSet.execute(block);
- }
- }
-
- Procedure& m_proc;
- InsertionSet m_insertionSet;
-};
-
-} // anonymous namespace
-
-void legalizeMemoryOffsets(Procedure& proc)
-{
- PhaseScope phaseScope(proc, "legalizeMemoryOffsets");
- LegalizeMemoryOffsets legalizeMemoryOffsets(proc);
- legalizeMemoryOffsets.run();
-}
-
-} } // namespace JSC::B3
-
-#endif // ENABLE(B3_JIT)
-
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3LegalizeMemoryOffsetsh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/b3/B3LegalizeMemoryOffsets.h (194975 => 194976)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3LegalizeMemoryOffsets.h        2016-01-13 20:17:53 UTC (rev 194975)
+++ trunk/Source/JavaScriptCore/b3/B3LegalizeMemoryOffsets.h        2016-01-13 20:52:46 UTC (rev 194976)
</span><span class="lines">@@ -1,44 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef B3LegalizeMemoryOffsets_h
-#define B3LegalizeMemoryOffsets_h
-
-#if ENABLE(B3_JIT)
-
-namespace JSC { namespace B3 {
-
-class Procedure;
-
-// If the offsets of a MemoryValue cannot be represented in the target instruction set,
-// compute it explicitly.
-void legalizeMemoryOffsets(Procedure&);
-
-} } // namespace JSC::B3
-
-#endif // ENABLE(B3_JIT)
-
-#endif // B3LegalizeMemoryOffsets_h
-
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3LowerToAircpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3LowerToAir.cpp (194975 => 194976)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3LowerToAir.cpp        2016-01-13 20:17:53 UTC (rev 194975)
+++ trunk/Source/JavaScriptCore/b3/B3LowerToAir.cpp        2016-01-13 20:52:46 UTC (rev 194976)
</span><span class="lines">@@ -357,6 +357,10 @@
</span><span class="cx"> // This turns the given operand into an address.
</span><span class="cx"> Arg effectiveAddr(Value* address, int32_t offset, Arg::Width width)
</span><span class="cx"> {
</span><ins>+ // B3 allows any memory operation to have a 32-bit offset. That's not how some architectures
+ // work. We solve this by requiring a just-before-lowering phase that legalizes offsets.
+ // FIXME: Implement such a legalization phase.
+ // https://bugs.webkit.org/show_bug.cgi?id=152530
</ins><span class="cx"> ASSERT(Arg::isValidAddrForm(offset, width));
</span><span class="cx">
</span><span class="cx"> auto fallback = [&] () -> Arg {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3testb3cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/testb3.cpp (194975 => 194976)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/testb3.cpp        2016-01-13 20:17:53 UTC (rev 194975)
+++ trunk/Source/JavaScriptCore/b3/testb3.cpp        2016-01-13 20:52:46 UTC (rev 194976)
</span><span class="lines">@@ -136,77 +136,6 @@
</span><span class="cx"> CHECK(compileAndRun<int>(proc) == 42);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void testLoadWithOffsetImpl(int32_t offset64, int32_t offset32)
-{
- {
- Procedure proc;
- BasicBlock* root = proc.addBlock();
- int64_t x = -42;
- Value* base = root->appendNew<ArgumentRegValue>(proc, Origin(), GPRInfo::argumentGPR0);
- root->appendNew<ControlValue>(
- proc, Return, Origin(),
- root->appendNew<MemoryValue>(
- proc, Load, Int64, Origin(),
- base,
- offset64));
-
- char* address = reinterpret_cast<char*>(&x) - offset64;
- CHECK(compileAndRun<int64_t>(proc, address) == -42);
- }
- {
- Procedure proc;
- BasicBlock* root = proc.addBlock();
- int32_t x = -42;
- Value* base = root->appendNew<ArgumentRegValue>(proc, Origin(), GPRInfo::argumentGPR0);
- root->appendNew<ControlValue>(
- proc, Return, Origin(),
- root->appendNew<MemoryValue>(
- proc, Load, Int32, Origin(),
- base,
- offset32));
-
- char* address = reinterpret_cast<char*>(&x) - offset32;
- CHECK(compileAndRun<int32_t>(proc, address) == -42);
- }
-}
-
-void testLoadOffsetImm9Max()
-{
- testLoadWithOffsetImpl(255, 255);
-}
-
-void testLoadOffsetImm9MaxPlusOne()
-{
- testLoadWithOffsetImpl(256, 256);
-}
-
-void testLoadOffsetImm9MaxPlusTwo()
-{
- testLoadWithOffsetImpl(257, 257);
-}
-
-void testLoadOffsetImm9Min()
-{
- testLoadWithOffsetImpl(-256, -256);
-}
-
-void testLoadOffsetImm9MinMinusOne()
-{
- testLoadWithOffsetImpl(-257, -257);
-}
-
-void testLoadOffsetScaledUnsignedImm12Max()
-{
- testLoadWithOffsetImpl(32760, 16380);
-}
-
-void testLoadOffsetScaledUnsignedOverImm12Max()
-{
- testLoadWithOffsetImpl(32760, 32760);
- testLoadWithOffsetImpl(32761, 16381);
- testLoadWithOffsetImpl(32768, 16384);
-}
-
</del><span class="cx"> void testArg(int argument)
</span><span class="cx"> {
</span><span class="cx"> Procedure proc;
</span><span class="lines">@@ -9359,13 +9288,6 @@
</span><span class="cx">
</span><span class="cx"> RUN(test42());
</span><span class="cx"> RUN(testLoad42());
</span><del>- RUN(testLoadOffsetImm9Max());
- RUN(testLoadOffsetImm9MaxPlusOne());
- RUN(testLoadOffsetImm9MaxPlusTwo());
- RUN(testLoadOffsetImm9Min());
- RUN(testLoadOffsetImm9MinMinusOne());
- RUN(testLoadOffsetScaledUnsignedImm12Max());
- RUN(testLoadOffsetScaledUnsignedOverImm12Max());
</del><span class="cx"> RUN(testArg(43));
</span><span class="cx"> RUN(testReturnConst64(5));
</span><span class="cx"> RUN(testReturnConst64(-42));
</span></span></pre>
</div>
</div>
</body>
</html>