| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421 |
- //-------------------------------------------------------------------------------------------------------
- // Copyright (C) Microsoft Corporation and contributors. All rights reserved.
- // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
- //-------------------------------------------------------------------------------------------------------
- #include "RuntimeByteCodePch.h"
- #ifndef TEMP_DISABLE_ASMJS
- #if DBG_DUMP
- #include "Language/AsmJsModule.h"
- #include "ByteCode/AsmJsByteCodeDumper.h"
- namespace Js
- {
- void AsmJsByteCodeDumper::Dump(AsmJsFunc* func, FunctionBody* body)
- {
- ByteCodeReader reader;
- reader.Create(body);
- StatementReader<FunctionBody::StatementMapList> statementReader;
- statementReader.Create(body);
- body->DumpFullFunctionName();
- Output::Print(_u(" Asm.js ("));
- const ArgSlot argCount = func->GetArgCount();
- for (ArgSlot i = 0; i < argCount; i++)
- {
- AsmJsType var = func->GetArgType(i);
- if (i > 0)
- {
- Output::Print(_u(", "));
- }
- if (var.isDouble())
- {
- Output::Print(_u("+In%hu"), i);
- }
- else if (var.isFloat())
- {
- Output::Print(_u("flt(In%hu)"), i);
- }
- else if (var.isInt())
- {
- Output::Print(_u("In%hu|0"), i);
- }
- else if (var.isSIMDType())
- {
- switch (var.GetWhich())
- {
- case AsmJsType::Int32x4:
- Output::Print(_u("I4(In%hu)"), i);
- break;
- case AsmJsType::Int8x16:
- Output::Print(_u("I16(In%hu)"), i);
- break;
- case AsmJsType::Float32x4:
- Output::Print(_u("F4(In%hu)"), i);
- break;
- case AsmJsType::Float64x2:
- Output::Print(_u("D2(In%hu)"), i);
- break;
- }
- }
- else
- {
- Assert(UNREACHED);
- }
- }
- Output::Print(_u(") "));
- Output::Print(_u("(size: %d [%d])\n"), body->GetByteCodeCount(), body->GetByteCodeWithoutLDACount());
- const auto& intRegisters = func->GetRegisterSpace<int>();
- const auto& doubleRegisters = func->GetRegisterSpace<double>();
- const auto& floatRegisters = func->GetRegisterSpace<float>();
- Output::Print(
- _u(" Integer : %u locals (%u temps from I%u)\n"),
- intRegisters.GetVarCount(),
- intRegisters.GetTmpCount(),
- intRegisters.GetFirstTmpRegister());
- Output::Print(
- _u(" Doubles : %u locals (%u temps from D%u)\n"),
- doubleRegisters.GetVarCount(),
- doubleRegisters.GetTmpCount(),
- doubleRegisters.GetFirstTmpRegister());
- Output::Print(
- _u(" Floats : %u locals (%u temps from F%u)\n"),
- floatRegisters.GetVarCount(),
- floatRegisters.GetTmpCount(),
- floatRegisters.GetFirstTmpRegister());
- const auto& simdRegisters = func->GetRegisterSpace<AsmJsSIMDValue>();
- Output::Print(
- _u(" SIMDs : %u locals (%u temps from SIMD%u)\n"),
- simdRegisters.GetVarCount(),
- simdRegisters.GetTmpCount(),
- simdRegisters.GetFirstTmpRegister());
- uint32 statementIndex = 0;
- DumpConstants(func, body);
- Output::Print(_u(" Implicit Arg Ins:\n ======== =====\n "));
- int iArg = intRegisters.GetConstCount(), dArg = doubleRegisters.GetConstCount(), fArg = floatRegisters.GetConstCount();
- int simdArg = simdRegisters.GetConstCount();
- for (ArgSlot i = 0; i < argCount; i++)
- {
- const AsmJsType& var = func->GetArgType(i);
- if (var.isDouble())
- {
- Output::Print(_u(" D%d In%d"), dArg++, i);
- }
- else if (var.isFloat())
- {
- Output::Print(_u(" F%d In%d"), fArg++, i);
- }
- else if (var.isInt())
- {
- Output::Print(_u(" I%d In%d"), iArg++, i);
- }
- else if (var.isSIMDType())
- {
- Output::Print(_u(" SIMD%d In%d"), simdArg++, i);
- }
- else
- {
- Assert(UNREACHED);
- }
- Output::Print(_u("\n "));
- }
- Output::Print(_u("\n"));
- if (func->GetReturnType() == AsmJsRetType::Void)
- {
- Output::Print(_u(" 0000 %-20s R0\n"), OpCodeUtilAsmJs::GetOpCodeName(OpCodeAsmJs::LdUndef));
- }
- while (true)
- {
- while (statementReader.AtStatementBoundary(&reader))
- {
- body->PrintStatementSourceLine(statementIndex);
- statementIndex = statementReader.MoveNextStatementBoundary();
- }
- int byteOffset = reader.GetCurrentOffset();
- LayoutSize layoutSize;
- OpCodeAsmJs op = reader.ReadAsmJsOp(layoutSize);
- if (op == OpCodeAsmJs::EndOfBlock)
- {
- Assert(reader.GetCurrentOffset() == body->GetByteCode()->GetLength());
- break;
- }
- Output::Print(_u(" %04x %2s"), byteOffset, layoutSize == LargeLayout ? _u("L-") : layoutSize == MediumLayout ? _u("M-") : _u(""));
- DumpOp(op, layoutSize, reader, body);
- if (Js::Configuration::Global.flags.Verbose)
- {
- int layoutStart = byteOffset + 2; // Account for the prefix op
- int endByteOffset = reader.GetCurrentOffset();
- Output::SkipToColumn(70);
- if (layoutSize == LargeLayout)
- {
- Output::Print(_u("%02X "),
- op > Js::OpCodeAsmJs::MaxByteSizedOpcodes ?
- Js::OpCodeAsmJs::ExtendedLargeLayoutPrefix : Js::OpCodeAsmJs::LargeLayoutPrefix);
- }
- else if (layoutSize == MediumLayout)
- {
- Output::Print(_u("%02X "),
- op > Js::OpCodeAsmJs::MaxByteSizedOpcodes ?
- Js::OpCodeAsmJs::ExtendedMediumLayoutPrefix : Js::OpCodeAsmJs::MediumLayoutPrefix);
- }
- else
- {
- Assert(layoutSize == SmallLayout);
- if (op > Js::OpCodeAsmJs::MaxByteSizedOpcodes)
- {
- Output::Print(_u("%02X "), Js::OpCodeAsmJs::ExtendedOpcodePrefix);
- }
- else
- {
- Output::Print(_u(" "));
- layoutStart--; // don't have a prefix
- }
- }
- Output::Print(_u("%02x"), (byte)op);
- for (int i = layoutStart; i < endByteOffset; i++)
- {
- Output::Print(_u(" %02x"), reader.GetRawByte(i));
- }
- }
- Output::Print(_u("\n"));
- }
- if (statementReader.AtStatementBoundary(&reader))
- {
- body->PrintStatementSourceLine(statementIndex);
- statementIndex = statementReader.MoveNextStatementBoundary();
- }
- Output::Print(_u("\n"));
- Output::Flush();
- }
- void AsmJsByteCodeDumper::DumpConstants(AsmJsFunc* func, FunctionBody* body)
- {
- const auto& intRegisters = func->GetRegisterSpace<int>();
- const auto& doubleRegisters = func->GetRegisterSpace<double>();
- const auto& floatRegisters = func->GetRegisterSpace<float>();
- int nbIntConst = intRegisters.GetConstCount();
- int nbDoubleConst = doubleRegisters.GetConstCount();
- int nbFloatConst = floatRegisters.GetConstCount();
- int* constTable = (int*)((Var*)body->GetConstTable() + (AsmJsFunctionMemory::RequiredVarConstants - 1));
- if (nbIntConst > 0)
- {
- Output::Print(_u(" Constant Integer:\n ======== =======\n "));
- for (int i = 0; i < nbIntConst; i++)
- {
- Output::Print(_u(" I%d %d\n "), i, *constTable);
- ++constTable;
- }
- }
- float* floatTable = (float*)constTable;
- Output::Print(_u("\n"));
- if (nbFloatConst > 0)
- {
- Output::Print(_u(" Constant Floats:\n ======== ======\n "));
- for (int i = 0; i < nbFloatConst; i++)
- {
- Output::Print(_u(" F%d %.4f\n "), i, *floatTable);
- ++floatTable;
- ++constTable;
- }
- }
- double* doubleTable = (double*)constTable;
- Output::Print(_u("\n"));
- if (nbDoubleConst > 0)
- {
- Output::Print(_u(" Constant Doubles:\n ======== ======\n "));
- for (int i = 0; i < nbDoubleConst; i++)
- {
- Output::Print(_u(" D%d %.4f\n "), i, *doubleTable);
- ++doubleTable;
- }
- }
- // SIMD reg space is un-typed.
- // We print each register in its 3 possible types to ease debugging.
- const auto& simdRegisters = func->GetRegisterSpace<AsmJsSIMDValue>();
- int nbSimdConst = simdRegisters.GetConstCount();
- Output::Print(_u("\n"));
- if (nbSimdConst > 0)
- {
- AsmJsSIMDValue* simdTable = (AsmJsSIMDValue*)doubleTable;
- Output::Print(_u(" Constant SIMD values:\n ======== ======\n "));
- for (int i = 0; i < nbSimdConst; i++)
- {
- Output::Print(_u("SIMD%d "), i);
- Output::Print(_u("\tI4(%d, %d, %d, %d),"), simdTable->i32[SIMD_X], simdTable->i32[SIMD_Y], simdTable->i32[SIMD_Z], simdTable->i32[SIMD_W]);
- Output::Print(_u("\tF4(%.4f, %.4f, %.4f, %.4f),"), simdTable->f32[SIMD_X], simdTable->f32[SIMD_Y], simdTable->f32[SIMD_Z], simdTable->f32[SIMD_W]);
- Output::Print(_u("\tD2(%.4f, %.4f)\n "), simdTable->f64[SIMD_X], simdTable->f64[SIMD_Y]);
- Output::Print(_u("\tI8(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d )\n "),
- simdTable->i8[0], simdTable->i8[1], simdTable->i8[2], simdTable->i8[3], simdTable->i8[4], simdTable->i8[5], simdTable->i8[6], simdTable->i8[7],
- simdTable->i8[8], simdTable->i8[9], simdTable->i8[10], simdTable->i8[11], simdTable->i8[12], simdTable->i8[13], simdTable->i8[14], simdTable->i8[15]);
- ++simdTable;
- }
- }
- Output::Print(_u("\n"));
- }
- void AsmJsByteCodeDumper::DumpOp(OpCodeAsmJs op, LayoutSize layoutSize, ByteCodeReader& reader, FunctionBody* dumpFunction)
- {
- Output::Print(_u("%-20s"), OpCodeUtilAsmJs::GetOpCodeName(op));
- OpLayoutTypeAsmJs nType = OpCodeUtilAsmJs::GetOpCodeLayout(op);
- switch (layoutSize * OpLayoutTypeAsmJs::Count + nType)
- {
- #define LAYOUT_TYPE(layout) \
- case OpLayoutTypeAsmJs::layout: \
- Assert(layoutSize == SmallLayout); \
- Dump##layout(op, reader.layout(), dumpFunction, reader); \
- break;
- #define LAYOUT_TYPE_WMS(layout) \
- case SmallLayout * OpLayoutTypeAsmJs::Count + OpLayoutTypeAsmJs::layout: \
- Dump##layout(op, reader.layout##_Small(), dumpFunction, reader); \
- break; \
- case MediumLayout * OpLayoutTypeAsmJs::Count + OpLayoutTypeAsmJs::layout: \
- Dump##layout(op, reader.layout##_Medium(), dumpFunction, reader); \
- break; \
- case LargeLayout * OpLayoutTypeAsmJs::Count + OpLayoutTypeAsmJs::layout: \
- Dump##layout(op, reader.layout##_Large(), dumpFunction, reader); \
- break;
- #include "LayoutTypesAsmJs.h"
- default:
- AssertMsg(false, "Unknown OpLayout");
- break;
- }
- }
- void AsmJsByteCodeDumper::DumpIntReg(RegSlot reg)
- {
- Output::Print(_u(" I%d "), (int)reg);
- }
- void AsmJsByteCodeDumper::DumpDoubleReg(RegSlot reg)
- {
- Output::Print(_u(" D%d "), (int)reg);
- }
- void AsmJsByteCodeDumper::DumpFloatReg(RegSlot reg)
- {
- Output::Print(_u(" F%d "), (int)reg);
- }
- void AsmJsByteCodeDumper::DumpR8Float(float value)
- {
- Output::Print(_u(" float:%f "), value);
- }
- // Float32x4
- void AsmJsByteCodeDumper::DumpFloat32x4Reg(RegSlot reg)
- {
- Output::Print(_u("F4_%d "), (int)reg);
- }
- // Int32x4
- void AsmJsByteCodeDumper::DumpInt32x4Reg(RegSlot reg)
- {
- Output::Print(_u("I4_%d "), (int)reg);
- }
- void AsmJsByteCodeDumper::DumpUint32x4Reg(RegSlot reg)
- {
- Output::Print(_u("U4_%d "), (int)reg);
- }
- void AsmJsByteCodeDumper::DumpInt16x8Reg(RegSlot reg)
- {
- Output::Print(_u("I8_%d "), (int)reg);
- }
- // Int8x16
- void AsmJsByteCodeDumper::DumpInt8x16Reg(RegSlot reg)
- {
- Output::Print(_u("I16_%d "), (int)reg);
- }
- void AsmJsByteCodeDumper::DumpUint16x8Reg(RegSlot reg)
- {
- Output::Print(_u("U8_%d "), (int)reg);
- }
- void AsmJsByteCodeDumper::DumpUint8x16Reg(RegSlot reg)
- {
- Output::Print(_u("U16_%d "), (int)reg);
- }
- // Bool32x4
- void AsmJsByteCodeDumper::DumpBool32x4Reg(RegSlot reg)
- {
- Output::Print(_u("B4_%d "), (int)reg);
- }
- // Bool16x8
- void AsmJsByteCodeDumper::DumpBool16x8Reg(RegSlot reg)
- {
- Output::Print(_u("B8_%d "), (int)reg);
- }
- // Bool32x4
- void AsmJsByteCodeDumper::DumpBool8x16Reg(RegSlot reg)
- {
- Output::Print(_u("B16_%d "), (int)reg);
- }
- // Float64x2
- void AsmJsByteCodeDumper::DumpFloat64x2Reg(RegSlot reg)
- {
- Output::Print(_u("D2_%d "), (int)reg);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpElementSlot(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- switch (op)
- {
- case OpCodeAsmJs::LdSlot:
- case OpCodeAsmJs::LdSlotArr:
- Output::Print(_u(" R%d = R%d[%d] "), data->Value, data->Instance, data->SlotIndex);
- break;
- case OpCodeAsmJs::LdArr_Func:
- Output::Print(_u(" R%d = R%d[I%d] "), data->Value, data->Instance, data->SlotIndex);
- break;
- case OpCodeAsmJs::StSlot_Int:
- Output::Print(_u(" R%d[%d] = I%d "), data->Instance, data->SlotIndex, data->Value);
- break;
- case OpCodeAsmJs::StSlot_Flt:
- Output::Print(_u(" R%d[%d] = F%d "), data->Instance, data->SlotIndex, data->Value);
- break;
- case OpCodeAsmJs::StSlot_Db:
- Output::Print(_u(" R%d[%d] = D%d "), data->Instance, data->SlotIndex, data->Value);
- break;
- case OpCodeAsmJs::LdSlot_Int:
- Output::Print(_u(" I%d = R%d[%d] "), data->Value, data->Instance, data->SlotIndex);
- break;
- case OpCodeAsmJs::LdSlot_Flt:
- Output::Print(_u(" F%d = R%d[%d] "), data->Value, data->Instance, data->SlotIndex);
- break;
- case OpCodeAsmJs::LdSlot_Db:
- Output::Print(_u(" D%d = R%d[%d] "), data->Value, data->Instance, data->SlotIndex);
- break;
- case OpCodeAsmJs::Simd128_LdSlot_F4:
- Output::Print(_u(" F4_%d = R%d[%d] "), data->Value, data->Instance, data->SlotIndex);
- break;
- case OpCodeAsmJs::Simd128_LdSlot_I4:
- Output::Print(_u(" I4_%d = R%d[%d] "), data->Value, data->Instance, data->SlotIndex);
- break;
- case OpCodeAsmJs::Simd128_LdSlot_B4:
- Output::Print(_u(" B4_%d = R%d[%d] "), data->Value, data->Instance, data->SlotIndex);
- break;
- case OpCodeAsmJs::Simd128_LdSlot_B8:
- Output::Print(_u(" B8_%d = R%d[%d] "), data->Value, data->Instance, data->SlotIndex);
- break;
- case OpCodeAsmJs::Simd128_LdSlot_B16:
- Output::Print(_u(" B16_%d = R%d[%d] "), data->Value, data->Instance, data->SlotIndex);
- break;
- #if 0
- case OpCodeAsmJs::Simd128_LdSlot_D2:
- Output::Print(_u(" D2_%d = R%d[%d] "), data->Value, data->Instance, data->SlotIndex);
- break;
- #endif // 0
- case OpCodeAsmJs::Simd128_StSlot_F4:
- Output::Print(_u(" R%d[%d] = F4_%d"), data->Instance, data->SlotIndex, data->Value);
- break;
- case OpCodeAsmJs::Simd128_StSlot_I4:
- Output::Print(_u(" R%d[%d] = I4_%d"), data->Instance, data->SlotIndex, data->Value);
- break;
- case OpCodeAsmJs::Simd128_StSlot_B4:
- Output::Print(_u(" R%d[%d] = B4_%d"), data->Instance, data->SlotIndex, data->Value);
- break;
- case OpCodeAsmJs::Simd128_StSlot_B8:
- Output::Print(_u(" R%d[%d] = B8_%d"), data->Instance, data->SlotIndex, data->Value);
- break;
- case OpCodeAsmJs::Simd128_StSlot_B16:
- Output::Print(_u(" R%d[%d] = B16_%d"), data->Instance, data->SlotIndex, data->Value);
- break;
- #if 0
- case OpCodeAsmJs::Simd128_StSlot_D2:
- Output::Print(_u(" R%d[%d] = D2_%d"), data->Instance, data->SlotIndex, data->Value);
- break;
- #endif // 0
- default:
- {
- AssertMsg(false, "Unknown OpCode for OpLayoutElementSlot");
- break;
- }
- }
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpAsmTypedArr(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- const char16* heapTag = nullptr;
- char16 valueTag = 'I';
- switch (data->ViewType)
- {
- case ArrayBufferView::TYPE_INT8:
- heapTag = _u("HEAP8"); valueTag = 'I'; break;
- case ArrayBufferView::TYPE_UINT8:
- heapTag = _u("HEAPU8"); valueTag = 'U'; break;
- case ArrayBufferView::TYPE_INT16:
- heapTag = _u("HEAP16"); valueTag = 'I'; break;
- case ArrayBufferView::TYPE_UINT16:
- heapTag = _u("HEAPU16"); valueTag = 'U'; break;
- case ArrayBufferView::TYPE_INT32:
- heapTag = _u("HEAP32"); valueTag = 'I'; break;
- case ArrayBufferView::TYPE_UINT32:
- heapTag = _u("HEAPU32"); valueTag = 'U'; break;
- case ArrayBufferView::TYPE_FLOAT32:
- heapTag = _u("HEAPF32"); valueTag = 'F'; break;
- case ArrayBufferView::TYPE_FLOAT64:
- heapTag = _u("HEAPF64"); valueTag = 'D'; break;
- default:
- Assert(false);
- __assume(false);
- break;
- }
- switch (op)
- {
- case OpCodeAsmJs::LdArr:
- Output::Print(_u("%c%d = %s[I%d]"), valueTag, data->Value, heapTag, data->SlotIndex); break;
- case OpCodeAsmJs::LdArrConst:
- Output::Print(_u("%c%d = %s[%d]"), valueTag, data->Value, heapTag, data->SlotIndex); break;
- case OpCodeAsmJs::StArr:
- Output::Print(_u("%s[I%d] = %c%d"), heapTag, data->SlotIndex, valueTag, data->Value); break;
- case OpCodeAsmJs::StArrConst:
- Output::Print(_u("%s[%d] = %c%d"), heapTag, data->SlotIndex, valueTag, data->Value); break;
- default:
- Assert(false);
- __assume(false);
- break;
- }
- }
- void AsmJsByteCodeDumper::DumpStartCall(OpCodeAsmJs op, const unaligned OpLayoutStartCall* data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- Assert(op == OpCodeAsmJs::StartCall || op == OpCodeAsmJs::I_StartCall);
- Output::Print(_u(" ArgSize: %d"), data->ArgCount);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpAsmCall(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- if (data->Return != Constants::NoRegister)
- {
- DumpReg((RegSlot)data->Return);
- Output::Print(_u("="));
- }
- Output::Print(_u(" R%d(ArgCount: %d)"), data->Function, data->ArgCount);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpAsmUnsigned1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpU4(data->C1);
- }
- void AsmJsByteCodeDumper::DumpEmpty(OpCodeAsmJs op, const unaligned OpLayoutEmpty* data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- // empty
- }
- void AsmJsByteCodeDumper::DumpAsmBr(OpCodeAsmJs op, const unaligned OpLayoutAsmBr* data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpOffset(data->RelativeJumpOffset, reader);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpAsmReg1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpAsmReg2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpReg(data->R1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpAsmReg3(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpReg(data->R1);
- DumpReg(data->R2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpAsmReg4(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpReg(data->R1);
- DumpReg(data->R2);
- DumpReg(data->R3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpAsmReg5(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpReg(data->R1);
- DumpReg(data->R2);
- DumpReg(data->R3);
- DumpReg(data->R4);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpAsmReg6(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpReg(data->R1);
- DumpReg(data->R2);
- DumpReg(data->R3);
- DumpReg(data->R4);
- DumpReg(data->R5);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpAsmReg7(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpReg(data->R1);
- DumpReg(data->R2);
- DumpReg(data->R3);
- DumpReg(data->R4);
- DumpReg(data->R5);
- DumpReg(data->R6);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpAsmReg9(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpReg(data->R1);
- DumpReg(data->R2);
- DumpReg(data->R3);
- DumpReg(data->R4);
- DumpReg(data->R5);
- DumpReg(data->R6);
- DumpReg(data->R7);
- DumpReg(data->R8);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpAsmReg10(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpReg(data->R1);
- DumpReg(data->R2);
- DumpReg(data->R3);
- DumpReg(data->R4);
- DumpReg(data->R5);
- DumpReg(data->R6);
- DumpReg(data->R7);
- DumpReg(data->R8);
- DumpReg(data->R9);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpAsmReg11(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpReg(data->R1);
- DumpReg(data->R2);
- DumpReg(data->R3);
- DumpReg(data->R4);
- DumpReg(data->R5);
- DumpReg(data->R6);
- DumpReg(data->R7);
- DumpReg(data->R8);
- DumpReg(data->R9);
- DumpReg(data->R10);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpAsmReg17(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpReg(data->R1);
- DumpReg(data->R2);
- DumpReg(data->R3);
- DumpReg(data->R4);
- DumpReg(data->R5);
- DumpReg(data->R6);
- DumpReg(data->R7);
- DumpReg(data->R8);
- DumpReg(data->R9);
- DumpReg(data->R10);
- DumpReg(data->R11);
- DumpReg(data->R12);
- DumpReg(data->R13);
- DumpReg(data->R14);
- DumpReg(data->R15);
- DumpReg(data->R16);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpAsmReg18(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpReg(data->R1);
- DumpReg(data->R2);
- DumpReg(data->R3);
- DumpReg(data->R4);
- DumpReg(data->R5);
- DumpReg(data->R6);
- DumpReg(data->R7);
- DumpReg(data->R8);
- DumpReg(data->R9);
- DumpReg(data->R10);
- DumpReg(data->R11);
- DumpReg(data->R12);
- DumpReg(data->R13);
- DumpReg(data->R14);
- DumpReg(data->R15);
- DumpReg(data->R16);
- DumpReg(data->R17);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpAsmReg19(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpReg(data->R1);
- DumpReg(data->R2);
- DumpReg(data->R3);
- DumpReg(data->R4);
- DumpReg(data->R5);
- DumpReg(data->R6);
- DumpReg(data->R7);
- DumpReg(data->R8);
- DumpReg(data->R9);
- DumpReg(data->R10);
- DumpReg(data->R11);
- DumpReg(data->R12);
- DumpReg(data->R13);
- DumpReg(data->R14);
- DumpReg(data->R15);
- DumpReg(data->R16);
- DumpReg(data->R17);
- DumpReg(data->R18);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpAsmReg2IntConst1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpReg(data->R1);
- DumpI4(data->C2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt1Double1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpDoubleReg(data->D1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt1Float1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpFloatReg(data->F1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpDouble1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpDoubleReg(data->D0);
- DumpIntReg(data->I1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpDouble1Float1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpDoubleReg(data->D0);
- DumpFloatReg(data->F1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpDouble1Reg1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpDoubleReg(data->D0);
- DumpReg(data->R1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat1Reg1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloatReg(data->F0);
- DumpReg(data->R1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt1Reg1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpReg(data->R1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpReg1Double1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpDoubleReg(data->D1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpReg1Float1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpFloatReg(data->F1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt1Double2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpDoubleReg(data->D1);
- DumpDoubleReg(data->D2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt1Float2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpFloatReg(data->F1);
- DumpFloatReg(data->F2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpReg1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpIntReg(data->I1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpIntReg(data->I1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt1Const1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpI4(data->C1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt3(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpIntReg(data->I1);
- DumpIntReg(data->I2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpDouble2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpDoubleReg(data->D0);
- DumpDoubleReg(data->D1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloatReg(data->F0);
- DumpFloatReg(data->F1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat3(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloatReg(data->F0);
- DumpFloatReg(data->F1);
- DumpFloatReg(data->F2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat1Double1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloatReg(data->F0);
- DumpDoubleReg(data->D1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloatReg(data->F0);
- DumpIntReg(data->I1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpDouble3(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpDoubleReg(data->D0);
- DumpDoubleReg(data->D1);
- DumpDoubleReg(data->D2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpBrInt1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpOffset(data->RelativeJumpOffset, reader);
- DumpIntReg(data->I1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpBrInt2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpOffset(data->RelativeJumpOffset, reader);
- DumpIntReg(data->I1);
- DumpIntReg(data->I2);
- }
- // Float32x4
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat32x4_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat32x4Reg(data->F4_0);
- DumpFloat32x4Reg(data->F4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat32x4_3(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat32x4Reg(data->F4_0);
- DumpFloat32x4Reg(data->F4_1);
- DumpFloat32x4Reg(data->F4_2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpBool32x4_1Float32x4_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool32x4Reg(data->B4_0);
- DumpFloat32x4Reg(data->F4_1);
- DumpFloat32x4Reg(data->F4_2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat32x4_1Bool32x4_1Float32x4_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat32x4Reg(data->F4_0);
- DumpBool32x4Reg(data->B4_1);
- DumpFloat32x4Reg(data->F4_2);
- DumpFloat32x4Reg(data->F4_3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat32x4_4(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat32x4Reg(data->F4_0);
- DumpFloat32x4Reg(data->F4_1);
- DumpFloat32x4Reg(data->F4_2);
- DumpFloat32x4Reg(data->F4_3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat32x4_1Float4(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat32x4Reg(data->F4_0);
- DumpFloatReg(data->F1);
- DumpFloatReg(data->F2);
- DumpFloatReg(data->F3);
- DumpFloatReg(data->F4);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat32x4_2Int4(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat32x4Reg(data->F4_0);
- DumpFloat32x4Reg(data->F4_1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat32x4_3Int4(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat32x4Reg(data->F4_0);
- DumpFloat32x4Reg(data->F4_1);
- DumpFloat32x4Reg(data->F4_2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- DumpIntReg(data->I6);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat32x4_1Float1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat32x4Reg(data->F4_0);
- DumpFloatReg(data->F1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat32x4_2Float1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat32x4Reg(data->F4_0);
- DumpFloat32x4Reg(data->F4_1);
- DumpFloatReg(data->F2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat32x4_1Int32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat32x4Reg(data->F4_0);
- DumpInt32x4Reg(data->I4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat32x4_1Uint32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat32x4Reg(data->F4_0);
- DumpUint32x4Reg(data->U4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat32x4_1Int16x8_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat32x4Reg(data->F4_0);
- DumpInt16x8Reg(data->I8_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat32x4_1Uint16x8_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat32x4Reg(data->F4_0);
- DumpUint16x8Reg(data->U8_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat32x4_1Int8x16_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat32x4Reg(data->F4_0);
- DumpInt8x16Reg(data->I16_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat32x4_1Uint8x16_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat32x4Reg(data->F4_0);
- DumpUint8x16Reg(data->U16_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpReg1Float32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpFloat32x4Reg(data->F4_1);
- }
- // Int32x4
- template <class T>
- void AsmJsByteCodeDumper::DumpInt32x4_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt32x4Reg(data->I4_0);
- DumpInt32x4Reg(data->I4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt32x4_3(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt32x4Reg(data->I4_0);
- DumpInt32x4Reg(data->I4_1);
- DumpInt32x4Reg(data->I4_2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpBool32x4_1Int32x4_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool32x4Reg(data->B4_0);
- DumpInt32x4Reg(data->I4_1);
- DumpInt32x4Reg(data->I4_2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt32x4_1Bool32x4_1Int32x4_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt32x4Reg(data->I4_0);
- DumpBool32x4Reg(data->B4_1);
- DumpInt32x4Reg(data->I4_2);
- DumpInt32x4Reg(data->I4_3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt32x4_1Int4(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt32x4Reg(data->I4_0);
- DumpIntReg(data->I1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt32x4_2Int4(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt32x4Reg(data->I4_0);
- DumpInt32x4Reg(data->I4_1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt32x4_2Int2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt32x4Reg(data->I4_0);
- DumpInt32x4Reg(data->I4_1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt1Int32x4_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpInt32x4Reg(data->I4_1);
- DumpIntReg(data->I2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat32x4_2Int1Float1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat32x4Reg(data->F4_0);
- DumpFloat32x4Reg(data->F4_1);
- DumpIntReg(data->I2);
- DumpFloatReg(data->F3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat1Float32x4_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloatReg(data->F0);
- DumpFloat32x4Reg(data->F4_1);
- DumpIntReg(data->I2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt32x4_3Int4(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt32x4Reg(data->I4_0);
- DumpInt32x4Reg(data->I4_1);
- DumpInt32x4Reg(data->I4_2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- DumpIntReg(data->I6);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt32x4_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt32x4Reg(data->I4_0);
- DumpIntReg(data->I1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt32x4_2Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt32x4Reg(data->I4_0);
- DumpInt32x4Reg(data->I4_1);
- DumpIntReg(data->I2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpReg1Int32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpInt32x4Reg(data->I4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt32x4_1Float32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt32x4Reg(data->I4_0);
- DumpFloat32x4Reg(data->F4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt32x4_1Uint32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt32x4Reg(data->I4_0);
- DumpFloat32x4Reg(data->U4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt32x4_1Int16x8_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt32x4Reg(data->I4_0);
- DumpInt16x8Reg(data->I8_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt32x4_1Uint16x8_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt32x4Reg(data->I4_0);
- DumpUint16x8Reg(data->U8_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt32x4_1Int8x16_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt32x4Reg(data->I4_0);
- DumpInt8x16Reg(data->I16_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt32x4_1Uint8x16_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt32x4Reg(data->I4_0);
- DumpUint8x16Reg(data->U16_1);
- }
- // Bool32x4
- template <class T>
- void AsmJsByteCodeDumper::DumpBool32x4_1Int4(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool32x4Reg(data->B4_0);
- DumpIntReg(data->I1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt1Bool32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpBool8x16Reg(data->B4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpBool32x4_2Int2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool32x4Reg(data->B4_0);
- DumpBool32x4Reg(data->B4_1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt1Bool32x4_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpBool32x4Reg(data->B4_1);
- DumpIntReg(data->I2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpBool32x4_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool32x4Reg(data->B4_0);
- DumpBool32x4Reg(data->B4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpBool32x4_3(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool32x4Reg(data->B4_0);
- DumpBool32x4Reg(data->B4_1);
- DumpBool32x4Reg(data->B4_2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpReg1Bool32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpBool32x4Reg(data->B4_1);
- }
- // Bool16x8
- template <class T>
- void AsmJsByteCodeDumper::DumpBool16x8_1Int8(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool16x8Reg(data->B8_0);
- DumpIntReg(data->I1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- DumpIntReg(data->I6);
- DumpIntReg(data->I7);
- DumpIntReg(data->I8);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt1Bool16x8_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpBool16x8Reg(data->B8_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpBool16x8_2Int2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool16x8Reg(data->B8_0);
- DumpBool16x8Reg(data->B8_1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt1Bool16x8_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpBool16x8Reg(data->B8_1);
- DumpIntReg(data->I2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpBool16x8_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool16x8Reg(data->B8_0);
- DumpBool16x8Reg(data->B8_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpBool16x8_3(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool16x8Reg(data->B8_0);
- DumpBool16x8Reg(data->B8_1);
- DumpBool16x8Reg(data->B8_2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpReg1Bool16x8_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpBool16x8Reg(data->B8_1);
- }
- // Bool8x16
- template <class T>
- void AsmJsByteCodeDumper::DumpBool8x16_1Int16(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool8x16Reg(data->B16_0);
- DumpIntReg(data->I1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- DumpIntReg(data->I6);
- DumpIntReg(data->I7);
- DumpIntReg(data->I8);
- DumpIntReg(data->I9);
- DumpIntReg(data->I10);
- DumpIntReg(data->I11);
- DumpIntReg(data->I12);
- DumpIntReg(data->I13);
- DumpIntReg(data->I14);
- DumpIntReg(data->I15);
- DumpIntReg(data->I16);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt1Bool8x16_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpBool8x16Reg(data->B16_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpBool8x16_2Int2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool8x16Reg(data->B16_0);
- DumpBool8x16Reg(data->B16_1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt1Bool8x16_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpBool8x16Reg(data->B16_1);
- DumpIntReg(data->I2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpBool8x16_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool8x16Reg(data->B16_0);
- DumpBool8x16Reg(data->B16_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpBool8x16_3(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool8x16Reg(data->B16_0);
- DumpBool8x16Reg(data->B16_1);
- DumpBool8x16Reg(data->B16_2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpReg1Bool8x16_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpBool8x16Reg(data->B16_1);
- }
- // Int8x16
- template <class T>
- void AsmJsByteCodeDumper::DumpInt8x16_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt8x16Reg(data->I16_0);
- DumpInt8x16Reg(data->I16_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt8x16_3(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt8x16Reg(data->I16_0);
- DumpInt8x16Reg(data->I16_1);
- DumpInt8x16Reg(data->I16_2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt8x16_1Int16(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt8x16Reg(data->I16_0);
- DumpIntReg(data->I1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- DumpIntReg(data->I6);
- DumpIntReg(data->I7);
- DumpIntReg(data->I8);
- DumpIntReg(data->I9);
- DumpIntReg(data->I10);
- DumpIntReg(data->I11);
- DumpIntReg(data->I12);
- DumpIntReg(data->I13);
- DumpIntReg(data->I14);
- DumpIntReg(data->I15);
- DumpIntReg(data->I16);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt8x16_3Int16(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt8x16Reg(data->I16_0);
- DumpInt8x16Reg(data->I16_1);
- DumpInt8x16Reg(data->I16_2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- DumpIntReg(data->I6);
- DumpIntReg(data->I7);
- DumpIntReg(data->I8);
- DumpIntReg(data->I9);
- DumpIntReg(data->I10);
- DumpIntReg(data->I11);
- DumpIntReg(data->I12);
- DumpIntReg(data->I13);
- DumpIntReg(data->I14);
- DumpIntReg(data->I15);
- DumpIntReg(data->I16);
- DumpIntReg(data->I17);
- DumpIntReg(data->I18);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt8x16_2Int16(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt8x16Reg(data->I16_0);
- DumpInt8x16Reg(data->I16_1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- DumpIntReg(data->I6);
- DumpIntReg(data->I7);
- DumpIntReg(data->I8);
- DumpIntReg(data->I9);
- DumpIntReg(data->I10);
- DumpIntReg(data->I11);
- DumpIntReg(data->I12);
- DumpIntReg(data->I13);
- DumpIntReg(data->I14);
- DumpIntReg(data->I15);
- DumpIntReg(data->I16);
- DumpIntReg(data->I17);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpBool8x16_1Int8x16_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool8x16Reg(data->B16_0);
- DumpInt8x16Reg(data->I16_1);
- DumpInt8x16Reg(data->I16_2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt8x16_1Bool8x16_1Int8x16_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt8x16Reg(data->I16_0);
- DumpBool8x16Reg(data->B16_1);
- DumpInt8x16Reg(data->I16_2);
- DumpInt8x16Reg(data->I16_3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt8x16_2Int2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt8x16Reg(data->I16_0);
- DumpInt8x16Reg(data->I16_1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt1Int8x16_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpInt8x16Reg(data->I16_1);
- DumpIntReg(data->I2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt8x16_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt8x16Reg(data->I16_0);
- DumpIntReg(data->I1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt8x16_2Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt8x16Reg(data->I16_0);
- DumpInt8x16Reg(data->I16_1);
- DumpIntReg(data->I2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpReg1Int8x16_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpInt8x16Reg(data->I16_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt8x16_1Float32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt8x16Reg(data->I16_0);
- DumpFloat32x4Reg(data->F4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt8x16_1Int32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt8x16Reg(data->I16_0);
- DumpInt32x4Reg(data->I4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt8x16_1Int16x8_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt8x16Reg(data->I16_0);
- DumpInt16x8Reg(data->I8_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt8x16_1Uint32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt8x16Reg(data->I16_0);
- DumpUint32x4Reg(data->U4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt8x16_1Uint16x8_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt8x16Reg(data->I16_0);
- DumpUint16x8Reg(data->U8_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt8x16_1Uint8x16_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt8x16Reg(data->I16_0);
- DumpUint8x16Reg(data->U16_1);
- }
- // Disabled for now
- #if 0
- // Float64x2
- template <class T>
- void AsmJsByteCodeDumper::DumpInt32x4_1Float64x2_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt32x4Reg(data->I4_0);
- DumpFloat64x2Reg(data->D2_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat32x4_1Float64x2_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat32x4Reg(data->F4_0);
- DumpFloat64x2Reg(data->D2_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat64x2_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat64x2Reg(data->D2_0);
- DumpFloat64x2Reg(data->D2_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat64x2_3(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat64x2Reg(data->D2_0);
- DumpFloat64x2Reg(data->D2_1);
- DumpFloat64x2Reg(data->D2_2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat64x2_4(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat64x2Reg(data->D2_0);
- DumpFloat64x2Reg(data->D2_1);
- DumpFloat64x2Reg(data->D2_2);
- DumpFloat64x2Reg(data->D2_3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat64x2_1Double2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat64x2Reg(data->D2_0);
- DumpDoubleReg(data->D1);
- DumpDoubleReg(data->D2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat64x2_1Double1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat64x2Reg(data->D2_0);
- DumpDoubleReg(data->D1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat64x2_2Double1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat64x2Reg(data->D2_0);
- DumpFloat64x2Reg(data->D2_1);
- DumpDoubleReg(data->D2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat64x2_2Int2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat64x2Reg(data->D2_0);
- DumpFloat64x2Reg(data->D2_1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat64x2_3Int2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat64x2Reg(data->D2_0);
- DumpFloat64x2Reg(data->D2_1);
- DumpFloat64x2Reg(data->D2_2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat64x2_1Float32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat64x2Reg(data->D2_0);
- DumpFloat32x4Reg(data->F4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat64x2_1Int32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat64x2Reg(data->D2_0);
- DumpInt32x4Reg(data->I4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpFloat64x2_1Int32x4_1Float64x2_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpFloat64x2Reg(data->D2_0);
- DumpInt32x4Reg(data->I4_1);
- DumpFloat64x2Reg(data->D2_2);
- DumpFloat64x2Reg(data->D2_3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpReg1Float64x2_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpFloat64x2Reg(data->D2_1);
- }
- #endif
- // Int16x8
- template <class T>
- void AsmJsByteCodeDumper::DumpInt16x8_1Int8(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt16x8Reg(data->I8_0);
- DumpIntReg(data->I1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- DumpIntReg(data->I6);
- DumpIntReg(data->I7);
- DumpIntReg(data->I8);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt16x8_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt16x8Reg(data->I8_0);
- DumpInt16x8Reg(data->I8_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpReg1Int16x8_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpInt16x8Reg(data->I8_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt1Int16x8_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpInt16x8Reg(data->I8_1);
- DumpIntReg(data->I2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt16x8_2Int8(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt16x8Reg(data->I8_0);
- DumpInt16x8Reg(data->I8_1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- DumpIntReg(data->I6);
- DumpIntReg(data->I7);
- DumpIntReg(data->I8);
- DumpIntReg(data->I9);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt16x8_3Int8(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt16x8Reg(data->I8_0);
- DumpInt16x8Reg(data->I8_1);
- DumpInt16x8Reg(data->I8_2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- DumpIntReg(data->I6);
- DumpIntReg(data->I7);
- DumpIntReg(data->I8);
- DumpIntReg(data->I9);
- DumpIntReg(data->I10);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt16x8_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt16x8Reg(data->I8_0);
- DumpIntReg(data->I1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt16x8_2Int2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt16x8Reg(data->I8_0);
- DumpInt16x8Reg(data->I8_1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt16x8_3(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt16x8Reg(data->I8_0);
- DumpInt16x8Reg(data->I8_1);
- DumpInt16x8Reg(data->I8_2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpBool16x8_1Int16x8_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool16x8Reg(data->B8_0);
- DumpInt16x8Reg(data->I8_1);
- DumpInt16x8Reg(data->I8_2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt16x8_1Bool16x8_1Int16x8_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt16x8Reg(data->I8_0);
- DumpBool16x8Reg(data->B8_1);
- DumpInt16x8Reg(data->I8_2);
- DumpInt16x8Reg(data->I8_3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt16x8_2Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt16x8Reg(data->I8_0);
- DumpInt16x8Reg(data->I8_1);
- DumpIntReg(data->I2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt16x8_1Float32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt16x8Reg(data->I8_0);
- DumpFloat32x4Reg(data->F4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt16x8_1Int32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt16x8Reg(data->I8_0);
- DumpInt32x4Reg(data->I4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt16x8_1Int8x16_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt16x8Reg(data->I8_0);
- DumpInt8x16Reg(data->I16_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt16x8_1Uint32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt16x8Reg(data->I8_0);
- DumpUint32x4Reg(data->U4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt16x8_1Uint16x8_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt16x8Reg(data->I8_0);
- DumpUint16x8Reg(data->U8_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt16x8_1Uint8x16_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt16x8Reg(data->I8_0);
- DumpUint8x16Reg(data->U16_1);
- }
- // Uint32x4
- template <class T>
- void AsmJsByteCodeDumper::DumpUint32x4_1Int4(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint32x4Reg(data->U4_0);
- DumpIntReg(data->I1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint32x4_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint32x4Reg(data->U4_0);
- DumpUint32x4Reg(data->U4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpReg1Uint32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpUint32x4Reg(data->U4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt1Uint32x4_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpUint32x4Reg(data->U4_1);
- DumpIntReg(data->I2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint32x4_2Int4(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint32x4Reg(data->U4_0);
- DumpUint32x4Reg(data->U4_1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint32x4_3Int4(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint32x4Reg(data->U4_0);
- DumpUint32x4Reg(data->U4_1);
- DumpUint32x4Reg(data->U4_2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- DumpIntReg(data->I6);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint32x4_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint32x4Reg(data->U4_0);
- DumpIntReg(data->I1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint32x4_2Int2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint32x4Reg(data->U4_0);
- DumpUint32x4Reg(data->U4_1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint32x4_3(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint32x4Reg(data->U4_0);
- DumpUint32x4Reg(data->U4_1);
- DumpUint32x4Reg(data->U4_2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpBool32x4_1Uint32x4_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool32x4Reg(data->B4_0);
- DumpUint32x4Reg(data->U4_1);
- DumpUint32x4Reg(data->U4_2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint32x4_1Bool32x4_1Uint32x4_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint32x4Reg(data->U4_0);
- DumpBool32x4Reg(data->B4_1);
- DumpUint32x4Reg(data->U4_2);
- DumpUint32x4Reg(data->U4_3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint32x4_2Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint32x4Reg(data->U4_0);
- DumpUint32x4Reg(data->U4_1);
- DumpIntReg(data->I2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint32x4_1Float32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint32x4Reg(data->U4_0);
- DumpFloat32x4Reg(data->F4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint32x4_1Int32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint32x4Reg(data->U4_0);
- DumpInt32x4Reg(data->I4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint32x4_1Int16x8_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint32x4Reg(data->U4_0);
- DumpInt16x8Reg(data->I8_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint32x4_1Int8x16_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint32x4Reg(data->U4_0);
- DumpInt8x16Reg(data->I16_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint32x4_1Uint16x8_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint32x4Reg(data->U4_0);
- DumpUint16x8Reg(data->U8_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint32x4_1Uint8x16_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpInt16x8Reg(data->U4_0);
- DumpUint8x16Reg(data->U16_1);
- }
- // Uint16x8
- template <class T>
- void AsmJsByteCodeDumper::DumpUint16x8_1Int8(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint16x8Reg(data->U8_0);
- DumpIntReg(data->I1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- DumpIntReg(data->I6);
- DumpIntReg(data->I7);
- DumpIntReg(data->I8);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint16x8_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint16x8Reg(data->U8_0);
- DumpUint16x8Reg(data->U8_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpReg1Uint16x8_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpUint16x8Reg(data->U8_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt1Uint16x8_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpUint16x8Reg(data->U8_1);
- DumpIntReg(data->I2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint16x8_2Int8(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint16x8Reg(data->U8_0);
- DumpUint16x8Reg(data->U8_1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- DumpIntReg(data->I6);
- DumpIntReg(data->I7);
- DumpIntReg(data->I8);
- DumpIntReg(data->I9);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint16x8_3Int8(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint16x8Reg(data->U8_0);
- DumpUint16x8Reg(data->U8_1);
- DumpUint16x8Reg(data->U8_2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- DumpIntReg(data->I6);
- DumpIntReg(data->I7);
- DumpIntReg(data->I8);
- DumpIntReg(data->I9);
- DumpIntReg(data->I10);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint16x8_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint16x8Reg(data->U8_0);
- DumpIntReg(data->I1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint16x8_2Int2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint16x8Reg(data->U8_0);
- DumpUint16x8Reg(data->U8_1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint16x8_3(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint16x8Reg(data->U8_0);
- DumpUint16x8Reg(data->U8_1);
- DumpUint16x8Reg(data->U8_2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpBool16x8_1Uint16x8_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool16x8Reg(data->B8_0);
- DumpUint16x8Reg(data->U8_1);
- DumpUint16x8Reg(data->U8_2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint16x8_1Bool16x8_1Uint16x8_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint16x8Reg(data->U8_0);
- DumpBool16x8Reg(data->B8_1);
- DumpUint16x8Reg(data->U8_2);
- DumpUint16x8Reg(data->U8_3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint16x8_2Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint16x8Reg(data->U8_0);
- DumpUint16x8Reg(data->U8_1);
- DumpIntReg(data->I2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint16x8_1Float32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint16x8Reg(data->U8_0);
- DumpFloat32x4Reg(data->F4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint16x8_1Int32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint16x8Reg(data->U8_0);
- DumpInt32x4Reg(data->I4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint16x8_1Int16x8_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint16x8Reg(data->U8_0);
- DumpInt16x8Reg(data->I8_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint16x8_1Int8x16_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint16x8Reg(data->U8_0);
- DumpInt8x16Reg(data->I16_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint16x8_1Uint32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint16x8Reg(data->U8_0);
- DumpUint32x4Reg(data->U4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint16x8_1Uint8x16_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint16x8Reg(data->U8_0);
- DumpUint8x16Reg(data->U16_1);
- }
- // Uint8x16
- template <class T>
- void AsmJsByteCodeDumper::DumpUint8x16_1Int16(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint8x16Reg(data->U16_0);
- DumpIntReg(data->I1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- DumpIntReg(data->I6);
- DumpIntReg(data->I7);
- DumpIntReg(data->I8);
- DumpIntReg(data->I9);
- DumpIntReg(data->I10);
- DumpIntReg(data->I11);
- DumpIntReg(data->I12);
- DumpIntReg(data->I13);
- DumpIntReg(data->I14);
- DumpIntReg(data->I15);
- DumpIntReg(data->I16);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint8x16_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint8x16Reg(data->U16_0);
- DumpUint8x16Reg(data->U16_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpReg1Uint8x16_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpReg(data->R0);
- DumpUint8x16Reg(data->U16_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpInt1Uint8x16_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpIntReg(data->I0);
- DumpUint8x16Reg(data->U16_1);
- DumpIntReg(data->I2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint8x16_2Int16(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint8x16Reg(data->U16_0);
- DumpUint8x16Reg(data->U16_1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- DumpIntReg(data->I6);
- DumpIntReg(data->I7);
- DumpIntReg(data->I8);
- DumpIntReg(data->I9);
- DumpIntReg(data->I10);
- DumpIntReg(data->I11);
- DumpIntReg(data->I12);
- DumpIntReg(data->I13);
- DumpIntReg(data->I14);
- DumpIntReg(data->I15);
- DumpIntReg(data->I16);
- DumpIntReg(data->I17);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint8x16_3Int16(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint8x16Reg(data->U16_0);
- DumpUint8x16Reg(data->U16_1);
- DumpUint8x16Reg(data->U16_2);
- DumpIntReg(data->I3);
- DumpIntReg(data->I4);
- DumpIntReg(data->I5);
- DumpIntReg(data->I6);
- DumpIntReg(data->I7);
- DumpIntReg(data->I8);
- DumpIntReg(data->I9);
- DumpIntReg(data->I10);
- DumpIntReg(data->I11);
- DumpIntReg(data->I12);
- DumpIntReg(data->I13);
- DumpIntReg(data->I14);
- DumpIntReg(data->I15);
- DumpIntReg(data->I16);
- DumpIntReg(data->I17);
- DumpIntReg(data->I18);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint8x16_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint8x16Reg(data->U16_0);
- DumpIntReg(data->I1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint8x16_2Int2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint8x16Reg(data->U16_0);
- DumpUint8x16Reg(data->U16_1);
- DumpIntReg(data->I2);
- DumpIntReg(data->I3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint8x16_3(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint8x16Reg(data->U16_0);
- DumpUint8x16Reg(data->U16_1);
- DumpUint8x16Reg(data->U16_2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpBool8x16_1Uint8x16_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool8x16Reg(data->B16_0);
- DumpUint8x16Reg(data->U16_1);
- DumpUint8x16Reg(data->U16_2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint8x16_1Bool8x16_1Uint8x16_2(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint8x16Reg(data->U16_0);
- DumpBool8x16Reg(data->B16_1);
- DumpUint8x16Reg(data->U16_2);
- DumpUint8x16Reg(data->U16_3);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint8x16_2Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint8x16Reg(data->U16_0);
- DumpUint8x16Reg(data->U16_1);
- DumpIntReg(data->I2);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint8x16_1Float32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint8x16Reg(data->U16_0);
- DumpFloat32x4Reg(data->F4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint8x16_1Int32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint8x16Reg(data->U16_0);
- DumpInt32x4Reg(data->I4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint8x16_1Int16x8_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint8x16Reg(data->U16_0);
- DumpInt16x8Reg(data->I8_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint8x16_1Int8x16_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint8x16Reg(data->U16_0);
- DumpInt8x16Reg(data->I16_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint8x16_1Uint32x4_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint8x16Reg(data->U16_0);
- DumpUint32x4Reg(data->U4_1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpUint8x16_1Uint16x8_1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpUint8x16Reg(data->U16_0);
- DumpUint16x8Reg(data->U8_1);
- }
- // bool32x4
- template <class T>
- void AsmJsByteCodeDumper::DumpBool32x4_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool32x4Reg(data->B4_0);
- DumpIntReg(data->I1);
- }
- // bool16x8
- template <class T>
- void AsmJsByteCodeDumper::DumpBool16x8_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool16x8Reg(data->B8_0);
- DumpIntReg(data->I1);
- }
- // bool8x16
- template <class T>
- void AsmJsByteCodeDumper::DumpBool8x16_1Int1(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- DumpBool8x16Reg(data->B16_0);
- DumpIntReg(data->I1);
- }
- template <class T>
- void AsmJsByteCodeDumper::DumpAsmSimdTypedArr(OpCodeAsmJs op, const unaligned T * data, FunctionBody * dumpFunction, ByteCodeReader& reader)
- {
- const char16* heapTag = nullptr;
- switch (data->ViewType)
- {
- case ArrayBufferView::TYPE_INT8:
- heapTag = _u("HEAP8"); break;
- case ArrayBufferView::TYPE_UINT8:
- heapTag = _u("HEAPU8"); break;
- case ArrayBufferView::TYPE_INT16:
- heapTag = _u("HEAP16"); break;
- case ArrayBufferView::TYPE_UINT16:
- heapTag = _u("HEAPU16"); break;
- case ArrayBufferView::TYPE_INT32:
- heapTag = _u("HEAP32"); break;
- case ArrayBufferView::TYPE_UINT32:
- heapTag = _u("HEAPU32"); break;
- case ArrayBufferView::TYPE_FLOAT32:
- heapTag = _u("HEAPF32"); break;
- case ArrayBufferView::TYPE_FLOAT64:
- heapTag = _u("HEAPF64"); break;
- default:
- Assert(false);
- __assume(false);
- break;
- }
- switch (op)
- {
- case OpCodeAsmJs::Simd128_LdArrConst_I4:
- case OpCodeAsmJs::Simd128_LdArrConst_F4:
- //case OpCodeAsmJs::Simd128_LdArrConst_D2:
- case OpCodeAsmJs::Simd128_StArrConst_I4:
- case OpCodeAsmJs::Simd128_StArrConst_F4:
- //case OpCodeAsmJs::Simd128_StArrConst_D2:
- Output::Print(_u(" %s[%d] "), heapTag, data->SlotIndex);
- break;
- case OpCodeAsmJs::Simd128_LdArr_I4:
- case OpCodeAsmJs::Simd128_LdArr_F4:
- //case OpCodeAsmJs::Simd128_LdArr_D2:
- case OpCodeAsmJs::Simd128_StArr_I4:
- case OpCodeAsmJs::Simd128_StArr_F4:
- //case OpCodeAsmJs::Simd128_StArr_D2:
- Output::Print(_u(" %s[I%d] "), heapTag, data->SlotIndex);
- break;
- default:
- Assert(false);
- __assume(false);
- break;
- }
- switch (op)
- {
- case OpCodeAsmJs::Simd128_LdArr_I4:
- case OpCodeAsmJs::Simd128_LdArrConst_I4:
- case OpCodeAsmJs::Simd128_StArr_I4:
- case OpCodeAsmJs::Simd128_StArrConst_I4:
- DumpInt32x4Reg(data->Value);
- break;
- case OpCodeAsmJs::Simd128_LdArr_F4:
- case OpCodeAsmJs::Simd128_LdArrConst_F4:
- case OpCodeAsmJs::Simd128_StArr_F4:
- case OpCodeAsmJs::Simd128_StArrConst_F4:
- DumpFloat32x4Reg(data->Value);
- break;
- #if 0
- case OpCodeAsmJs::Simd128_LdArr_D2:
- case OpCodeAsmJs::Simd128_LdArrConst_D2:
- case OpCodeAsmJs::Simd128_StArr_D2:
- case OpCodeAsmJs::Simd128_StArrConst_D2:
- DumpFloat64x2Reg(data->Value);
- break;
- #endif // 0
- default:
- Assert(false);
- __assume(false);
- break;
- }
- // data width
- Output::Print(_u(" %d bytes "), data->DataWidth);
- }
- }
- #endif
- #endif
|