<!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>[284914] branches/safari-613.1.6-branch/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/284914">284914</a></dd>
<dt>Author</dt> <dd>alancoon@apple.com</dd>
<dt>Date</dt> <dd>2021-10-26 17:35:11 -0700 (Tue, 26 Oct 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Revert <a href="http://trac.webkit.org/projects/webkit/changeset/284255">r284255</a>. rdar://problem/84666813</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari61316branchSourceJavaScriptCoreChangeLog">branches/safari-613.1.6-branch/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#branchessafari61316branchSourceJavaScriptCorebytecodeValueRecoverycpp">branches/safari-613.1.6-branch/Source/JavaScriptCore/bytecode/ValueRecovery.cpp</a></li>
<li><a href="#branchessafari61316branchSourceJavaScriptCorebytecodeValueRecoveryh">branches/safari-613.1.6-branch/Source/JavaScriptCore/bytecode/ValueRecovery.h</a></li>
<li><a href="#branchessafari61316branchSourceJavaScriptCoredfgDFGSpeculativeJIT32_64cpp">branches/safari-613.1.6-branch/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp</a></li>
<li><a href="#branchessafari61316branchSourceJavaScriptCorejitCachedRecoverycpp">branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CachedRecovery.cpp</a></li>
<li><a href="#branchessafari61316branchSourceJavaScriptCorejitCallFrameShuffleDatacpp">branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffleData.cpp</a></li>
<li><a href="#branchessafari61316branchSourceJavaScriptCorejitCallFrameShuffleDatah">branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffleData.h</a></li>
<li><a href="#branchessafari61316branchSourceJavaScriptCorejitCallFrameShufflercpp">branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffler.cpp</a></li>
<li><a href="#branchessafari61316branchSourceJavaScriptCorejitCallFrameShufflerh">branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffler.h</a></li>
<li><a href="#branchessafari61316branchSourceJavaScriptCorejitCallFrameShuffler32_64cpp">branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffler32_64.cpp</a></li>
<li><a href="#branchessafari61316branchSourceJavaScriptCorejitGPRInfoh">branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/GPRInfo.h</a></li>
<li><a href="#branchessafari61316branchSourceJavaScriptCorejitRegisterSetcpp">branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/RegisterSet.cpp</a></li>
<li><a href="#branchessafari61316branchSourceJavaScriptCorellintLowLevelInterpreter32_64asm">branches/safari-613.1.6-branch/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari61316branchSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-613.1.6-branch/Source/JavaScriptCore/ChangeLog (284913 => 284914)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-613.1.6-branch/Source/JavaScriptCore/ChangeLog   2021-10-27 00:33:43 UTC (rev 284913)
+++ branches/safari-613.1.6-branch/Source/JavaScriptCore/ChangeLog      2021-10-27 00:35:11 UTC (rev 284914)
</span><span class="lines">@@ -1,3 +1,7 @@
</span><ins>+2021-10-26  Kocsen Chung  <kocsen_chung@apple.com>
+
+        Revert r284255. rdar://problem/84666813
+
</ins><span class="cx"> 2021-10-18  Yusuke Suzuki  <ysuzuki@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [JSC] Use USE(LARGE_TYPED_ARRAY)
</span></span></pre></div>
<a id="branchessafari61316branchSourceJavaScriptCorebytecodeValueRecoverycpp"></a>
<div class="modfile"><h4>Modified: branches/safari-613.1.6-branch/Source/JavaScriptCore/bytecode/ValueRecovery.cpp (284913 => 284914)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-613.1.6-branch/Source/JavaScriptCore/bytecode/ValueRecovery.cpp  2021-10-27 00:33:43 UTC (rev 284913)
+++ branches/safari-613.1.6-branch/Source/JavaScriptCore/bytecode/ValueRecovery.cpp     2021-10-27 00:35:11 UTC (rev 284914)
</span><span class="lines">@@ -99,11 +99,6 @@
</span><span class="cx">     case Int32DisplacedInJSStack:
</span><span class="cx">         out.print("*int32(", virtualRegister(), ")");
</span><span class="cx">         return;
</span><del>-#if USE(JSVALUE32_64)
-    case Int32TagDisplacedInJSStack:
-        out.print("*int32Tag(", virtualRegister(), ")");
-        return;
-#endif
</del><span class="cx">     case Int52DisplacedInJSStack:
</span><span class="cx">         out.print("*int52(", virtualRegister(), ")");
</span><span class="cx">         return;
</span></span></pre></div>
<a id="branchessafari61316branchSourceJavaScriptCorebytecodeValueRecoveryh"></a>
<div class="modfile"><h4>Modified: branches/safari-613.1.6-branch/Source/JavaScriptCore/bytecode/ValueRecovery.h (284913 => 284914)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-613.1.6-branch/Source/JavaScriptCore/bytecode/ValueRecovery.h    2021-10-27 00:33:43 UTC (rev 284913)
+++ branches/safari-613.1.6-branch/Source/JavaScriptCore/bytecode/ValueRecovery.h       2021-10-27 00:35:11 UTC (rev 284914)
</span><span class="lines">@@ -60,9 +60,6 @@
</span><span class="cx">     DisplacedInJSStack,
</span><span class="cx">     // It's in the stack, at a different location, and it's unboxed.
</span><span class="cx">     Int32DisplacedInJSStack,
</span><del>-#if USE(JSVALUE32_64)
-    Int32TagDisplacedInJSStack, // int32 stored in tag field
-#endif
</del><span class="cx">     Int52DisplacedInJSStack,
</span><span class="cx">     StrictInt52DisplacedInJSStack,
</span><span class="cx">     DoubleDisplacedInJSStack,
</span><span class="lines">@@ -190,19 +187,7 @@
</span><span class="cx">         result.m_source = WTFMove(u);
</span><span class="cx">         return result;
</span><span class="cx">     }
</span><del>-
-#if USE(JSVALUE32_64)
-    static ValueRecovery calleeSaveRegDisplacedInJSStack(VirtualRegister virtualReg, bool inTag)
-    {
-        ValueRecovery result;
-        UnionType u;
-        u.virtualReg = virtualReg.offset();
-        result.m_source = WTFMove(u);
-        result.m_technique = inTag ? Int32TagDisplacedInJSStack : Int32DisplacedInJSStack;
-        return result;
-    }
-#endif
-
</del><ins>+    
</ins><span class="cx">     static ValueRecovery constant(JSValue value)
</span><span class="cx">     {
</span><span class="cx">         ValueRecovery result;
</span><span class="lines">@@ -273,9 +258,6 @@
</span><span class="cx">         switch (m_technique) {
</span><span class="cx">         case DisplacedInJSStack:
</span><span class="cx">         case Int32DisplacedInJSStack:
</span><del>-#if USE(JSVALUE32_64)
-        case Int32TagDisplacedInJSStack:
-#endif
</del><span class="cx">         case Int52DisplacedInJSStack:
</span><span class="cx">         case StrictInt52DisplacedInJSStack:
</span><span class="cx">         case DoubleDisplacedInJSStack:
</span><span class="lines">@@ -300,9 +282,6 @@
</span><span class="cx">             return DataFormatJS;
</span><span class="cx">         case UnboxedInt32InGPR:
</span><span class="cx">         case Int32DisplacedInJSStack:
</span><del>-#if USE(JSVALUE32_64)
-        case Int32TagDisplacedInJSStack:
-#endif
</del><span class="cx">             return DataFormatInt32;
</span><span class="cx">         case UnboxedInt52InGPR:
</span><span class="cx">         case Int52DisplacedInJSStack:
</span><span class="lines">@@ -379,9 +358,6 @@
</span><span class="cx">         switch (m_technique) {
</span><span class="cx">         case DisplacedInJSStack:
</span><span class="cx">         case Int32DisplacedInJSStack:
</span><del>-#if USE(JSVALUE32_64)
-        case Int32TagDisplacedInJSStack:
-#endif
</del><span class="cx">         case DoubleDisplacedInJSStack:
</span><span class="cx">         case CellDisplacedInJSStack:
</span><span class="cx">         case BooleanDisplacedInJSStack:
</span></span></pre></div>
<a id="branchessafari61316branchSourceJavaScriptCoredfgDFGSpeculativeJIT32_64cpp"></a>
<div class="modfile"><h4>Modified: branches/safari-613.1.6-branch/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp (284913 => 284914)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-613.1.6-branch/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp      2021-10-27 00:33:43 UTC (rev 284913)
+++ branches/safari-613.1.6-branch/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp 2021-10-27 00:35:11 UTC (rev 284914)
</span><span class="lines">@@ -742,8 +742,6 @@
</span><span class="cx">             
</span><span class="cx">             for (unsigned i = numPassedArgs; i < numAllocatedArgs; ++i)
</span><span class="cx">                 shuffleData.args[i] = ValueRecovery::constant(jsUndefined());
</span><del>-
-            shuffleData.setupCalleeSaveRegisters(m_jit.codeBlock());
</del><span class="cx">         } else {
</span><span class="cx">             m_jit.store32(MacroAssembler::TrustedImm32(numPassedArgs), m_jit.calleeFramePayloadSlot(CallFrameSlot::argumentCountIncludingThis));
</span><span class="cx">         
</span></span></pre></div>
<a id="branchessafari61316branchSourceJavaScriptCorejitCachedRecoverycpp"></a>
<div class="modfile"><h4>Modified: branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CachedRecovery.cpp (284913 => 284914)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CachedRecovery.cpp      2021-10-27 00:33:43 UTC (rev 284913)
+++ branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CachedRecovery.cpp 2021-10-27 00:35:11 UTC (rev 284914)
</span><span class="lines">@@ -52,9 +52,7 @@
</span><span class="cx"> {
</span><span class="cx">     switch (recovery().technique()) {
</span><span class="cx">     case Int32DisplacedInJSStack:
</span><del>-#if USE(JSVALUE32_64)
-    case Int32TagDisplacedInJSStack:
-#elif USE(JSVALUE64)
</del><ins>+#if USE(JSVALUE64)
</ins><span class="cx">     case Int52DisplacedInJSStack:
</span><span class="cx">     case StrictInt52DisplacedInJSStack:
</span><span class="cx">     case DisplacedInJSStack:
</span></span></pre></div>
<a id="branchessafari61316branchSourceJavaScriptCorejitCallFrameShuffleDatacpp"></a>
<div class="modfile"><h4>Modified: branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffleData.cpp (284913 => 284914)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffleData.cpp        2021-10-27 00:33:43 UTC (rev 284913)
+++ branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffleData.cpp   2021-10-27 00:35:11 UTC (rev 284914)
</span><span class="lines">@@ -33,6 +33,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><ins>+#if USE(JSVALUE64)
+
</ins><span class="cx"> void CallFrameShuffleData::setupCalleeSaveRegisters(CodeBlock* codeBlock)
</span><span class="cx"> {
</span><span class="cx">     setupCalleeSaveRegisters(codeBlock->calleeSaveRegisters());
</span><span class="lines">@@ -47,24 +49,9 @@
</span><span class="cx">         if (!calleeSaveRegisters.get(entry.reg()))
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><del>-        int saveSlotIndexInCPURegisters = entry.offsetAsIndex();
-
-#if USE(JSVALUE64)
-        // CPU registers are the same size as virtual registers
-        VirtualRegister saveSlot { saveSlotIndexInCPURegisters };
</del><ins>+        VirtualRegister saveSlot { entry.offsetAsIndex() };
</ins><span class="cx">         registers[entry.reg()]
</span><span class="cx">             = ValueRecovery::displacedInJSStack(saveSlot, DataFormatJS);
</span><del>-#elif USE(JSVALUE32_64)
-        // On 32-bit architectures, 2 callee saved registers may be packed into the same slot
-        static_assert(!PayloadOffset || !TagOffset);
-        static_assert(PayloadOffset == 4 || TagOffset == 4);
-        bool inTag = (saveSlotIndexInCPURegisters & 1) == !!TagOffset;
-        if (saveSlotIndexInCPURegisters < 0)
-            saveSlotIndexInCPURegisters -= 1; // Round towards -inf
-        VirtualRegister saveSlot { saveSlotIndexInCPURegisters / 2 };
-        registers[entry.reg()]
-            = ValueRecovery::calleeSaveRegDisplacedInJSStack(saveSlot, inTag);
-#endif
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     for (Reg reg = Reg::first(); reg <= Reg::last(); reg = reg.next()) {
</span><span class="lines">@@ -74,14 +61,12 @@
</span><span class="cx">         if (registers[reg])
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><del>-#if USE(JSVALUE64)
</del><span class="cx">         registers[reg] = ValueRecovery::inRegister(reg, DataFormatJS);
</span><del>-#elif USE(JSVALUE32_64)
-        registers[reg] = ValueRecovery::inRegister(reg, DataFormatInt32);
-#endif
</del><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#endif // USE(JSVALUE64)
+
</ins><span class="cx"> } // namespace JSC
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(JIT)
</span></span></pre></div>
<a id="branchessafari61316branchSourceJavaScriptCorejitCallFrameShuffleDatah"></a>
<div class="modfile"><h4>Modified: branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffleData.h (284913 => 284914)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffleData.h  2021-10-27 00:33:43 UTC (rev 284913)
+++ branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffleData.h     2021-10-27 00:35:11 UTC (rev 284914)
</span><span class="lines">@@ -44,13 +44,13 @@
</span><span class="cx">     unsigned numLocals { UINT_MAX };
</span><span class="cx">     unsigned numPassedArgs { UINT_MAX };
</span><span class="cx">     unsigned numParameters { UINT_MAX }; // On our machine frame.
</span><ins>+#if USE(JSVALUE64)
</ins><span class="cx">     RegisterMap<ValueRecovery> registers;
</span><del>-#if USE(JSVALUE64)
</del><span class="cx">     GPRReg numberTagRegister { InvalidGPRReg };
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx">     void setupCalleeSaveRegisters(CodeBlock*);
</span><span class="cx">     void setupCalleeSaveRegisters(const RegisterAtOffsetList*);
</span><ins>+#endif
</ins><span class="cx">     ValueRecovery callee;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari61316branchSourceJavaScriptCorejitCallFrameShufflercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffler.cpp (284913 => 284914)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffler.cpp   2021-10-27 00:33:43 UTC (rev 284913)
+++ branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffler.cpp      2021-10-27 00:35:11 UTC (rev 284914)
</span><span class="lines">@@ -52,8 +52,13 @@
</span><span class="cx">     for (unsigned i = FPRInfo::numberOfRegisters; i--; )
</span><span class="cx">         m_lockedRegisters.clear(FPRInfo::toRegister(i));
</span><span class="cx"> 
</span><del>-    // ... as well as the callee saved registers
</del><ins>+#if USE(JSVALUE64)
+    // ... as well as the runtime registers on 64-bit architectures.
+    // However do not use these registers on 32-bit architectures since
+    // saving and restoring callee-saved registers in CallFrameShuffler isn't supported
+    // on 32-bit architectures yet.
</ins><span class="cx">     m_lockedRegisters.exclude(RegisterSet::vmCalleeSaveRegisters());
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     ASSERT(!data.callee.isInJSStack() || data.callee.virtualRegister().isLocal());
</span><span class="cx">     addNew(CallFrameSlot::callee, data.callee);
</span><span class="lines">@@ -63,21 +68,17 @@
</span><span class="cx">         addNew(virtualRegisterForArgumentIncludingThis(i), data.args[i]);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+#if USE(JSVALUE64)
</ins><span class="cx">     for (Reg reg = Reg::first(); reg <= Reg::last(); reg = reg.next()) {
</span><span class="cx">         if (!data.registers[reg].isSet())
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><del>-        if (reg.isGPR()) {
-#if USE(JSVALUE64)
</del><ins>+        if (reg.isGPR())
</ins><span class="cx">             addNew(JSValueRegs(reg.gpr()), data.registers[reg]);
</span><del>-#elif USE(JSVALUE32_64)
-            addNew(reg.gpr(), data.registers[reg]);
-#endif
-        } else
</del><ins>+        else
</ins><span class="cx">             addNew(reg.fpr(), data.registers[reg]);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-#if USE(JSVALUE64)
</del><span class="cx">     m_numberTagRegister = data.numberTagRegister;
</span><span class="cx">     if (m_numberTagRegister != InvalidGPRReg)
</span><span class="cx">         lockGPR(m_numberTagRegister);
</span></span></pre></div>
<a id="branchessafari61316branchSourceJavaScriptCorejitCallFrameShufflerh"></a>
<div class="modfile"><h4>Modified: branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffler.h (284913 => 284914)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffler.h     2021-10-27 00:33:43 UTC (rev 284913)
+++ branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffler.h        2021-10-27 00:35:11 UTC (rev 284914)
</span><span class="lines">@@ -116,15 +116,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if USE(JSVALUE64)
</span><span class="cx">             data.registers[reg] = cachedRecovery->recovery();
</span><del>-#elif USE(JSVALUE32_64)
-            ValueRecovery recovery = cachedRecovery->recovery();
-            if (recovery.technique() == DisplacedInJSStack) {
-                JSValueRegs wantedJSValueReg = cachedRecovery->wantedJSValueRegs();
-                ASSERT(reg == wantedJSValueReg.payloadGPR() || reg == wantedJSValueReg.tagGPR());
-                bool inTag = reg == wantedJSValueReg.tagGPR();
-                data.registers[reg] = ValueRecovery::calleeSaveRegDisplacedInJSStack(recovery.virtualRegister(), inTag);
-            } else
-                data.registers[reg] = recovery;
</del><span class="cx"> #else
</span><span class="cx">             RELEASE_ASSERT_NOT_REACHED();
</span><span class="cx"> #endif
</span><span class="lines">@@ -672,32 +663,6 @@
</span><span class="cx">         cachedRecovery->setWantedJSValueRegs(jsValueRegs);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-#if USE(JSVALUE32_64)
-    void addNew(GPRReg gpr, ValueRecovery recovery)
-    {
-        ASSERT(gpr != InvalidGPRReg && !m_newRegisters[gpr]);
-        ASSERT(recovery.technique() == Int32DisplacedInJSStack
-            || recovery.technique() == Int32TagDisplacedInJSStack);
-        CachedRecovery* cachedRecovery = addCachedRecovery(recovery);
-        if (JSValueRegs oldRegs { cachedRecovery->wantedJSValueRegs() }) {
-            // Combine with the other CSR in the same virtual register slot
-            ASSERT(oldRegs.tagGPR() == InvalidGPRReg);
-            ASSERT(oldRegs.payloadGPR() != InvalidGPRReg && oldRegs.payloadGPR() != gpr);
-            if (recovery.technique() == Int32DisplacedInJSStack) {
-                ASSERT(cachedRecovery->recovery().technique() == Int32TagDisplacedInJSStack);
-                cachedRecovery->setWantedJSValueRegs(JSValueRegs(oldRegs.payloadGPR(), gpr));
-            } else {
-                ASSERT(cachedRecovery->recovery().technique() == Int32DisplacedInJSStack);
-                cachedRecovery->setWantedJSValueRegs(JSValueRegs(gpr, oldRegs.payloadGPR()));
-            }
-            cachedRecovery->setRecovery(
-                ValueRecovery::displacedInJSStack(recovery.virtualRegister(), DataFormatJS));
-        } else
-            cachedRecovery->setWantedJSValueRegs(JSValueRegs::payloadOnly(gpr));
-        m_newRegisters[gpr] = cachedRecovery;
-    }
-#endif
-
</del><span class="cx">     void addNew(FPRReg fpr, ValueRecovery recovery)
</span><span class="cx">     {
</span><span class="cx">         ASSERT(fpr != InvalidFPRReg && !m_newRegisters[fpr]);
</span></span></pre></div>
<a id="branchessafari61316branchSourceJavaScriptCorejitCallFrameShuffler32_64cpp"></a>
<div class="modfile"><h4>Modified: branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffler32_64.cpp (284913 => 284914)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffler32_64.cpp      2021-10-27 00:33:43 UTC (rev 284913)
+++ branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/CallFrameShuffler32_64.cpp 2021-10-27 00:35:11 UTC (rev 284914)
</span><span class="lines">@@ -124,11 +124,8 @@
</span><span class="cx">         if (resultGPR == InvalidGPRReg || m_registers[resultGPR] || m_lockedRegisters.get(resultGPR))
</span><span class="cx">             resultGPR = getFreeGPR();
</span><span class="cx">         ASSERT(resultGPR != InvalidGPRReg);
</span><del>-        if (location.recovery().technique() == Int32TagDisplacedInJSStack)
-            m_jit.loadPtr(address.withOffset(TagOffset), resultGPR);
-        else
-            m_jit.loadPtr(address.withOffset(PayloadOffset), resultGPR);
-        updateRecovery(location,
</del><ins>+        m_jit.loadPtr(address.withOffset(PayloadOffset), resultGPR);
+        updateRecovery(location, 
</ins><span class="cx">             ValueRecovery::inGPR(resultGPR, location.recovery().dataFormat()));
</span><span class="cx">         if (verbose)
</span><span class="cx">             dataLog(location.recovery(), "\n");
</span><span class="lines">@@ -193,9 +190,15 @@
</span><span class="cx">     if (wantedTagGPR != InvalidGPRReg) {
</span><span class="cx">         ASSERT(!m_lockedRegisters.get(wantedTagGPR));
</span><span class="cx">         if (CachedRecovery* currentTag { m_registers[wantedTagGPR] }) {
</span><del>-            RELEASE_ASSERT(currentTag == &location);
-            if (verbose)
-                dataLog("   + ", wantedTagGPR, " is OK\n");
</del><ins>+            if (currentTag == &location) {
+                if (verbose)
+                    dataLog("   + ", wantedTagGPR, " is OK\n");
+            } else {
+                // This can never happen on 32bit platforms since we
+                // have at most one wanted JSValueRegs, for the
+                // callee, and no callee-save registers.
+                RELEASE_ASSERT_NOT_REACHED();
+            }
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -202,9 +205,13 @@
</span><span class="cx">     if (wantedPayloadGPR != InvalidGPRReg) {
</span><span class="cx">         ASSERT(!m_lockedRegisters.get(wantedPayloadGPR));
</span><span class="cx">         if (CachedRecovery* currentPayload { m_registers[wantedPayloadGPR] }) {
</span><del>-            RELEASE_ASSERT(currentPayload == &location);
-            if (verbose)
-                dataLog("   + ", wantedPayloadGPR, " is OK\n");
</del><ins>+            if (currentPayload == &location) {
+                if (verbose)
+                    dataLog("   + ", wantedPayloadGPR, " is OK\n");
+            } else {
+                // See above
+                RELEASE_ASSERT_NOT_REACHED();
+            }
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari61316branchSourceJavaScriptCorejitGPRInfoh"></a>
<div class="modfile"><h4>Modified: branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/GPRInfo.h (284913 => 284914)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/GPRInfo.h       2021-10-27 00:33:43 UTC (rev 284913)
+++ branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/GPRInfo.h  2021-10-27 00:35:11 UTC (rev 284914)
</span><span class="lines">@@ -538,7 +538,7 @@
</span><span class="cx"> class GPRInfo {
</span><span class="cx"> public:
</span><span class="cx">     typedef GPRReg RegisterType;
</span><del>-    static constexpr unsigned numberOfRegisters = 10;
</del><ins>+    static constexpr unsigned numberOfRegisters = 9;
</ins><span class="cx">     static constexpr unsigned numberOfArgumentRegisters = NUMBER_OF_ARGUMENT_REGISTERS;
</span><span class="cx"> 
</span><span class="cx">     // Temporary registers.
</span><span class="lines">@@ -567,7 +567,7 @@
</span><span class="cx">     static GPRReg toRegister(unsigned index)
</span><span class="cx">     {
</span><span class="cx">         ASSERT(index < numberOfRegisters);
</span><del>-        static const GPRReg registerForIndex[numberOfRegisters] = { regT0, regT1, regT2, regT3, regT4, regT5, regT6, regT7, regCS0, regCS1 };
</del><ins>+        static const GPRReg registerForIndex[numberOfRegisters] = { regT0, regT1, regT2, regT3, regT4, regT5, regT6, regT7, regCS1 };
</ins><span class="cx">         return registerForIndex[index];
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -583,7 +583,7 @@
</span><span class="cx">         ASSERT(reg != InvalidGPRReg);
</span><span class="cx">         ASSERT(static_cast<int>(reg) < 16);
</span><span class="cx">         static const unsigned indexForRegister[16] =
</span><del>-            { 0, 1, 2, 3, 7, 6, InvalidIndex, InvalidIndex, 4, 5, 9, 8, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex };
</del><ins>+            { 0, 1, 2, 3, 7, 6, InvalidIndex, InvalidIndex, 4, 5, 8, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex };
</ins><span class="cx">         unsigned result = indexForRegister[reg];
</span><span class="cx">         return result;
</span><span class="cx">     }
</span></span></pre></div>
<a id="branchessafari61316branchSourceJavaScriptCorejitRegisterSetcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/RegisterSet.cpp (284913 => 284914)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/RegisterSet.cpp 2021-10-27 00:33:43 UTC (rev 284913)
+++ branches/safari-613.1.6-branch/Source/JavaScriptCore/jit/RegisterSet.cpp    2021-10-27 00:35:11 UTC (rev 284914)
</span><span class="lines">@@ -254,7 +254,6 @@
</span><span class="cx">     result.set(GPRInfo::regCS6);
</span><span class="cx"> #endif
</span><span class="cx"> #elif CPU(ARM_THUMB2)
</span><del>-    result.set(GPRInfo::regCS0);
</del><span class="cx">     result.set(GPRInfo::regCS1);
</span><span class="cx"> #elif CPU(ARM64)
</span><span class="cx">     static_assert(GPRInfo::regCS8 == GPRInfo::numberTagRegister, "");
</span></span></pre></div>
<a id="branchessafari61316branchSourceJavaScriptCorellintLowLevelInterpreter32_64asm"></a>
<div class="modfile"><h4>Modified: branches/safari-613.1.6-branch/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm (284913 => 284914)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-613.1.6-branch/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm  2021-10-27 00:33:43 UTC (rev 284913)
+++ branches/safari-613.1.6-branch/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm     2021-10-27 00:35:11 UTC (rev 284914)
</span><span class="lines">@@ -79,6 +79,8 @@
</span><span class="cx"> # After calling, calling bytecode is claiming input registers are not used.
</span><span class="cx"> macro dispatchAfterCall(size, opcodeStruct, valueProfileName, dstVirtualRegister, dispatch)
</span><span class="cx">     loadi ArgumentCountIncludingThis + TagOffset[cfr], PC
</span><ins>+    loadp CodeBlock[cfr], PB
+    loadp CodeBlock::m_instructionsRawPointer[PB], PB
</ins><span class="cx">     get(size, opcodeStruct, dstVirtualRegister, t3)
</span><span class="cx">     storei r1, TagOffset[cfr, t3, 8]
</span><span class="cx">     storei r0, PayloadOffset[cfr, t3, 8]
</span></span></pre>
</div>
</div>

</body>
</html>