Bug 1130845: Add a list of SIMD freed stack slots in LinearScan; r=sunfish

--HG--
extra : rebase_source : 7828fb3896a090d03249a8d00c0a599196a949fc
This commit is contained in:
Benjamin Bouvier 2015-02-12 15:49:33 +01:00
Родитель e2399947f4
Коммит d23a2114cf
3 изменённых файлов: 19 добавлений и 2 удалений

Просмотреть файл

@ -0,0 +1,12 @@
var int32x4 = SIMD.int32x4;
function test() {
var a = int32x4();
var b = int32x4(10, 20, 30, 40);
var c = SIMD.int32x4.and(a, b);
assertEq(c.x, 0);
return 0;
}
test();
var u = [], v = [];
for (var j=0; j<u.length; ++j)
v[test()] = t;

Просмотреть файл

@ -823,7 +823,9 @@ LinearScanAllocator::allocateSlotFor(const LiveInterval *interval)
LinearScanVirtualRegister *reg = &vregs[interval->vreg()];
SlotList *freed;
if (reg->type() == LDefinition::DOUBLE)
if (reg->def()->isSimdType())
freed = &finishedQuadSlots_;
else if (reg->type() == LDefinition::DOUBLE)
freed = &finishedDoubleSlots_;
#if JS_BITS_PER_WORD == 64
else if (reg->type() == LDefinition::GENERAL ||
@ -916,7 +918,9 @@ LinearScanAllocator::freeAllocation(LiveInterval *interval, LAllocation *alloc)
LinearScanVirtualRegister *mine = &vregs[interval->vreg()];
if (!IsNunbox(mine)) {
if (alloc->isStackSlot()) {
if (mine->type() == LDefinition::DOUBLE)
if (mine->def()->isSimdType())
finishedQuadSlots_.append(interval);
else if (mine->type() == LDefinition::DOUBLE)
finishedDoubleSlots_.append(interval);
#if JS_BITS_PER_WORD == 64
else if (mine->type() == LDefinition::GENERAL ||

Просмотреть файл

@ -81,6 +81,7 @@ class LinearScanAllocator
typedef Vector<LiveInterval *, 0, SystemAllocPolicy> SlotList;
SlotList finishedSlots_;
SlotList finishedDoubleSlots_;
SlotList finishedQuadSlots_;
#ifdef JS_NUNBOX32
SlotList finishedNunboxSlots_;
#endif