Path: blob/master/runtime/compiler/ilgen/J9ByteCodeIterator.cpp
6000 views
/*******************************************************************************1* Copyright (c) 2000, 2022 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception20*******************************************************************************/2122#include "ilgen/J9ByteCodeIterator.hpp"23#include "compile/Compilation.hpp"24#include "compile/Method.hpp"25#include "env/VMJ9.h"26#include "ras/Debug.hpp"27#include "env/IO.hpp"2829void30TR_J9ByteCodeIterator::initialize(TR_ResolvedJ9Method * method, TR_J9VMBase * fe)31{32_fe = fe;33_code = method->bytecodeStart();34_bcIndex = -1;35}3637int32_t38TR_J9ByteCodeIterator::nextSwitchValue(int32_t & bcIndex)39{40int32_t value = *(int32_t *)&_code[bcIndex];41bcIndex += 4;42return value;43}4445void46TR_J9ByteCodeIterator::stepOverVariableSizeBC()47{48if (_bc == J9BCwide)49convertOpCodeToByteCodeEnum(++_bcIndex) == J9BCiinc ? _bcIndex += 5 : _bcIndex += 3;50else if (_bc == J9BClookupswitch)51{52_bcIndex = defaultTargetIndex() + 4;53int32_t tableSize = nextSwitchValue(_bcIndex);54_bcIndex += (8 * tableSize);55}56else57{58TR_ASSERT(_bc == J9BCtableswitch, "invalid 0 size for a byte code");59_bcIndex = defaultTargetIndex() + 4;60int32_t low = nextSwitchValue(_bcIndex);61int32_t high = nextSwitchValue(_bcIndex);62_bcIndex += (4 * (high - low + 1));63}64}6566bool67TR_J9ByteCodeIterator::isThisChanged()68{69for (TR_J9ByteCode bc = first(); bc != J9BCunknown; bc = next())70{71switch (bc)72{73case J9BCistore0:74case J9BClstore0:75case J9BCfstore0:76case J9BCdstore0:77case J9BCastore0:78return true;79case J9BCistore:80case J9BClstore:81case J9BCfstore:82case J9BCdstore:83case J9BCastore:84case J9BCistorew:85case J9BClstorew:86case J9BCfstorew:87case J9BCdstorew:88case J9BCastorew:89if (nextByte() == 0)90return true;91default:92//nothing to do here93break;94}95}96return false;97}9899int32_t100TR_J9ByteCodeIterator::findFloatingPointInstruction()101{102bool isVolatile, isPrivate;103TR::DataType type = TR::NoType;104uint32_t offset;105void * staticAddress;106for (TR_J9ByteCode bc = first(); bc != J9BCunknown; bc = next())107switch (bc)108{109case J9BCfconst0: case J9BCfconst1: case J9BCfconst2:110case J9BCdconst0: case J9BCdconst1:111case J9BCldc2dw:112case J9BCfload: case J9BCdload:113case J9BCfload0: case J9BCfload1: case J9BCfload2: case J9BCfload3:114case J9BCdload0: case J9BCdload1: case J9BCdload2: case J9BCdload3:115case J9BCfaload: case J9BCdaload:116case J9BCfloadw: case J9BCdloadw:117case J9BCfstore: case J9BCdstore:118case J9BCfstorew: case J9BCdstorew:119case J9BCfstore0: case J9BCfstore1: case J9BCfstore2: case J9BCfstore3:120case J9BCdstore0: case J9BCdstore1: case J9BCdstore2: case J9BCdstore3:121case J9BCfastore: case J9BCdastore:122case J9BCfadd: case J9BCdadd:123case J9BCfsub: case J9BCdsub:124case J9BCfmul: case J9BCdmul:125case J9BCfdiv: case J9BCddiv:126case J9BCfrem: case J9BCdrem:127case J9BCfneg: case J9BCdneg:128case J9BCi2f: case J9BCi2d:129case J9BCl2f: case J9BCl2d: case J9BCf2i: case J9BCf2l: case J9BCf2d:130case J9BCd2i: case J9BCd2l: case J9BCd2f:131case J9BCfcmpl: case J9BCfcmpg: case J9BCdcmpl: case J9BCdcmpg:132return bcIndex();133case J9BCldc:134if (method()->getLDCType(nextByte()) == TR::Float)135return bcIndex();136break;137case J9BCldcw:138if (method()->getLDCType(next2Bytes()) == TR::Float)139return bcIndex();140break;141case J9BCgetfield: case J9BCputfield:142{143method()->fieldAttributes(_compilation, next2Bytes(), &offset, &type, &isVolatile, NULL, &isPrivate, (bc == J9BCputfield), NULL, false);144if (type == TR::Float || type == TR::Double)145return bcIndex();146break;147}148case J9BCgetstatic: case J9BCputstatic:149method()->staticAttributes(_compilation, next2Bytes(), &staticAddress, &type, &isVolatile, NULL, &isPrivate, (bc == J9BCputstatic), NULL, false);150if (type == TR::Float || type == TR::Double)151return bcIndex();152break;153case J9BCinvokestatic: case J9BCinvokevirtual: case J9BCinvokespecial: case J9BCinvokeinterface:154case J9BCinvokedynamic: case J9BCinvokehandle: case J9BCinvokehandlegeneric:155case J9BCinvokestaticsplit: case J9BCinvokespecialsplit:156{157int32_t index = next2Bytes();158if (bc == J9BCinvokestaticsplit)159index = index | J9_STATIC_SPLIT_TABLE_INDEX_FLAG;160if (bc == J9BCinvokespecialsplit)161index = index | J9_SPECIAL_SPLIT_TABLE_INDEX_FLAG;162163TR_J9VMBase *fej9 = (TR_J9VMBase *)_fe;164TR::Method *thisMethod = fej9->createMethod(_trMemory, method()->containingClass(), index);165166// check return type167type = thisMethod->returnType();168if (type == TR::Float || type == TR::Double)169return bcIndex();170171// check parameter types - in case an arg is only ldc'ed172int32_t argNum, elems = thisMethod->numberOfExplicitParameters();173for(argNum=0;argNum<elems;argNum++)174{175TR::DataType type = thisMethod->parmType(argNum);176if (type == TR::Float || type == TR::Double)177return bcIndex();178}179break;180}181default:182break;183}184return -1;185}186187void188TR_J9ByteCodeIterator::printByteCodePrologue()189{190trfprintf(comp()->getOutFile(), "\n"191" +------------- Byte Code Index\n"192" | +-------------------- OpCode\n"193" | | +------------- First Field\n"194" | | | +------------- Branch Target\n"195" | | | | +------- Const Pool Index\n"196" | | | | | +------------- Constant\n"197" | | | | | |\n"198" V V V V V V\n");199}200201void202TR_J9ByteCodeIterator::printByteCodeEpilogue()203{204trfprintf(comp()->getOutFile(), "\n\n"); comp()->getDebug()->printByteCodeAnnotations();205}206207void208TR_J9ByteCodeIterator::printFirst(int32_t i)209{210trfprintf(comp()->getOutFile(), "%5i", i);211}212213void214TR_J9ByteCodeIterator::printCPIndex(int32_t i)215{216trfprintf(comp()->getOutFile(), "%13s%5i", "", i);217}218219void220TR_J9ByteCodeIterator::printConstant(int32_t i)221{222trfprintf(comp()->getOutFile(), "%11s%12i ", "", i);223}224225void226TR_J9ByteCodeIterator::printConstant(double d)227{228trfprintf(comp()->getOutFile(), "%11s%12e ", "", d);229}230231void232TR_J9ByteCodeIterator::printFirstAndConstant(int32_t i, int32_t j)233{234trfprintf(comp()->getOutFile(), "%5i%6s%12i ", i, "", j);235}236237void238TR_J9ByteCodeIterator::printJumpIndex(int32_t offset)239{240trfprintf(comp()->getOutFile(), "%5i,%5d,%11s ", offset, offset + bcIndex(), "");241}242243void244TR_J9ByteCodeIterator::printByteCode()245{246uint8_t opcode = nextByte(0);247248trfprintf(comp()->getOutFile(), "\n %6i, %-15s ", bcIndex(), ((TR_J9VMBase *)fe())->getByteCodeName(opcode));249250TR_J9ByteCode bc = convertOpCodeToByteCodeEnum(opcode);251switch (bc)252{253case J9BCbipush:254printConstant(nextByteSigned());255break;256257case J9BCsipush:258printConstant(next2BytesSigned());259break;260261case J9BCiload: case J9BClload: case J9BCfload: case J9BCdload: case J9BCaload:262case J9BCistore: case J9BClstore: case J9BCfstore: case J9BCdstore: case J9BCastore:263printFirst(nextByte());264break;265266case J9BCiinc:267printFirstAndConstant(nextByte(), nextByteSigned(2));268break;269270case J9BCinvokevirtual:271case J9BCinvokespecial:272case J9BCinvokestatic:273case J9BCinvokeinterface:274case J9BCinvokedynamic: // Could eventually need next3bytes275case J9BCinvokehandle:276case J9BCinvokehandlegeneric:277case J9BCinvokespecialsplit:278case J9BCinvokestaticsplit:279printFirst(next2Bytes());280break;281282case J9BCgetstatic: case J9BCgetfield: case J9BCputstatic: case J9BCputfield:283case J9BCcheckcast: case J9BCinstanceof:284case J9BCnew: case J9BCanewarray:285case J9BCaconst_init: case J9BCwithfield:286printCPIndex(next2Bytes());287break;288289case J9BCnewarray:290printCPIndex(nextByte());291break;292293case J9BCmultianewarray:294printCPIndex(next2Bytes());295printConstant(nextByte(3));296break;297298case J9BCifeq: case J9BCifne: case J9BCiflt: case J9BCifge: case J9BCifgt: case J9BCifle: case J9BCifnull: case J9BCifnonnull:299case J9BCificmpeq: case J9BCificmpne: case J9BCificmplt: case J9BCificmpge: case J9BCificmpgt: case J9BCificmple: case J9BCifacmpeq: case J9BCifacmpne:300case J9BCgoto:301printJumpIndex(next2BytesSigned());302break;303304case J9BCgotow:305printJumpIndex(next4BytesSigned());306break;307default:308break;309}310}311312const TR_J9ByteCode TR_J9ByteCodeIterator::_opCodeToByteCodeEnum[] =313{314/* 0 */ J9BCnop,315/* 1 */ J9BCaconstnull, J9BCiconstm1,316/* 3 */ J9BCiconst0, J9BCiconst1, J9BCiconst2, J9BCiconst3, J9BCiconst4, J9BCiconst5,317/* 9 */ J9BClconst0, J9BClconst1,318/* 11 */ J9BCfconst0, J9BCfconst1, J9BCfconst2,319/* 14 */ J9BCdconst0, J9BCdconst1,320/* 16 */ J9BCbipush, J9BCsipush,321/* 18 */ J9BCldc, J9BCldcw, J9BCldc2lw,322/* 21 */ J9BCiload, J9BClload, J9BCfload, J9BCdload, J9BCaload,323/* 26 */ J9BCiload0, J9BCiload1, J9BCiload2, J9BCiload3,324/* 30 */ J9BClload0, J9BClload1, J9BClload2, J9BClload3,325/* 34 */ J9BCfload0, J9BCfload1, J9BCfload2, J9BCfload3,326/* 38 */ J9BCdload0, J9BCdload1, J9BCdload2, J9BCdload3,327/* 42 */ J9BCaload0, J9BCaload1, J9BCaload2, J9BCaload3,328/* 46 */ J9BCiaload, J9BClaload, J9BCfaload, J9BCdaload, J9BCaaload, J9BCbaload, J9BCcaload, J9BCsaload,329/* 54 */ J9BCistore, J9BClstore, J9BCfstore, J9BCdstore, J9BCastore,330/* 59 */ J9BCistore0, J9BCistore1, J9BCistore2, J9BCistore3,331/* 63 */ J9BClstore0, J9BClstore1, J9BClstore2, J9BClstore3,332/* 67 */ J9BCfstore0, J9BCfstore1, J9BCfstore2, J9BCfstore3,333/* 71 */ J9BCdstore0, J9BCdstore1, J9BCdstore2, J9BCdstore3,334/* 75 */ J9BCastore0, J9BCastore1, J9BCastore2, J9BCastore3,335/* 79 */ J9BCiastore, J9BClastore, J9BCfastore, J9BCdastore, J9BCaastore, J9BCbastore, J9BCcastore, J9BCsastore,336/* 87 */ J9BCpop, J9BCpop2,337/* 89 */ J9BCdup, J9BCdupx1, J9BCdupx2, J9BCdup2, J9BCdup2x1, J9BCdup2x2,338/* 95 */ J9BCswap,339/* 96 */ J9BCiadd, J9BCladd, J9BCfadd, J9BCdadd,340/* 100 */ J9BCisub, J9BClsub, J9BCfsub, J9BCdsub,341/* 104 */ J9BCimul, J9BClmul, J9BCfmul, J9BCdmul,342/* 108 */ J9BCidiv, J9BCldiv, J9BCfdiv, J9BCddiv,343/* 112 */ J9BCirem, J9BClrem, J9BCfrem, J9BCdrem,344/* 116 */ J9BCineg, J9BClneg, J9BCfneg, J9BCdneg,345/* 120 */ J9BCishl, J9BClshl, J9BCishr, J9BClshr, J9BCiushr, J9BClushr,346/* 126 */ J9BCiand, J9BCland,347/* 128 */ J9BCior, J9BClor, J9BCixor, J9BClxor,348/* 132 */ J9BCiinc,349/* 133 */ J9BCi2l, J9BCi2f, J9BCi2d,350/* 136 */ J9BCl2i, J9BCl2f, J9BCl2d,351/* 139 */ J9BCf2i, J9BCf2l, J9BCf2d,352/* 142 */ J9BCd2i, J9BCd2l, J9BCd2f,353/* 145 */ J9BCi2b, J9BCi2c, J9BCi2s,354/* 148 */ J9BClcmp, J9BCfcmpl, J9BCfcmpg, J9BCdcmpl, J9BCdcmpg,355/* 153 */ J9BCifeq, J9BCifne, J9BCiflt, J9BCifge, J9BCifgt, J9BCifle,356/* 159 */ J9BCificmpeq, J9BCificmpne, J9BCificmplt, J9BCificmpge, J9BCificmpgt, J9BCificmple, J9BCifacmpeq, J9BCifacmpne,357/* 167 */ J9BCgoto, J9BCunknown, J9BCunknown,358/* 170 */ J9BCtableswitch, J9BClookupswitch,359/* 172 */ J9BCgenericReturn, J9BCgenericReturn, J9BCgenericReturn,360/* 175 */ J9BCgenericReturn, J9BCgenericReturn, J9BCgenericReturn,361/* 178 */ J9BCgetstatic, J9BCputstatic, J9BCgetfield, J9BCputfield,362/* 182 */ J9BCinvokevirtual, J9BCinvokespecial, J9BCinvokestatic, J9BCinvokeinterface, J9BCinvokedynamic,363/* 187 */ J9BCnew, J9BCnewarray, J9BCanewarray,364/* 190 */ J9BCarraylength,365/* 191 */ J9BCathrow,366/* 192 */ J9BCcheckcast,367/* 193 */ J9BCinstanceof,368/* 194 */ J9BCmonitorenter, J9BCmonitorexit,369/* 196 */ J9BCunknown,370/* 197 */ J9BCmultianewarray,371/* 198 */ J9BCifnull, J9BCifnonnull,372/* 200 */ J9BCgotow, J9BCunknown,373/* 202 */ J9BCbreakpoint,374/* 203 */ J9BCaconst_init,375/* 204 */ J9BCwithfield,376/* 205 */ J9BCunknown, J9BCunknown, J9BCunknown, J9BCunknown,377/* 209 */ J9BCunknown, J9BCunknown, J9BCunknown, J9BCunknown,378/* 213 */ J9BCiincw, J9BCunknown,379/* 215 - JBaload0getfield */ J9BCaload0,380/* 216 - JBnewdup */ J9BCnew,381/* 217 */ J9BCiloadw, J9BClloadw, J9BCfloadw, J9BCdloadw, J9BCaloadw,382/* 222 */ J9BCistorew, J9BClstorew, J9BCfstorew, J9BCdstorew, J9BCastorew,383/* 227 */ J9BCunknown,384/* 228 */ J9BCgenericReturn, J9BCgenericReturn, J9BCunknown, J9BCinvokeinterface2,385/* 232 */ J9BCinvokehandle, J9BCinvokehandlegeneric,386/* 234 */ J9BCinvokestaticsplit, J9BCinvokespecialsplit,387/* 236 */ J9BCReturnC, J9BCReturnS, J9BCReturnB, J9BCReturnZ,388/* 240 */ J9BCunknown, J9BCunknown, J9BCunknown, J9BCunknown,389/* 244 */ J9BCunknown, J9BCunknown, J9BCunknown, J9BCunknown, J9BCunknown,390/* 249 */ J9BCldc2dw,391/* 250 */ J9BCunknown, J9BCunknown, J9BCunknown, J9BCunknown, J9BCunknown, J9BCunknown392};393394const uint8_t TR_J9ByteCodeIterator::_byteCodeFlags[] =395{396// FLAGS | SIZE,3970x01, // J9BCnop3980x01, // J9BCaconstnull3990x01, // J9BCiconstm14000x01, // J9BCiconst04010x01, // J9BCiconst14020x01, // J9BCiconst24030x01, // J9BCiconst34040x01, // J9BCiconst44050x01, // J9BCiconst54060x01, // J9BClconst04070x01, // J9BClconst14080x01, // J9BCfconst04090x01, // J9BCfconst14100x01, // J9BCfconst24110x01, // J9BCdconst04120x01, // J9BCdconst14130x02, // J9BCbipush4140x03, // J9BCsipush4150x02, // J9BCldc4160x03, // J9BCldcw4170x03, // J9BCldc2lw4180x03, // J9BCldc2dw4190x02, // J9BCiload4200x02, // J9BClload4210x02, // J9BCfload4220x02, // J9BCdload4230x02, // J9BCaload4240x01, // J9BCiload04250x01, // J9BCiload14260x01, // J9BCiload24270x01, // J9BCiload34280x01, // J9BClload04290x01, // J9BClload14300x01, // J9BClload24310x01, // J9BClload34320x01, // J9BCfload04330x01, // J9BCfload14340x01, // J9BCfload24350x01, // J9BCfload34360x01, // J9BCdload04370x01, // J9BCdload14380x01, // J9BCdload24390x01, // J9BCdload34400x01, // J9BCaload04410x01, // J9BCaload14420x01, // J9BCaload24430x01, // J9BCaload34440x01, // J9BCiaload4450x01, // J9BClaload4460x01, // J9BCfaload4470x01, // J9BCdaload4480x01, // J9BCaaload4490x01, // J9BCbaload4500x01, // J9BCcaload4510x01, // J9BCsaload4520x03, // J9BCiloadw4530x03, // J9BClloadw4540x03, // J9BCfloadw4550x03, // J9BCdloadw4560x03, // J9BCaloadw4570x02, // J9BCistore4580x02, // J9BClstore4590x02, // J9BCfstore4600x02, // J9BCdstore4610x02, // J9BCastore4620x03, // J9BCistorew4630x03, // J9BClstorew4640x03, // J9BCfstorew4650x03, // J9BCdstorew4660x03, // J9BCastorew4670x01, // J9BCistore04680x01, // J9BCistore14690x01, // J9BCistore24700x01, // J9BCistore34710x01, // J9BClstore04720x01, // J9BClstore14730x01, // J9BClstore24740x01, // J9BClstore34750x01, // J9BCfstore04760x01, // J9BCfstore14770x01, // J9BCfstore24780x01, // J9BCfstore34790x01, // J9BCdstore04800x01, // J9BCdstore14810x01, // J9BCdstore24820x01, // J9BCdstore34830x01, // J9BCastore04840x01, // J9BCastore14850x01, // J9BCastore24860x01, // J9BCastore34870x01, // J9BCiastore4880x01, // J9BClastore4890x01, // J9BCfastore4900x01, // J9BCdastore4910x01, // J9BCaastore4920x01, // J9BCbastore4930x01, // J9BCcastore4940x01, // J9BCsastore4950x01, // J9BCpop4960x01, // J9BCpop24970x01, // J9BCdup4980x01, // J9BCdupx14990x01, // J9BCdupx25000x01, // J9BCdup25010x01, // J9BCdup2x15020x01, // J9BCdup2x25030x01, // J9BCswap5040x01, // J9BCiadd5050x01, // J9BCladd5060x01, // J9BCfadd5070x01, // J9BCdadd5080x01, // J9BCisub5090x01, // J9BClsub5100x01, // J9BCfsub5110x01, // J9BCdsub5120x01, // J9BCimul5130x01, // J9BClmul5140x01, // J9BCfmul5150x01, // J9BCdmul5160x01, // J9BCidiv5170x01, // J9BCldiv5180x01, // J9BCfdiv5190x01, // J9BCddiv5200x01, // J9BCirem5210x01, // J9BClrem5220x01, // J9BCfrem5230x01, // J9BCdrem5240x01, // J9BCineg5250x01, // J9BClneg5260x01, // J9BCfneg5270x01, // J9BCdneg5280x01, // J9BCishl5290x01, // J9BClshl5300x01, // J9BCishr5310x01, // J9BClshr5320x01, // J9BCiushr5330x01, // J9BClushr5340x01, // J9BCiand5350x01, // J9BCland5360x01, // J9BCior5370x01, // J9BClor5380x01, // J9BCixor5390x01, // J9BClxor5400x03, // J9BCiinc5410x05, // J9BCiincw5420x01, // J9BCi2l5430x01, // J9BCi2f5440x01, // J9BCi2d5450x01, // J9BCl2i5460x01, // J9BCl2f5470x01, // J9BCl2d5480x01, // J9BCf2i5490x01, // J9BCf2l5500x01, // J9BCf2d5510x01, // J9BCd2i5520x01, // J9BCd2l5530x01, // J9BCd2f5540x01, // J9BCi2b5550x01, // J9BCi2c5560x01, // J9BCi2s5570x01, // J9BClcmp5580x01, // J9BCfcmpl5590x01, // J9BCfcmpg5600x01, // J9BCdcmpl5610x01, // J9BCdcmpg562TwoByteRelativeBranch | 0x03, // J9BCifeq563TwoByteRelativeBranch | 0x03, // J9BCifne564TwoByteRelativeBranch | 0x03, // J9BCiflt565TwoByteRelativeBranch | 0x03, // J9BCifge566TwoByteRelativeBranch | 0x03, // J9BCifgt567TwoByteRelativeBranch | 0x03, // J9BCifle568TwoByteRelativeBranch | 0x03, // J9BCificmpeq569TwoByteRelativeBranch | 0x03, // J9BCificmpne570TwoByteRelativeBranch | 0x03, // J9BCificmplt571TwoByteRelativeBranch | 0x03, // J9BCificmpge572TwoByteRelativeBranch | 0x03, // J9BCificmpgt573TwoByteRelativeBranch | 0x03, // J9BCificmple574TwoByteRelativeBranch | 0x03, // J9BCifacmpeq575TwoByteRelativeBranch | 0x03, // J9BCifacmpne576TwoByteRelativeBranch | 0x03, // J9BCifnull577TwoByteRelativeBranch | 0x03, // J9BCifnonnull578TwoByteRelativeBranch | 0x03, // J9BCgoto579FourByteRelativeBranch | 0x05, // J9BCgotow5800x00, // J9BCtableswitch5810x00, // J9BClookupswitch5820x01, // J9BCgenericReturn5830x03, // J9BCgetstatic5840x03, // J9BCputstatic5850x03, // J9BCgetfield5860x03, // J9BCputfield5870x03, // J9BCinvokevirtual5880x03, // J9BCinvokespecial5890x03, // J9BCinvokestatic5900x03, // J9BCinvokeinterface5910x03, // J9BCinvokedynamic5920x03, // J9BCinvokehandle5930x03, // J9BCinvokehandlegeneric5940x03, // J9BCinvokespecialsplit5950x01, // J9BCReturnC5960x01, // J9BCReturnS5970x01, // J9BCReturnB5980x01, // J9BCReturnZ5990x03, // J9BCinvokestaticsplit6000x01, // J9BCinvokeinterface26010x03, // J9BCnew6020x02, // J9BCnewarray6030x03, // J9BCanewarray6040x04, // J9BCmultianewarray6050x01, // J9BCarraylength6060x01, // J9BCathrow6070x03, // J9BCcheckcast6080x03, // J9BCinstanceof6090x01, // J9BCmonitorenter6100x01, // J9BCmonitorexit6110x00, // J9BCwide6120x01, // J9BCasyncCheck --- TODO: Is this the right size?6130x03, // J9BCaconst_init6140x03, // J9BCwithfield6150x01, // J9BCbreakpoint --- TODO: Is this the right size?6160x01, // BCunknown617};618619const uint8_t TR_J9ByteCodeIterator::_estimatedCodeSize[] =620{6210, // J9BCnop6221, // J9BCaconstnull6231, // J9BCiconstm16241, // J9BCiconst06251, // J9BCiconst16261, // J9BCiconst26271, // J9BCiconst36281, // J9BCiconst46291, // J9BCiconst56302, // J9BClconst06312, // J9BClconst16321, // J9BCfconst06331, // J9BCfconst16342, // J9BCfconst26351, // J9BCdconst06361, // J9BCdconst16371, // J9BCbipush6381, // J9BCsipush6391, // J9BCldc6401, // J9BCldcw6412, // J9BCldc2lw6422, // J9BCldc2dw6431, // J9BCiload6442, // J9BClload6451, // J9BCfload6461, // J9BCdload6471, // J9BCaload6481, // J9BCiload06491, // J9BCiload16501, // J9BCiload26511, // J9BCiload36522, // J9BClload06532, // J9BClload16542, // J9BClload26552, // J9BClload36561, // J9BCfload06571, // J9BCfload16581, // J9BCfload26591, // J9BCfload36601, // J9BCdload06611, // J9BCdload16621, // J9BCdload26631, // J9BCdload36641, // J9BCaload06651, // J9BCaload16661, // J9BCaload26671, // J9BCaload36685, // J9BCiaload6696, // J9BClaload6705, // J9BCfaload6715, // J9BCdaload6725, // J9BCaaload6735, // J9BCbaload6745, // J9BCcaload6755, // J9BCsaload6761, // J9BCiloadw6772, // J9BClloadw6781, // J9BCfloadw6791, // J9BCdloadw6801, // J9BCaloadw6811, // J9BCistore6822, // J9BClstore6831, // J9BCfstore6841, // J9BCdstore6851, // J9BCastore6861, // J9BCistorew6872, // J9BClstorew6881, // J9BCfstorew6891, // J9BCdstorew6901, // J9BCastorew6911, // J9BCistore06921, // J9BCistore16931, // J9BCistore26941, // J9BCistore36952, // J9BClstore06962, // J9BClstore16972, // J9BClstore26982, // J9BClstore36991, // J9BCfstore07001, // J9BCfstore17011, // J9BCfstore27021, // J9BCfstore37031, // J9BCdstore07041, // J9BCdstore17051, // J9BCdstore27061, // J9BCdstore37071, // J9BCastore07081, // J9BCastore17091, // J9BCastore27101, // J9BCastore37115, // J9BCiastore7126, // J9BClastore7135, // J9BCfastore7145, // J9BCdastore7155, // J9BCaastore7165, // J9BCbastore7175, // J9BCcastore7185, // J9BCsastore7190, // J9BCpop7200, // J9BCpop27210, // J9BCdup7220, // J9BCdupx17230, // J9BCdupx27240, // J9BCdup27250, // J9BCdup2x17260, // J9BCdup2x27270, // J9BCswap7281, // J9BCiadd7292, // J9BCladd7301, // J9BCfadd7311, // J9BCdadd7321, // J9BCisub7332, // J9BClsub7341, // J9BCfsub7351, // J9BCdsub7361, // J9BCimul7372, // J9BClmul7381, // J9BCfmul7391, // J9BCdmul7401, // J9BCidiv7412, // J9BCldiv7423, // J9BCfdiv7433, // J9BCddiv7441, // J9BCirem7452, // J9BClrem7463, // J9BCfrem7473, // J9BCdrem7481, // J9BCineg7492, // J9BClneg7501, // J9BCfneg7511, // J9BCdneg7521, // J9BCishl7532, // J9BClshl7541, // J9BCishr7552, // J9BClshr7561, // J9BCiushr7572, // J9BClushr7581, // J9BCiand7592, // J9BCland7601, // J9BCior7612, // J9BClor7621, // J9BCixor7632, // J9BClxor7643, // J9BCiinc7653, // J9BCiincw7662, // J9BCi2l7672, // J9BCi2f7682, // J9BCi2d7691, // J9BCl2i7702, // J9BCl2f7712, // J9BCl2d7724, // J9BCf2i7734, // J9BCf2l7741, // J9BCf2d7754, // J9BCd2i7764, // J9BCd2l7772, // J9BCd2f7781, // J9BCi2b7791, // J9BCi2c7801, // J9BCi2s7818, // J9BClcmp7825, // J9BCfcmpl7835, // J9BCfcmpg7845, // J9BCdcmpl7855, // J9BCdcmpg7861, // J9BCifeq7871, // J9BCifne7881, // J9BCiflt7891, // J9BCifge7901, // J9BCifgt7911, // J9BCifle7922, // J9BCificmpeq7932, // J9BCificmpne7942, // J9BCificmplt7952, // J9BCificmpge7962, // J9BCificmpgt7972, // J9BCificmple7982, // J9BCifacmpeq7992, // J9BCifacmpne8002, // J9BCifnull8012, // J9BCifnonnull8021, // J9BCgoto8031, // J9BCgotow80410, // J9BCtableswitch80510, // J9BClookupswitch80625, // J9BCgenericReturn8071, // J9BCgetstatic8081, // J9BCputstatic8091, // J9BCgetfield8101, // J9BCputfield8116, // J9BCinvokevirtual8126, // J9BCinvokespecial8134, // J9BCinvokestatic81411, // J9BCinvokeinterface81520, // J9BCinvokedynamic81620, // J9BCinvokehandle81730, // J9BCinvokehandlegeneric8186, // J9BCinvokespecialsplit81925, // J9BCReturnC82025, // J9BCReturnS82125, // J9BCReturnB82225, // J9BCReturnZ8234, // J9BCinvokestaticsplit8240, // J9BCinvokeinterface28251, // J9BCnew8261, // J9BCnewarray8271, // J9BCanewarray8281, // J9BCmultianewarray8292, // J9BCarraylength8301, // J9BCathrow8315, // J9BCcheckcast8325, // J9BCinstanceof83325, // J9BCmonitorenter83425, // J9BCmonitorexit8350, // J9BCwide8360, // J9BCasyncCheck8371, // J9BCaconst_init8381, // J9BCwithfield8390, // J9BCunknown840};841842// == != < >= > <=843TR::ILOpCodes TR_J9ByteCodeIterator::_lcmpOps[] = { TR::iflcmpeq, TR::iflcmpne, TR::iflcmplt, TR::iflcmpge, TR::iflcmpgt, TR::iflcmple };844TR::ILOpCodes TR_J9ByteCodeIterator::_fcmplOps[] = { TR::iffcmpeq, TR::iffcmpneu, TR::iffcmpltu, TR::iffcmpge, TR::iffcmpgt, TR::iffcmpleu };845TR::ILOpCodes TR_J9ByteCodeIterator::_fcmpgOps[] = { TR::iffcmpeq, TR::iffcmpneu, TR::iffcmplt, TR::iffcmpgeu, TR::iffcmpgtu, TR::iffcmple };846TR::ILOpCodes TR_J9ByteCodeIterator::_dcmplOps[] = { TR::ifdcmpeq, TR::ifdcmpneu, TR::ifdcmpltu, TR::ifdcmpge, TR::ifdcmpgt, TR::ifdcmpleu };847TR::ILOpCodes TR_J9ByteCodeIterator::_dcmpgOps[] = { TR::ifdcmpeq, TR::ifdcmpneu, TR::ifdcmplt, TR::ifdcmpgeu, TR::ifdcmpgtu, TR::ifdcmple };848849850851