001/* 002 * This file is part of the Jikes RVM project (http://jikesrvm.org). 003 * 004 * This file is licensed to You under the Eclipse Public License (EPL); 005 * You may not use this file except in compliance with the License. You 006 * may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/eclipse-1.0.php 009 * 010 * See the COPYRIGHT.txt file distributed with this work for information 011 * regarding copyright ownership. 012 */ 013package org.jikesrvm.compilers.opt.lir2mir.ppc_32; 014 015import static org.jikesrvm.compilers.opt.ir.Operators.*; 016import static org.jikesrvm.compilers.opt.ir.ppc.ArchOperators.*; 017import static org.jikesrvm.compilers.opt.lir2mir.ppc_32.BURS_Definitions.*; 018import static org.jikesrvm.compilers.opt.ir.IRTools.*; 019 020import org.jikesrvm.*; 021import org.jikesrvm.classloader.*; 022import org.jikesrvm.compilers.opt.ir.*; 023import org.jikesrvm.compilers.opt.ir.ppc.*; 024import org.jikesrvm.compilers.opt.ir.operand.*; 025import org.jikesrvm.compilers.opt.ir.operand.ppc.*; 026import org.jikesrvm.compilers.opt.lir2mir.ppc.BURS_Helpers; 027import org.jikesrvm.compilers.opt.lir2mir.ppc_32.BURS_TreeNode; 028import org.jikesrvm.compilers.opt.lir2mir.AbstractBURS_TreeNode; 029import org.jikesrvm.compilers.opt.lir2mir.BURS; 030import org.jikesrvm.compilers.opt.lir2mir.BURS_StateCoder; 031import org.jikesrvm.compilers.opt.OptimizingCompilerException; 032import org.jikesrvm.runtime.ArchEntrypoints; 033import org.jikesrvm.util.Bits; //NOPMD 034 035import org.vmmagic.unboxed.*; 036import org.vmmagic.pragma.Inline; 037import org.vmmagic.pragma.Pure; 038 039/** 040 * Machine-specific instruction selection rules. Program generated. 041 * 042 * Note: some of the functions have been taken and modified 043 * from the file gen.c, from the LCC compiler. 044 * See $RVM_ROOT/rvm/src-generated/opt-burs/jburg/COPYRIGHT file for copyright restrictions. 045 * 046 * @see BURS 047 * 048 * NOTE: Program generated file, do not edit! 049 */ 050@SuppressWarnings("unused") // Machine generated code is hard to get perfect 051public class BURS_STATE extends BURS_Helpers implements BURS_StateCoder { 052 053 public BURS_STATE(BURS b) { 054 super(b); 055 } 056 057/*****************************************************************/ 058/* */ 059/* BURS TEMPLATE */ 060/* */ 061/*****************************************************************/ 062 063 /** 064 * Gets the state of a BURS node. This accessor is used by BURS. 065 * 066 * @param a the node 067 * 068 * @return the node's state 069 */ 070 private static AbstractBURS_TreeNode STATE(AbstractBURS_TreeNode a) { return a; } 071 072 /*********************************************************************** 073 * 074 * This file contains BURG utilities 075 * 076 * Note: some of the functions have been taken and modified 077 * from the file gen.c, from the LCC compiler. 078 * 079 ************************************************************************/ 080 081 /** 082 * Prints a debug message. No-op if debugging is disabled. 083 * 084 * @param p the BURS node 085 * @param rule the rule 086 * @param cost the rule's cost 087 * @param bestcost the best cost seen so far 088 */ 089 private static void trace(AbstractBURS_TreeNode p, int rule, int cost, int bestcost) { 090 if (BURS.DEBUG) { 091 VM.sysWriteln(p + " matched " + BURS_Debug.string[rule] + " with cost " + 092 cost + " vs. " + bestcost); 093 } 094 } 095 096 /** 097 * Dumps the whole tree starting at the given node. No-op if 098 * debugging is disabled. 099 * 100 * @param p the node to start at 101 */ 102 public static void dumpTree(AbstractBURS_TreeNode p) { 103 if (BURS.DEBUG) { 104 VM.sysWrite(dumpTree("\n",p,1)); 105 } 106 } 107 108 public static String dumpTree(String out, AbstractBURS_TreeNode p, int indent) { 109 if (p == null) return out; 110 StringBuilder result = new StringBuilder(out); 111 for (int i=0; i<indent; i++) 112 result.append(" "); 113 result.append(p); 114 result.append('\n'); 115 if (p.getChild1() != null) { 116 indent++; 117 result.append(dumpTree("",p.getChild1(),indent)); 118 if (p.getChild2() != null) { 119 result.append(dumpTree("",p.getChild2(),indent)); 120 } 121 } 122 return result.toString(); 123 } 124 125 /** 126 * Dumps the cover of a tree, i.e. the rules 127 * that cover the tree with a minimal cost. No-op if debugging is 128 * disabled. 129 * 130 * @param p the tree's root 131 * @param goalnt the non-terminal that is a goal. This is an external rule number 132 * @param indent number of spaces to use for indentation 133 */ 134 public static void dumpCover(AbstractBURS_TreeNode p, byte goalnt, int indent){ 135 if (BURS.DEBUG) { 136 if (p == null) return; 137 int rule = STATE(p).rule(goalnt); 138 VM.sysWrite(STATE(p).getCost(goalnt)+"\t"); 139 for (int i = 0; i < indent; i++) 140 VM.sysWrite(' '); 141 VM.sysWrite(BURS_Debug.string[rule]+"\n"); 142 for (int i = 0; i < nts[rule].length; i++) 143 dumpCover(kids(p,rule,i), nts[rule][i], indent + 1); 144 } 145 } 146 147 // caution: MARK should be used in single threaded mode, 148 @Inline 149 public static void mark(AbstractBURS_TreeNode p, byte goalnt) { 150 if (p == null) return; 151 int rule = STATE(p).rule(goalnt); 152 byte act = action(rule); 153 if ((act & EMIT_INSTRUCTION) != 0) { 154 p.setNonTerminal(goalnt); 155 } 156 if (rule == 0) { 157 if (BURS.DEBUG) { 158 VM.sysWrite("marking " + p + " with a goalnt of " + goalnt + " failed as the rule " + rule + " has no action"); 159 } 160 throw new OptimizingCompilerException("BURS", "rule missing in ", 161 p.getInstructionString(), dumpTree("", p, 1)); 162 } 163 mark_kids(p,rule); 164 } 165/* 166 * This file is part of the Jikes RVM project (http://jikesrvm.org). 167 * 168 * This file is licensed to You under the Eclipse Public License (EPL); 169 * You may not use this file except in compliance with the License. You 170 * may obtain a copy of the License at 171 * 172 * http://www.opensource.org/licenses/eclipse-1.0.php 173 * 174 * See the COPYRIGHT.txt file distributed with this work for information 175 * regarding copyright ownership. 176 */ 177//ir.brg 178 179 /** 180 * Generate from ir.template and assembled rules files. 181 */ 182 /** Sorted rule number to unsorted rule number map */ 183 private static int[] unsortedErnMap = { 184 0, /* 0 - no rule */ 185 1, /* 1 - stm: r */ 186 3, /* 2 - r: czr */ 187 4, /* 3 - r: rs */ 188 5, /* 4 - r: rz */ 189 6, /* 5 - rs: rp */ 190 7, /* 6 - rz: rp */ 191 9, /* 7 - any: r */ 192 2, /* 8 - r: REGISTER */ 193 8, /* 9 - any: NULL */ 194 10, /* 10 - any: ADDRESS_CONSTANT */ 195 11, /* 11 - any: INT_CONSTANT */ 196 12, /* 12 - any: LONG_CONSTANT */ 197 14, /* 13 - stm: RESOLVE */ 198 15, /* 14 - stm: IG_PATCH_POINT */ 199 16, /* 15 - stm: UNINT_BEGIN */ 200 17, /* 16 - stm: UNINT_END */ 201 18, /* 17 - stm: YIELDPOINT_PROLOGUE */ 202 19, /* 18 - stm: YIELDPOINT_EPILOGUE */ 203 20, /* 19 - stm: YIELDPOINT_BACKEDGE */ 204 22, /* 20 - stm: NOP */ 205 23, /* 21 - r: GUARD_MOVE */ 206 24, /* 22 - r: GUARD_COMBINE */ 207 26, /* 23 - r: GET_CAUGHT_EXCEPTION */ 208 28, /* 24 - stm: FENCE */ 209 29, /* 25 - stm: WRITE_FLOOR */ 210 30, /* 26 - stm: READ_CEILING */ 211 38, /* 27 - stm: TRAP */ 212 136, /* 28 - rs: REF_MOVE(INT_CONSTANT) */ 213 137, /* 29 - rs: REF_MOVE(INT_CONSTANT) */ 214 138, /* 30 - rs: REF_MOVE(INT_CONSTANT) */ 215 205, /* 31 - stm: GOTO */ 216 206, /* 32 - stm: RETURN(NULL) */ 217 211, /* 33 - r: GET_TIME_BASE */ 218 218, /* 34 - stm: IR_PROLOGUE */ 219 237, /* 35 - r: LONG_MOVE(LONG_CONSTANT) */ 220 259, /* 36 - r: REF_MOVE(ADDRESS_CONSTANT) */ 221 260, /* 37 - r: REF_MOVE(ADDRESS_CONSTANT) */ 222 261, /* 38 - r: REF_MOVE(ADDRESS_CONSTANT) */ 223 13, /* 39 - any: OTHER_OPERAND(any,any) */ 224 39, /* 40 - stm: TRAP_IF(r,r) */ 225 44, /* 41 - r: BOOLEAN_CMP_INT(r,r) */ 226 46, /* 42 - boolcmp: BOOLEAN_CMP_INT(r,r) */ 227 48, /* 43 - r: BOOLEAN_CMP_ADDR(r,r) */ 228 50, /* 44 - boolcmp: BOOLEAN_CMP_ADDR(r,r) */ 229 60, /* 45 - r: REF_ADD(r,r) */ 230 63, /* 46 - r: REF_SUB(r,r) */ 231 66, /* 47 - r: INT_MUL(r,r) */ 232 67, /* 48 - r: INT_DIV(r,r) */ 233 69, /* 49 - r: INT_REM(r,r) */ 234 73, /* 50 - rz: INT_SHL(r,r) */ 235 76, /* 51 - rs: INT_SHR(r,r) */ 236 79, /* 52 - rz: INT_USHR(r,r) */ 237 83, /* 53 - r: REF_AND(r,r) */ 238 90, /* 54 - r: REF_OR(r,r) */ 239 94, /* 55 - r: REF_XOR(r,r) */ 240 100, /* 56 - r: FLOAT_ADD(r,r) */ 241 101, /* 57 - r: DOUBLE_ADD(r,r) */ 242 102, /* 58 - r: FLOAT_MUL(r,r) */ 243 103, /* 59 - r: DOUBLE_MUL(r,r) */ 244 104, /* 60 - r: FLOAT_SUB(r,r) */ 245 105, /* 61 - r: DOUBLE_SUB(r,r) */ 246 106, /* 62 - r: FLOAT_DIV(r,r) */ 247 107, /* 63 - r: DOUBLE_DIV(r,r) */ 248 142, /* 64 - rs: BYTE_LOAD(r,r) */ 249 146, /* 65 - rp: UBYTE_LOAD(r,r) */ 250 148, /* 66 - rs: SHORT_LOAD(r,r) */ 251 150, /* 67 - rp: USHORT_LOAD(r,r) */ 252 153, /* 68 - r: FLOAT_LOAD(r,r) */ 253 156, /* 69 - r: DOUBLE_LOAD(r,r) */ 254 159, /* 70 - rs: INT_LOAD(r,r) */ 255 182, /* 71 - stm: INT_IFCMP(r,r) */ 256 197, /* 72 - stm: INT_IFCMP2(r,r) */ 257 199, /* 73 - stm: FLOAT_IFCMP(r,r) */ 258 200, /* 74 - stm: DOUBLE_IFCMP(r,r) */ 259 201, /* 75 - stm: FLOAT_CMPL(r,r) */ 260 202, /* 76 - stm: FLOAT_CMPG(r,r) */ 261 203, /* 77 - stm: DOUBLE_CMPL(r,r) */ 262 204, /* 78 - stm: DOUBLE_CMPG(r,r) */ 263 208, /* 79 - r: CALL(r,any) */ 264 210, /* 80 - r: SYSCALL(r,any) */ 265 212, /* 81 - r: OTHER_OPERAND(r,r) */ 266 213, /* 82 - r: YIELDPOINT_OSR(any,any) */ 267 214, /* 83 - r: PREPARE_INT(r,r) */ 268 215, /* 84 - r: PREPARE_LONG(r,r) */ 269 216, /* 85 - r: ATTEMPT_INT(r,r) */ 270 217, /* 86 - r: ATTEMPT_LONG(r,r) */ 271 219, /* 87 - r: LONG_ADD(r,r) */ 272 220, /* 88 - r: LONG_SUB(r,r) */ 273 221, /* 89 - r: LONG_MUL(r,r) */ 274 223, /* 90 - r: LONG_SHL(r,r) */ 275 225, /* 91 - r: LONG_SHR(r,r) */ 276 227, /* 92 - r: LONG_USHR(r,r) */ 277 229, /* 93 - r: LONG_AND(r,r) */ 278 230, /* 94 - r: LONG_OR(r,r) */ 279 231, /* 95 - r: LONG_XOR(r,r) */ 280 239, /* 96 - stm: LONG_CMP(r,r) */ 281 240, /* 97 - stm: LONG_IFCMP(r,r) */ 282 264, /* 98 - r: LONG_LOAD(r,r) */ 283 268, /* 99 - r: PREPARE_ADDR(r,r) */ 284 269, /* 100 - r: ATTEMPT_ADDR(r,r) */ 285 21, /* 101 - stm: LOWTABLESWITCH(r) */ 286 25, /* 102 - stm: NULL_CHECK(r) */ 287 27, /* 103 - stm: SET_CAUGHT_EXCEPTION(r) */ 288 31, /* 104 - stm: DCBF(r) */ 289 32, /* 105 - stm: DCBST(r) */ 290 33, /* 106 - stm: DCBT(r) */ 291 34, /* 107 - stm: DCBTST(r) */ 292 35, /* 108 - stm: DCBZ(r) */ 293 36, /* 109 - stm: DCBZL(r) */ 294 37, /* 110 - stm: ICBI(r) */ 295 40, /* 111 - stm: TRAP_IF(r,INT_CONSTANT) */ 296 41, /* 112 - stm: TRAP_IF(r,LONG_CONSTANT) */ 297 42, /* 113 - r: BOOLEAN_NOT(r) */ 298 43, /* 114 - r: BOOLEAN_CMP_INT(r,INT_CONSTANT) */ 299 45, /* 115 - boolcmp: BOOLEAN_CMP_INT(r,INT_CONSTANT) */ 300 47, /* 116 - r: BOOLEAN_CMP_ADDR(r,INT_CONSTANT) */ 301 49, /* 117 - boolcmp: BOOLEAN_CMP_ADDR(r,INT_CONSTANT) */ 302 51, /* 118 - boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) */ 303 52, /* 119 - boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) */ 304 53, /* 120 - boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) */ 305 54, /* 121 - boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) */ 306 55, /* 122 - r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) */ 307 56, /* 123 - r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) */ 308 57, /* 124 - r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) */ 309 58, /* 125 - r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) */ 310 59, /* 126 - r: REF_ADD(r,INT_CONSTANT) */ 311 61, /* 127 - r: REF_ADD(r,REF_MOVE(INT_CONSTANT)) */ 312 62, /* 128 - r: REF_ADD(r,REF_MOVE(INT_CONSTANT)) */ 313 65, /* 129 - r: INT_MUL(r,INT_CONSTANT) */ 314 68, /* 130 - r: INT_DIV(r,REF_MOVE(INT_CONSTANT)) */ 315 70, /* 131 - r: INT_REM(r,REF_MOVE(INT_CONSTANT)) */ 316 71, /* 132 - r: REF_NEG(r) */ 317 72, /* 133 - rz: INT_SHL(r,INT_CONSTANT) */ 318 75, /* 134 - rs: INT_SHR(r,INT_CONSTANT) */ 319 78, /* 135 - rp: INT_USHR(r,INT_CONSTANT) */ 320 84, /* 136 - czr: REF_AND(r,INT_CONSTANT) */ 321 85, /* 137 - rp: REF_AND(r,INT_CONSTANT) */ 322 91, /* 138 - r: REF_OR(r,INT_CONSTANT) */ 323 95, /* 139 - r: REF_XOR(r,INT_CONSTANT) */ 324 96, /* 140 - r: REF_NOT(r) */ 325 108, /* 141 - r: FLOAT_NEG(r) */ 326 109, /* 142 - r: DOUBLE_NEG(r) */ 327 110, /* 143 - r: FLOAT_SQRT(r) */ 328 111, /* 144 - r: DOUBLE_SQRT(r) */ 329 124, /* 145 - rs: INT_2BYTE(r) */ 330 125, /* 146 - rp: INT_2USHORT(r) */ 331 126, /* 147 - rs: INT_2SHORT(r) */ 332 127, /* 148 - r: INT_2FLOAT(r) */ 333 128, /* 149 - r: INT_2DOUBLE(r) */ 334 129, /* 150 - r: FLOAT_2INT(r) */ 335 130, /* 151 - r: FLOAT_2DOUBLE(r) */ 336 131, /* 152 - r: DOUBLE_2INT(r) */ 337 132, /* 153 - r: DOUBLE_2FLOAT(r) */ 338 133, /* 154 - r: FLOAT_AS_INT_BITS(r) */ 339 134, /* 155 - r: INT_BITS_AS_FLOAT(r) */ 340 135, /* 156 - r: REF_MOVE(r) */ 341 139, /* 157 - r: FLOAT_MOVE(r) */ 342 140, /* 158 - r: DOUBLE_MOVE(r) */ 343 141, /* 159 - rs: BYTE_LOAD(r,INT_CONSTANT) */ 344 145, /* 160 - rp: UBYTE_LOAD(r,INT_CONSTANT) */ 345 147, /* 161 - rs: SHORT_LOAD(r,INT_CONSTANT) */ 346 149, /* 162 - rp: USHORT_LOAD(r,INT_CONSTANT) */ 347 151, /* 163 - r: FLOAT_LOAD(r,INT_CONSTANT) */ 348 152, /* 164 - r: FLOAT_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) */ 349 154, /* 165 - r: DOUBLE_LOAD(r,INT_CONSTANT) */ 350 155, /* 166 - r: DOUBLE_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) */ 351 157, /* 167 - rs: INT_LOAD(r,INT_CONSTANT) */ 352 158, /* 168 - rs: INT_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) */ 353 183, /* 169 - stm: INT_IFCMP(r,INT_CONSTANT) */ 354 193, /* 170 - stm: INT_IFCMP(boolcmp,INT_CONSTANT) */ 355 194, /* 171 - stm: INT_IFCMP(boolcmp,INT_CONSTANT) */ 356 195, /* 172 - stm: INT_IFCMP(boolcmp,INT_CONSTANT) */ 357 196, /* 173 - stm: INT_IFCMP(boolcmp,INT_CONSTANT) */ 358 198, /* 174 - stm: INT_IFCMP2(r,INT_CONSTANT) */ 359 207, /* 175 - stm: RETURN(r) */ 360 222, /* 176 - r: LONG_NEG(r) */ 361 224, /* 177 - r: LONG_SHL(r,INT_CONSTANT) */ 362 226, /* 178 - r: LONG_SHR(r,INT_CONSTANT) */ 363 228, /* 179 - r: LONG_USHR(r,INT_CONSTANT) */ 364 232, /* 180 - r: LONG_NOT(r) */ 365 233, /* 181 - r: INT_2LONG(r) */ 366 234, /* 182 - r: LONG_2INT(r) */ 367 235, /* 183 - r: DOUBLE_AS_LONG_BITS(r) */ 368 236, /* 184 - r: LONG_BITS_AS_DOUBLE(r) */ 369 238, /* 185 - r: LONG_MOVE(r) */ 370 254, /* 186 - czr: REF_AND(r,REF_MOVE(INT_CONSTANT)) */ 371 255, /* 187 - r: REF_AND(r,REF_MOVE(INT_CONSTANT)) */ 372 256, /* 188 - r: REF_OR(r,REF_MOVE(INT_CONSTANT)) */ 373 257, /* 189 - r: REF_OR(r,REF_MOVE(INT_CONSTANT)) */ 374 258, /* 190 - r: REF_XOR(r,REF_MOVE(INT_CONSTANT)) */ 375 262, /* 191 - r: LONG_LOAD(r,INT_CONSTANT) */ 376 263, /* 192 - r: LONG_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) */ 377 64, /* 193 - r: REF_SUB(INT_CONSTANT,r) */ 378 209, /* 194 - r: CALL(BRANCH_TARGET,any) */ 379 74, /* 195 - rz: INT_SHL(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) */ 380 77, /* 196 - rp: INT_SHR(REF_AND(r,INT_CONSTANT),INT_CONSTANT) */ 381 80, /* 197 - rp: INT_USHR(REF_AND(r,INT_CONSTANT),INT_CONSTANT) */ 382 81, /* 198 - rp: INT_USHR(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) */ 383 82, /* 199 - rp: INT_USHR(INT_SHL(r,INT_CONSTANT),INT_CONSTANT) */ 384 88, /* 200 - rp: REF_AND(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) */ 385 89, /* 201 - rp: REF_AND(INT_USHR(r,INT_CONSTANT),REF_MOVE(INT_CONSTANT)) */ 386 144, /* 202 - rp: REF_AND(BYTE_LOAD(r,INT_CONSTANT),INT_CONSTANT) */ 387 161, /* 203 - rs: INT_LOAD(REF_ADD(r,INT_CONSTANT),INT_CONSTANT) */ 388 184, /* 204 - stm: INT_IFCMP(INT_2BYTE(r),INT_CONSTANT) */ 389 185, /* 205 - stm: INT_IFCMP(INT_2SHORT(r),INT_CONSTANT) */ 390 189, /* 206 - stm: INT_IFCMP(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) */ 391 190, /* 207 - stm: INT_IFCMP(INT_SHL(r,INT_CONSTANT),INT_CONSTANT) */ 392 191, /* 208 - stm: INT_IFCMP(INT_SHR(r,INT_CONSTANT),INT_CONSTANT) */ 393 192, /* 209 - stm: INT_IFCMP(REF_AND(r,INT_CONSTANT),INT_CONSTANT) */ 394 243, /* 210 - stm: INT_IFCMP(REF_NEG(r),INT_CONSTANT) */ 395 244, /* 211 - stm: INT_IFCMP(REF_NOT(r),INT_CONSTANT) */ 396 249, /* 212 - stm: INT_IFCMP(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) */ 397 250, /* 213 - stm: INT_IFCMP(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) */ 398 251, /* 214 - stm: INT_IFCMP(REF_ADD(r,INT_CONSTANT),INT_CONSTANT) */ 399 86, /* 215 - r: REF_AND(REF_NOT(r),REF_NOT(r)) */ 400 92, /* 216 - r: REF_OR(REF_NOT(r),REF_NOT(r)) */ 401 164, /* 217 - stm: BYTE_STORE(INT_2BYTE(r),OTHER_OPERAND(r,INT_CONSTANT)) */ 402 168, /* 218 - stm: SHORT_STORE(INT_2SHORT(r),OTHER_OPERAND(r,INT_CONSTANT)) */ 403 170, /* 219 - stm: SHORT_STORE(INT_2USHORT(r),OTHER_OPERAND(r,INT_CONSTANT)) */ 404 87, /* 220 - r: REF_AND(r,REF_NOT(r)) */ 405 93, /* 221 - r: REF_OR(r,REF_NOT(r)) */ 406 162, /* 222 - stm: BYTE_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) */ 407 166, /* 223 - stm: SHORT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) */ 408 172, /* 224 - stm: INT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) */ 409 173, /* 225 - stm: INT_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) */ 410 176, /* 226 - stm: FLOAT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) */ 411 177, /* 227 - stm: FLOAT_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) */ 412 179, /* 228 - stm: DOUBLE_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) */ 413 180, /* 229 - stm: DOUBLE_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) */ 414 265, /* 230 - stm: LONG_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) */ 415 266, /* 231 - stm: LONG_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) */ 416 97, /* 232 - r: REF_NOT(REF_OR(r,r)) */ 417 98, /* 233 - r: REF_NOT(REF_AND(r,r)) */ 418 99, /* 234 - r: REF_NOT(REF_XOR(r,r)) */ 419 143, /* 235 - rp: REF_AND(BYTE_LOAD(r,r),INT_CONSTANT) */ 420 160, /* 236 - rs: INT_LOAD(REF_ADD(r,r),INT_CONSTANT) */ 421 186, /* 237 - stm: INT_IFCMP(INT_USHR(r,r),INT_CONSTANT) */ 422 187, /* 238 - stm: INT_IFCMP(INT_SHL(r,r),INT_CONSTANT) */ 423 188, /* 239 - stm: INT_IFCMP(INT_SHR(r,r),INT_CONSTANT) */ 424 241, /* 240 - stm: INT_IFCMP(ATTEMPT_INT(r,r),INT_CONSTANT) */ 425 242, /* 241 - stm: INT_IFCMP(ATTEMPT_ADDR(r,r),INT_CONSTANT) */ 426 245, /* 242 - stm: INT_IFCMP(REF_ADD(r,r),INT_CONSTANT) */ 427 246, /* 243 - stm: INT_IFCMP(REF_AND(r,r),INT_CONSTANT) */ 428 247, /* 244 - stm: INT_IFCMP(REF_OR(r,r),INT_CONSTANT) */ 429 248, /* 245 - stm: INT_IFCMP(REF_XOR(r,r),INT_CONSTANT) */ 430 112, /* 246 - r: FLOAT_ADD(FLOAT_MUL(r,r),r) */ 431 113, /* 247 - r: DOUBLE_ADD(DOUBLE_MUL(r,r),r) */ 432 116, /* 248 - r: FLOAT_SUB(FLOAT_MUL(r,r),r) */ 433 117, /* 249 - r: DOUBLE_SUB(DOUBLE_MUL(r,r),r) */ 434 114, /* 250 - r: FLOAT_ADD(r,FLOAT_MUL(r,r)) */ 435 115, /* 251 - r: DOUBLE_ADD(r,DOUBLE_MUL(r,r)) */ 436 163, /* 252 - stm: BYTE_STORE(r,OTHER_OPERAND(r,r)) */ 437 167, /* 253 - stm: SHORT_STORE(r,OTHER_OPERAND(r,r)) */ 438 174, /* 254 - stm: INT_STORE(r,OTHER_OPERAND(r,r)) */ 439 178, /* 255 - stm: FLOAT_STORE(r,OTHER_OPERAND(r,r)) */ 440 181, /* 256 - stm: DOUBLE_STORE(r,OTHER_OPERAND(r,r)) */ 441 267, /* 257 - stm: LONG_STORE(r,OTHER_OPERAND(r,r)) */ 442 118, /* 258 - r: FLOAT_NEG(FLOAT_ADD(FLOAT_MUL(r,r),r)) */ 443 119, /* 259 - r: DOUBLE_NEG(DOUBLE_ADD(DOUBLE_MUL(r,r),r)) */ 444 122, /* 260 - r: FLOAT_NEG(FLOAT_SUB(FLOAT_MUL(r,r),r)) */ 445 123, /* 261 - r: DOUBLE_NEG(DOUBLE_SUB(DOUBLE_MUL(r,r),r)) */ 446 120, /* 262 - r: FLOAT_NEG(FLOAT_ADD(r,FLOAT_MUL(r,r))) */ 447 121, /* 263 - r: DOUBLE_NEG(DOUBLE_ADD(r,DOUBLE_MUL(r,r))) */ 448 165, /* 264 - stm: BYTE_STORE(INT_2BYTE(r),OTHER_OPERAND(r,r)) */ 449 169, /* 265 - stm: SHORT_STORE(INT_2SHORT(r),OTHER_OPERAND(r,r)) */ 450 171, /* 266 - stm: SHORT_STORE(INT_2USHORT(r),OTHER_OPERAND(r,r)) */ 451 175, /* 267 - stm: INT_STORE(r,OTHER_OPERAND(REF_ADD(r,INT_CONSTANT),INT_CONSTANT)) */ 452 252, /* 268 - stm: INT_IFCMP(REF_AND(r,REF_NOT(r)),INT_CONSTANT) */ 453 }; 454 455 /** Ragged array for non-terminal leaves of r_NT, */ 456 private static final byte[] nts_0 = { r_NT, }; 457 /** Ragged array for non-terminal leaves of czr_NT, */ 458 private static final byte[] nts_1 = { czr_NT, }; 459 /** Ragged array for non-terminal leaves of rs_NT, */ 460 private static final byte[] nts_2 = { rs_NT, }; 461 /** Ragged array for non-terminal leaves of rz_NT, */ 462 private static final byte[] nts_3 = { rz_NT, }; 463 /** Ragged array for non-terminal leaves of rp_NT, */ 464 private static final byte[] nts_4 = { rp_NT, }; 465 /** Ragged array for non-terminal leaves of */ 466 private static final byte[] nts_5 = { }; 467 /** Ragged array for non-terminal leaves of any_NT, any_NT, */ 468 private static final byte[] nts_6 = { any_NT, any_NT, }; 469 /** Ragged array for non-terminal leaves of r_NT, r_NT, */ 470 private static final byte[] nts_7 = { r_NT, r_NT, }; 471 /** Ragged array for non-terminal leaves of r_NT, any_NT, */ 472 private static final byte[] nts_8 = { r_NT, any_NT, }; 473 /** Ragged array for non-terminal leaves of boolcmp_NT, */ 474 private static final byte[] nts_9 = { boolcmp_NT, }; 475 /** Ragged array for non-terminal leaves of any_NT, */ 476 private static final byte[] nts_10 = { any_NT, }; 477 /** Ragged array for non-terminal leaves of r_NT, r_NT, r_NT, */ 478 private static final byte[] nts_11 = { r_NT, r_NT, r_NT, }; 479 480 /** Map non-terminal to non-terminal leaves */ 481 private static final byte[][] nts = { 482 null, /* 0 */ 483 nts_0, // 1 - stm: r 484 nts_1, // 2 - r: czr 485 nts_2, // 3 - r: rs 486 nts_3, // 4 - r: rz 487 nts_4, // 5 - rs: rp 488 nts_4, // 6 - rz: rp 489 nts_0, // 7 - any: r 490 nts_5, // 8 - r: REGISTER 491 nts_5, // 9 - any: NULL 492 nts_5, // 10 - any: ADDRESS_CONSTANT 493 nts_5, // 11 - any: INT_CONSTANT 494 nts_5, // 12 - any: LONG_CONSTANT 495 nts_5, // 13 - stm: RESOLVE 496 nts_5, // 14 - stm: IG_PATCH_POINT 497 nts_5, // 15 - stm: UNINT_BEGIN 498 nts_5, // 16 - stm: UNINT_END 499 nts_5, // 17 - stm: YIELDPOINT_PROLOGUE 500 nts_5, // 18 - stm: YIELDPOINT_EPILOGUE 501 nts_5, // 19 - stm: YIELDPOINT_BACKEDGE 502 nts_5, // 20 - stm: NOP 503 nts_5, // 21 - r: GUARD_MOVE 504 nts_5, // 22 - r: GUARD_COMBINE 505 nts_5, // 23 - r: GET_CAUGHT_EXCEPTION 506 nts_5, // 24 - stm: FENCE 507 nts_5, // 25 - stm: WRITE_FLOOR 508 nts_5, // 26 - stm: READ_CEILING 509 nts_5, // 27 - stm: TRAP 510 nts_5, // 28 - rs: REF_MOVE(INT_CONSTANT) 511 nts_5, // 29 - rs: REF_MOVE(INT_CONSTANT) 512 nts_5, // 30 - rs: REF_MOVE(INT_CONSTANT) 513 nts_5, // 31 - stm: GOTO 514 nts_5, // 32 - stm: RETURN(NULL) 515 nts_5, // 33 - r: GET_TIME_BASE 516 nts_5, // 34 - stm: IR_PROLOGUE 517 nts_5, // 35 - r: LONG_MOVE(LONG_CONSTANT) 518 nts_5, // 36 - r: REF_MOVE(ADDRESS_CONSTANT) 519 nts_5, // 37 - r: REF_MOVE(ADDRESS_CONSTANT) 520 nts_5, // 38 - r: REF_MOVE(ADDRESS_CONSTANT) 521 nts_6, // 39 - any: OTHER_OPERAND(any,any) 522 nts_7, // 40 - stm: TRAP_IF(r,r) 523 nts_7, // 41 - r: BOOLEAN_CMP_INT(r,r) 524 nts_7, // 42 - boolcmp: BOOLEAN_CMP_INT(r,r) 525 nts_7, // 43 - r: BOOLEAN_CMP_ADDR(r,r) 526 nts_7, // 44 - boolcmp: BOOLEAN_CMP_ADDR(r,r) 527 nts_7, // 45 - r: REF_ADD(r,r) 528 nts_7, // 46 - r: REF_SUB(r,r) 529 nts_7, // 47 - r: INT_MUL(r,r) 530 nts_7, // 48 - r: INT_DIV(r,r) 531 nts_7, // 49 - r: INT_REM(r,r) 532 nts_7, // 50 - rz: INT_SHL(r,r) 533 nts_7, // 51 - rs: INT_SHR(r,r) 534 nts_7, // 52 - rz: INT_USHR(r,r) 535 nts_7, // 53 - r: REF_AND(r,r) 536 nts_7, // 54 - r: REF_OR(r,r) 537 nts_7, // 55 - r: REF_XOR(r,r) 538 nts_7, // 56 - r: FLOAT_ADD(r,r) 539 nts_7, // 57 - r: DOUBLE_ADD(r,r) 540 nts_7, // 58 - r: FLOAT_MUL(r,r) 541 nts_7, // 59 - r: DOUBLE_MUL(r,r) 542 nts_7, // 60 - r: FLOAT_SUB(r,r) 543 nts_7, // 61 - r: DOUBLE_SUB(r,r) 544 nts_7, // 62 - r: FLOAT_DIV(r,r) 545 nts_7, // 63 - r: DOUBLE_DIV(r,r) 546 nts_7, // 64 - rs: BYTE_LOAD(r,r) 547 nts_7, // 65 - rp: UBYTE_LOAD(r,r) 548 nts_7, // 66 - rs: SHORT_LOAD(r,r) 549 nts_7, // 67 - rp: USHORT_LOAD(r,r) 550 nts_7, // 68 - r: FLOAT_LOAD(r,r) 551 nts_7, // 69 - r: DOUBLE_LOAD(r,r) 552 nts_7, // 70 - rs: INT_LOAD(r,r) 553 nts_7, // 71 - stm: INT_IFCMP(r,r) 554 nts_7, // 72 - stm: INT_IFCMP2(r,r) 555 nts_7, // 73 - stm: FLOAT_IFCMP(r,r) 556 nts_7, // 74 - stm: DOUBLE_IFCMP(r,r) 557 nts_7, // 75 - stm: FLOAT_CMPL(r,r) 558 nts_7, // 76 - stm: FLOAT_CMPG(r,r) 559 nts_7, // 77 - stm: DOUBLE_CMPL(r,r) 560 nts_7, // 78 - stm: DOUBLE_CMPG(r,r) 561 nts_8, // 79 - r: CALL(r,any) 562 nts_8, // 80 - r: SYSCALL(r,any) 563 nts_7, // 81 - r: OTHER_OPERAND(r,r) 564 nts_6, // 82 - r: YIELDPOINT_OSR(any,any) 565 nts_7, // 83 - r: PREPARE_INT(r,r) 566 nts_7, // 84 - r: PREPARE_LONG(r,r) 567 nts_7, // 85 - r: ATTEMPT_INT(r,r) 568 nts_7, // 86 - r: ATTEMPT_LONG(r,r) 569 nts_7, // 87 - r: LONG_ADD(r,r) 570 nts_7, // 88 - r: LONG_SUB(r,r) 571 nts_7, // 89 - r: LONG_MUL(r,r) 572 nts_7, // 90 - r: LONG_SHL(r,r) 573 nts_7, // 91 - r: LONG_SHR(r,r) 574 nts_7, // 92 - r: LONG_USHR(r,r) 575 nts_7, // 93 - r: LONG_AND(r,r) 576 nts_7, // 94 - r: LONG_OR(r,r) 577 nts_7, // 95 - r: LONG_XOR(r,r) 578 nts_7, // 96 - stm: LONG_CMP(r,r) 579 nts_7, // 97 - stm: LONG_IFCMP(r,r) 580 nts_7, // 98 - r: LONG_LOAD(r,r) 581 nts_7, // 99 - r: PREPARE_ADDR(r,r) 582 nts_7, // 100 - r: ATTEMPT_ADDR(r,r) 583 nts_0, // 101 - stm: LOWTABLESWITCH(r) 584 nts_0, // 102 - stm: NULL_CHECK(r) 585 nts_0, // 103 - stm: SET_CAUGHT_EXCEPTION(r) 586 nts_0, // 104 - stm: DCBF(r) 587 nts_0, // 105 - stm: DCBST(r) 588 nts_0, // 106 - stm: DCBT(r) 589 nts_0, // 107 - stm: DCBTST(r) 590 nts_0, // 108 - stm: DCBZ(r) 591 nts_0, // 109 - stm: DCBZL(r) 592 nts_0, // 110 - stm: ICBI(r) 593 nts_0, // 111 - stm: TRAP_IF(r,INT_CONSTANT) 594 nts_0, // 112 - stm: TRAP_IF(r,LONG_CONSTANT) 595 nts_0, // 113 - r: BOOLEAN_NOT(r) 596 nts_0, // 114 - r: BOOLEAN_CMP_INT(r,INT_CONSTANT) 597 nts_0, // 115 - boolcmp: BOOLEAN_CMP_INT(r,INT_CONSTANT) 598 nts_0, // 116 - r: BOOLEAN_CMP_ADDR(r,INT_CONSTANT) 599 nts_0, // 117 - boolcmp: BOOLEAN_CMP_ADDR(r,INT_CONSTANT) 600 nts_9, // 118 - boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 601 nts_9, // 119 - boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 602 nts_9, // 120 - boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 603 nts_9, // 121 - boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 604 nts_9, // 122 - r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 605 nts_9, // 123 - r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 606 nts_9, // 124 - r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 607 nts_9, // 125 - r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 608 nts_0, // 126 - r: REF_ADD(r,INT_CONSTANT) 609 nts_0, // 127 - r: REF_ADD(r,REF_MOVE(INT_CONSTANT)) 610 nts_0, // 128 - r: REF_ADD(r,REF_MOVE(INT_CONSTANT)) 611 nts_0, // 129 - r: INT_MUL(r,INT_CONSTANT) 612 nts_0, // 130 - r: INT_DIV(r,REF_MOVE(INT_CONSTANT)) 613 nts_0, // 131 - r: INT_REM(r,REF_MOVE(INT_CONSTANT)) 614 nts_0, // 132 - r: REF_NEG(r) 615 nts_0, // 133 - rz: INT_SHL(r,INT_CONSTANT) 616 nts_0, // 134 - rs: INT_SHR(r,INT_CONSTANT) 617 nts_0, // 135 - rp: INT_USHR(r,INT_CONSTANT) 618 nts_0, // 136 - czr: REF_AND(r,INT_CONSTANT) 619 nts_0, // 137 - rp: REF_AND(r,INT_CONSTANT) 620 nts_0, // 138 - r: REF_OR(r,INT_CONSTANT) 621 nts_0, // 139 - r: REF_XOR(r,INT_CONSTANT) 622 nts_0, // 140 - r: REF_NOT(r) 623 nts_0, // 141 - r: FLOAT_NEG(r) 624 nts_0, // 142 - r: DOUBLE_NEG(r) 625 nts_0, // 143 - r: FLOAT_SQRT(r) 626 nts_0, // 144 - r: DOUBLE_SQRT(r) 627 nts_0, // 145 - rs: INT_2BYTE(r) 628 nts_0, // 146 - rp: INT_2USHORT(r) 629 nts_0, // 147 - rs: INT_2SHORT(r) 630 nts_0, // 148 - r: INT_2FLOAT(r) 631 nts_0, // 149 - r: INT_2DOUBLE(r) 632 nts_0, // 150 - r: FLOAT_2INT(r) 633 nts_0, // 151 - r: FLOAT_2DOUBLE(r) 634 nts_0, // 152 - r: DOUBLE_2INT(r) 635 nts_0, // 153 - r: DOUBLE_2FLOAT(r) 636 nts_0, // 154 - r: FLOAT_AS_INT_BITS(r) 637 nts_0, // 155 - r: INT_BITS_AS_FLOAT(r) 638 nts_0, // 156 - r: REF_MOVE(r) 639 nts_0, // 157 - r: FLOAT_MOVE(r) 640 nts_0, // 158 - r: DOUBLE_MOVE(r) 641 nts_0, // 159 - rs: BYTE_LOAD(r,INT_CONSTANT) 642 nts_0, // 160 - rp: UBYTE_LOAD(r,INT_CONSTANT) 643 nts_0, // 161 - rs: SHORT_LOAD(r,INT_CONSTANT) 644 nts_0, // 162 - rp: USHORT_LOAD(r,INT_CONSTANT) 645 nts_0, // 163 - r: FLOAT_LOAD(r,INT_CONSTANT) 646 nts_0, // 164 - r: FLOAT_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 647 nts_0, // 165 - r: DOUBLE_LOAD(r,INT_CONSTANT) 648 nts_0, // 166 - r: DOUBLE_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 649 nts_0, // 167 - rs: INT_LOAD(r,INT_CONSTANT) 650 nts_0, // 168 - rs: INT_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 651 nts_0, // 169 - stm: INT_IFCMP(r,INT_CONSTANT) 652 nts_9, // 170 - stm: INT_IFCMP(boolcmp,INT_CONSTANT) 653 nts_9, // 171 - stm: INT_IFCMP(boolcmp,INT_CONSTANT) 654 nts_9, // 172 - stm: INT_IFCMP(boolcmp,INT_CONSTANT) 655 nts_9, // 173 - stm: INT_IFCMP(boolcmp,INT_CONSTANT) 656 nts_0, // 174 - stm: INT_IFCMP2(r,INT_CONSTANT) 657 nts_0, // 175 - stm: RETURN(r) 658 nts_0, // 176 - r: LONG_NEG(r) 659 nts_0, // 177 - r: LONG_SHL(r,INT_CONSTANT) 660 nts_0, // 178 - r: LONG_SHR(r,INT_CONSTANT) 661 nts_0, // 179 - r: LONG_USHR(r,INT_CONSTANT) 662 nts_0, // 180 - r: LONG_NOT(r) 663 nts_0, // 181 - r: INT_2LONG(r) 664 nts_0, // 182 - r: LONG_2INT(r) 665 nts_0, // 183 - r: DOUBLE_AS_LONG_BITS(r) 666 nts_0, // 184 - r: LONG_BITS_AS_DOUBLE(r) 667 nts_0, // 185 - r: LONG_MOVE(r) 668 nts_0, // 186 - czr: REF_AND(r,REF_MOVE(INT_CONSTANT)) 669 nts_0, // 187 - r: REF_AND(r,REF_MOVE(INT_CONSTANT)) 670 nts_0, // 188 - r: REF_OR(r,REF_MOVE(INT_CONSTANT)) 671 nts_0, // 189 - r: REF_OR(r,REF_MOVE(INT_CONSTANT)) 672 nts_0, // 190 - r: REF_XOR(r,REF_MOVE(INT_CONSTANT)) 673 nts_0, // 191 - r: LONG_LOAD(r,INT_CONSTANT) 674 nts_0, // 192 - r: LONG_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 675 nts_0, // 193 - r: REF_SUB(INT_CONSTANT,r) 676 nts_10, // 194 - r: CALL(BRANCH_TARGET,any) 677 nts_0, // 195 - rz: INT_SHL(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 678 nts_0, // 196 - rp: INT_SHR(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 679 nts_0, // 197 - rp: INT_USHR(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 680 nts_0, // 198 - rp: INT_USHR(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 681 nts_0, // 199 - rp: INT_USHR(INT_SHL(r,INT_CONSTANT),INT_CONSTANT) 682 nts_0, // 200 - rp: REF_AND(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 683 nts_0, // 201 - rp: REF_AND(INT_USHR(r,INT_CONSTANT),REF_MOVE(INT_CONSTANT)) 684 nts_0, // 202 - rp: REF_AND(BYTE_LOAD(r,INT_CONSTANT),INT_CONSTANT) 685 nts_0, // 203 - rs: INT_LOAD(REF_ADD(r,INT_CONSTANT),INT_CONSTANT) 686 nts_0, // 204 - stm: INT_IFCMP(INT_2BYTE(r),INT_CONSTANT) 687 nts_0, // 205 - stm: INT_IFCMP(INT_2SHORT(r),INT_CONSTANT) 688 nts_0, // 206 - stm: INT_IFCMP(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 689 nts_0, // 207 - stm: INT_IFCMP(INT_SHL(r,INT_CONSTANT),INT_CONSTANT) 690 nts_0, // 208 - stm: INT_IFCMP(INT_SHR(r,INT_CONSTANT),INT_CONSTANT) 691 nts_0, // 209 - stm: INT_IFCMP(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 692 nts_0, // 210 - stm: INT_IFCMP(REF_NEG(r),INT_CONSTANT) 693 nts_0, // 211 - stm: INT_IFCMP(REF_NOT(r),INT_CONSTANT) 694 nts_0, // 212 - stm: INT_IFCMP(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 695 nts_0, // 213 - stm: INT_IFCMP(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 696 nts_0, // 214 - stm: INT_IFCMP(REF_ADD(r,INT_CONSTANT),INT_CONSTANT) 697 nts_7, // 215 - r: REF_AND(REF_NOT(r),REF_NOT(r)) 698 nts_7, // 216 - r: REF_OR(REF_NOT(r),REF_NOT(r)) 699 nts_7, // 217 - stm: BYTE_STORE(INT_2BYTE(r),OTHER_OPERAND(r,INT_CONSTANT)) 700 nts_7, // 218 - stm: SHORT_STORE(INT_2SHORT(r),OTHER_OPERAND(r,INT_CONSTANT)) 701 nts_7, // 219 - stm: SHORT_STORE(INT_2USHORT(r),OTHER_OPERAND(r,INT_CONSTANT)) 702 nts_7, // 220 - r: REF_AND(r,REF_NOT(r)) 703 nts_7, // 221 - r: REF_OR(r,REF_NOT(r)) 704 nts_7, // 222 - stm: BYTE_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 705 nts_7, // 223 - stm: SHORT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 706 nts_7, // 224 - stm: INT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 707 nts_7, // 225 - stm: INT_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 708 nts_7, // 226 - stm: FLOAT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 709 nts_7, // 227 - stm: FLOAT_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 710 nts_7, // 228 - stm: DOUBLE_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 711 nts_7, // 229 - stm: DOUBLE_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 712 nts_7, // 230 - stm: LONG_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 713 nts_7, // 231 - stm: LONG_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 714 nts_7, // 232 - r: REF_NOT(REF_OR(r,r)) 715 nts_7, // 233 - r: REF_NOT(REF_AND(r,r)) 716 nts_7, // 234 - r: REF_NOT(REF_XOR(r,r)) 717 nts_7, // 235 - rp: REF_AND(BYTE_LOAD(r,r),INT_CONSTANT) 718 nts_7, // 236 - rs: INT_LOAD(REF_ADD(r,r),INT_CONSTANT) 719 nts_7, // 237 - stm: INT_IFCMP(INT_USHR(r,r),INT_CONSTANT) 720 nts_7, // 238 - stm: INT_IFCMP(INT_SHL(r,r),INT_CONSTANT) 721 nts_7, // 239 - stm: INT_IFCMP(INT_SHR(r,r),INT_CONSTANT) 722 nts_7, // 240 - stm: INT_IFCMP(ATTEMPT_INT(r,r),INT_CONSTANT) 723 nts_7, // 241 - stm: INT_IFCMP(ATTEMPT_ADDR(r,r),INT_CONSTANT) 724 nts_7, // 242 - stm: INT_IFCMP(REF_ADD(r,r),INT_CONSTANT) 725 nts_7, // 243 - stm: INT_IFCMP(REF_AND(r,r),INT_CONSTANT) 726 nts_7, // 244 - stm: INT_IFCMP(REF_OR(r,r),INT_CONSTANT) 727 nts_7, // 245 - stm: INT_IFCMP(REF_XOR(r,r),INT_CONSTANT) 728 nts_11, // 246 - r: FLOAT_ADD(FLOAT_MUL(r,r),r) 729 nts_11, // 247 - r: DOUBLE_ADD(DOUBLE_MUL(r,r),r) 730 nts_11, // 248 - r: FLOAT_SUB(FLOAT_MUL(r,r),r) 731 nts_11, // 249 - r: DOUBLE_SUB(DOUBLE_MUL(r,r),r) 732 nts_11, // 250 - r: FLOAT_ADD(r,FLOAT_MUL(r,r)) 733 nts_11, // 251 - r: DOUBLE_ADD(r,DOUBLE_MUL(r,r)) 734 nts_11, // 252 - stm: BYTE_STORE(r,OTHER_OPERAND(r,r)) 735 nts_11, // 253 - stm: SHORT_STORE(r,OTHER_OPERAND(r,r)) 736 nts_11, // 254 - stm: INT_STORE(r,OTHER_OPERAND(r,r)) 737 nts_11, // 255 - stm: FLOAT_STORE(r,OTHER_OPERAND(r,r)) 738 nts_11, // 256 - stm: DOUBLE_STORE(r,OTHER_OPERAND(r,r)) 739 nts_11, // 257 - stm: LONG_STORE(r,OTHER_OPERAND(r,r)) 740 nts_11, // 258 - r: FLOAT_NEG(FLOAT_ADD(FLOAT_MUL(r,r),r)) 741 nts_11, // 259 - r: DOUBLE_NEG(DOUBLE_ADD(DOUBLE_MUL(r,r),r)) 742 nts_11, // 260 - r: FLOAT_NEG(FLOAT_SUB(FLOAT_MUL(r,r),r)) 743 nts_11, // 261 - r: DOUBLE_NEG(DOUBLE_SUB(DOUBLE_MUL(r,r),r)) 744 nts_11, // 262 - r: FLOAT_NEG(FLOAT_ADD(r,FLOAT_MUL(r,r))) 745 nts_11, // 263 - r: DOUBLE_NEG(DOUBLE_ADD(r,DOUBLE_MUL(r,r))) 746 nts_11, // 264 - stm: BYTE_STORE(INT_2BYTE(r),OTHER_OPERAND(r,r)) 747 nts_11, // 265 - stm: SHORT_STORE(INT_2SHORT(r),OTHER_OPERAND(r,r)) 748 nts_11, // 266 - stm: SHORT_STORE(INT_2USHORT(r),OTHER_OPERAND(r,r)) 749 nts_7, // 267 - stm: INT_STORE(r,OTHER_OPERAND(REF_ADD(r,INT_CONSTANT),INT_CONSTANT)) 750 nts_7, // 268 - stm: INT_IFCMP(REF_AND(r,REF_NOT(r)),INT_CONSTANT) 751 nts_7, // 269 - stm: INT_IFCMP(REF_OR(r,REF_NOT(r)),INT_CONSTANT) 752 }; 753 754 /* private static final byte arity[] = { 755 0, // 0 - GET_CAUGHT_EXCEPTION 756 1, // 1 - SET_CAUGHT_EXCEPTION 757 -1, // 2 - NEW 758 -1, // 3 - NEW_UNRESOLVED 759 -1, // 4 - NEWARRAY 760 -1, // 5 - NEWARRAY_UNRESOLVED 761 -1, // 6 - ATHROW 762 -1, // 7 - CHECKCAST 763 -1, // 8 - CHECKCAST_NOTNULL 764 -1, // 9 - CHECKCAST_UNRESOLVED 765 -1, // 10 - MUST_IMPLEMENT_INTERFACE 766 -1, // 11 - INSTANCEOF 767 -1, // 12 - INSTANCEOF_NOTNULL 768 -1, // 13 - INSTANCEOF_UNRESOLVED 769 -1, // 14 - MONITORENTER 770 -1, // 15 - MONITOREXIT 771 -1, // 16 - NEWOBJMULTIARRAY 772 -1, // 17 - GETSTATIC 773 -1, // 18 - PUTSTATIC 774 -1, // 19 - GETFIELD 775 -1, // 20 - PUTFIELD 776 -1, // 21 - INT_ZERO_CHECK 777 -1, // 22 - LONG_ZERO_CHECK 778 -1, // 23 - BOUNDS_CHECK 779 -1, // 24 - OBJARRAY_STORE_CHECK 780 -1, // 25 - OBJARRAY_STORE_CHECK_NOTNULL 781 0, // 26 - IG_PATCH_POINT 782 -1, // 27 - IG_CLASS_TEST 783 -1, // 28 - IG_METHOD_TEST 784 -1, // 29 - TABLESWITCH 785 -1, // 30 - LOOKUPSWITCH 786 -1, // 31 - INT_ALOAD 787 -1, // 32 - LONG_ALOAD 788 -1, // 33 - FLOAT_ALOAD 789 -1, // 34 - DOUBLE_ALOAD 790 -1, // 35 - REF_ALOAD 791 -1, // 36 - UBYTE_ALOAD 792 -1, // 37 - BYTE_ALOAD 793 -1, // 38 - USHORT_ALOAD 794 -1, // 39 - SHORT_ALOAD 795 -1, // 40 - INT_ASTORE 796 -1, // 41 - LONG_ASTORE 797 -1, // 42 - FLOAT_ASTORE 798 -1, // 43 - DOUBLE_ASTORE 799 -1, // 44 - REF_ASTORE 800 -1, // 45 - BYTE_ASTORE 801 -1, // 46 - SHORT_ASTORE 802 2, // 47 - INT_IFCMP 803 2, // 48 - INT_IFCMP2 804 2, // 49 - LONG_IFCMP 805 2, // 50 - FLOAT_IFCMP 806 2, // 51 - DOUBLE_IFCMP 807 -1, // 52 - REF_IFCMP 808 -1, // 53 - LABEL 809 -1, // 54 - BBEND 810 0, // 55 - UNINT_BEGIN 811 0, // 56 - UNINT_END 812 0, // 57 - FENCE 813 0, // 58 - READ_CEILING 814 0, // 59 - WRITE_FLOOR 815 -1, // 60 - PHI 816 -1, // 61 - SPLIT 817 -1, // 62 - PI 818 0, // 63 - NOP 819 -1, // 64 - INT_MOVE 820 1, // 65 - LONG_MOVE 821 1, // 66 - FLOAT_MOVE 822 1, // 67 - DOUBLE_MOVE 823 1, // 68 - REF_MOVE 824 0, // 69 - GUARD_MOVE 825 -1, // 70 - INT_COND_MOVE 826 -1, // 71 - LONG_COND_MOVE 827 -1, // 72 - FLOAT_COND_MOVE 828 -1, // 73 - DOUBLE_COND_MOVE 829 -1, // 74 - REF_COND_MOVE 830 -1, // 75 - GUARD_COND_MOVE 831 0, // 76 - GUARD_COMBINE 832 2, // 77 - REF_ADD 833 -1, // 78 - INT_ADD 834 2, // 79 - LONG_ADD 835 2, // 80 - FLOAT_ADD 836 2, // 81 - DOUBLE_ADD 837 2, // 82 - REF_SUB 838 -1, // 83 - INT_SUB 839 2, // 84 - LONG_SUB 840 2, // 85 - FLOAT_SUB 841 2, // 86 - DOUBLE_SUB 842 2, // 87 - INT_MUL 843 2, // 88 - LONG_MUL 844 2, // 89 - FLOAT_MUL 845 2, // 90 - DOUBLE_MUL 846 2, // 91 - INT_DIV 847 -1, // 92 - LONG_DIV 848 2, // 93 - FLOAT_DIV 849 2, // 94 - DOUBLE_DIV 850 2, // 95 - INT_REM 851 -1, // 96 - LONG_REM 852 -1, // 97 - FLOAT_REM 853 -1, // 98 - DOUBLE_REM 854 1, // 99 - REF_NEG 855 -1, // 100 - INT_NEG 856 1, // 101 - LONG_NEG 857 1, // 102 - FLOAT_NEG 858 1, // 103 - DOUBLE_NEG 859 1, // 104 - FLOAT_SQRT 860 1, // 105 - DOUBLE_SQRT 861 -1, // 106 - REF_SHL 862 2, // 107 - INT_SHL 863 2, // 108 - LONG_SHL 864 -1, // 109 - REF_SHR 865 2, // 110 - INT_SHR 866 2, // 111 - LONG_SHR 867 -1, // 112 - REF_USHR 868 2, // 113 - INT_USHR 869 2, // 114 - LONG_USHR 870 2, // 115 - REF_AND 871 -1, // 116 - INT_AND 872 2, // 117 - LONG_AND 873 2, // 118 - REF_OR 874 -1, // 119 - INT_OR 875 2, // 120 - LONG_OR 876 2, // 121 - REF_XOR 877 -1, // 122 - INT_XOR 878 1, // 123 - REF_NOT 879 -1, // 124 - INT_NOT 880 1, // 125 - LONG_NOT 881 2, // 126 - LONG_XOR 882 -1, // 127 - INT_2ADDRSigExt 883 -1, // 128 - INT_2ADDRZerExt 884 -1, // 129 - LONG_2ADDR 885 -1, // 130 - ADDR_2INT 886 -1, // 131 - ADDR_2LONG 887 1, // 132 - INT_2LONG 888 1, // 133 - INT_2FLOAT 889 1, // 134 - INT_2DOUBLE 890 1, // 135 - LONG_2INT 891 -1, // 136 - LONG_2FLOAT 892 -1, // 137 - LONG_2DOUBLE 893 1, // 138 - FLOAT_2INT 894 -1, // 139 - FLOAT_2LONG 895 1, // 140 - FLOAT_2DOUBLE 896 1, // 141 - DOUBLE_2INT 897 -1, // 142 - DOUBLE_2LONG 898 1, // 143 - DOUBLE_2FLOAT 899 1, // 144 - INT_2BYTE 900 1, // 145 - INT_2USHORT 901 1, // 146 - INT_2SHORT 902 2, // 147 - LONG_CMP 903 2, // 148 - FLOAT_CMPL 904 2, // 149 - FLOAT_CMPG 905 2, // 150 - DOUBLE_CMPL 906 2, // 151 - DOUBLE_CMPG 907 1, // 152 - RETURN 908 1, // 153 - NULL_CHECK 909 0, // 154 - GOTO 910 1, // 155 - BOOLEAN_NOT 911 2, // 156 - BOOLEAN_CMP_INT 912 2, // 157 - BOOLEAN_CMP_ADDR 913 -1, // 158 - BOOLEAN_CMP_LONG 914 -1, // 159 - BOOLEAN_CMP_FLOAT 915 -1, // 160 - BOOLEAN_CMP_DOUBLE 916 2, // 161 - BYTE_LOAD 917 2, // 162 - UBYTE_LOAD 918 2, // 163 - SHORT_LOAD 919 2, // 164 - USHORT_LOAD 920 -1, // 165 - REF_LOAD 921 -1, // 166 - REF_STORE 922 2, // 167 - INT_LOAD 923 2, // 168 - LONG_LOAD 924 2, // 169 - FLOAT_LOAD 925 2, // 170 - DOUBLE_LOAD 926 2, // 171 - BYTE_STORE 927 2, // 172 - SHORT_STORE 928 2, // 173 - INT_STORE 929 2, // 174 - LONG_STORE 930 2, // 175 - FLOAT_STORE 931 2, // 176 - DOUBLE_STORE 932 2, // 177 - PREPARE_INT 933 2, // 178 - PREPARE_ADDR 934 2, // 179 - PREPARE_LONG 935 2, // 180 - ATTEMPT_INT 936 2, // 181 - ATTEMPT_ADDR 937 2, // 182 - ATTEMPT_LONG 938 2, // 183 - CALL 939 2, // 184 - SYSCALL 940 0, // 185 - YIELDPOINT_PROLOGUE 941 0, // 186 - YIELDPOINT_EPILOGUE 942 0, // 187 - YIELDPOINT_BACKEDGE 943 2, // 188 - YIELDPOINT_OSR 944 -1, // 189 - OSR_BARRIER 945 0, // 190 - IR_PROLOGUE 946 0, // 191 - RESOLVE 947 -1, // 192 - RESOLVE_MEMBER 948 0, // 193 - GET_TIME_BASE 949 -1, // 194 - INSTRUMENTED_EVENT_COUNTER 950 2, // 195 - TRAP_IF 951 0, // 196 - TRAP 952 1, // 197 - FLOAT_AS_INT_BITS 953 1, // 198 - INT_BITS_AS_FLOAT 954 1, // 199 - DOUBLE_AS_LONG_BITS 955 1, // 200 - LONG_BITS_AS_DOUBLE 956 -1, // 201 - ARRAYLENGTH 957 -1, // 202 - GET_OBJ_TIB 958 -1, // 203 - GET_CLASS_TIB 959 -1, // 204 - GET_TYPE_FROM_TIB 960 -1, // 205 - GET_SUPERCLASS_IDS_FROM_TIB 961 -1, // 206 - GET_DOES_IMPLEMENT_FROM_TIB 962 -1, // 207 - GET_ARRAY_ELEMENT_TIB_FROM_TIB 963 1, // 208 - LOWTABLESWITCH 964 0, // 209 - ADDRESS_CONSTANT 965 0, // 210 - INT_CONSTANT 966 0, // 211 - LONG_CONSTANT 967 0, // 212 - REGISTER 968 2, // 213 - OTHER_OPERAND 969 0, // 214 - NULL 970 0, // 215 - BRANCH_TARGET 971 1, // 216 - DCBF 972 1, // 217 - DCBST 973 1, // 218 - DCBT 974 1, // 219 - DCBTST 975 1, // 220 - DCBZ 976 1, // 221 - DCBZL 977 1, // 222 - ICBI 978 -1, // 223 - CALL_SAVE_VOLATILE 979 -1, // 224 - MIR_START 980 -1, // 225 - MIR_LOWTABLESWITCH 981 -1, // 226 - PPC_DATA_INT 982 -1, // 227 - PPC_DATA_LABEL 983 -1, // 228 - PPC_ADD 984 -1, // 229 - PPC_ADDr 985 -1, // 230 - PPC_ADDC 986 -1, // 231 - PPC_ADDE 987 -1, // 232 - PPC_ADDZE 988 -1, // 233 - PPC_ADDME 989 -1, // 234 - PPC_ADDIC 990 -1, // 235 - PPC_ADDICr 991 -1, // 236 - PPC_SUBF 992 -1, // 237 - PPC_SUBFr 993 -1, // 238 - PPC_SUBFC 994 -1, // 239 - PPC_SUBFCr 995 -1, // 240 - PPC_SUBFIC 996 -1, // 241 - PPC_SUBFE 997 -1, // 242 - PPC_SUBFZE 998 -1, // 243 - PPC_SUBFME 999 -1, // 244 - PPC_AND 1000 -1, // 245 - PPC_ANDr 1001 -1, // 246 - PPC_ANDIr 1002 -1, // 247 - PPC_ANDISr 1003 -1, // 248 - PPC_NAND 1004 -1, // 249 - PPC_NANDr 1005 -1, // 250 - PPC_ANDC 1006 -1, // 251 - PPC_ANDCr 1007 -1, // 252 - PPC_OR 1008 -1, // 253 - PPC_ORr 1009 -1, // 254 - PPC_MOVE 1010 -1, // 255 - PPC_ORI 1011 -1, // 256 - PPC_ORIS 1012 -1, // 257 - PPC_NOR 1013 -1, // 258 - PPC_NORr 1014 -1, // 259 - PPC_ORC 1015 -1, // 260 - PPC_ORCr 1016 -1, // 261 - PPC_XOR 1017 -1, // 262 - PPC_XORr 1018 -1, // 263 - PPC_XORI 1019 -1, // 264 - PPC_XORIS 1020 -1, // 265 - PPC_EQV 1021 -1, // 266 - PPC_EQVr 1022 -1, // 267 - PPC_NEG 1023 -1, // 268 - PPC_NEGr 1024 -1, // 269 - PPC_CNTLZW 1025 -1, // 270 - PPC_EXTSB 1026 -1, // 271 - PPC_EXTSBr 1027 -1, // 272 - PPC_EXTSH 1028 -1, // 273 - PPC_EXTSHr 1029 -1, // 274 - PPC_SLW 1030 -1, // 275 - PPC_SLWr 1031 -1, // 276 - PPC_SLWI 1032 -1, // 277 - PPC_SLWIr 1033 -1, // 278 - PPC_SRW 1034 -1, // 279 - PPC_SRWr 1035 -1, // 280 - PPC_SRWI 1036 -1, // 281 - PPC_SRWIr 1037 -1, // 282 - PPC_SRAW 1038 -1, // 283 - PPC_SRAWr 1039 -1, // 284 - PPC_SRAWI 1040 -1, // 285 - PPC_SRAWIr 1041 -1, // 286 - PPC_RLWINM 1042 -1, // 287 - PPC_RLWINMr 1043 -1, // 288 - PPC_RLWIMI 1044 -1, // 289 - PPC_RLWIMIr 1045 -1, // 290 - PPC_RLWNM 1046 -1, // 291 - PPC_RLWNMr 1047 -1, // 292 - PPC_B 1048 -1, // 293 - PPC_BL 1049 -1, // 294 - PPC_BL_SYS 1050 -1, // 295 - PPC_BLR 1051 -1, // 296 - PPC_BCTR 1052 -1, // 297 - PPC_BCTRL 1053 -1, // 298 - PPC_BCTRL_SYS 1054 -1, // 299 - PPC_BCLR 1055 -1, // 300 - PPC_BLRL 1056 -1, // 301 - PPC_BCLRL 1057 -1, // 302 - PPC_BC 1058 -1, // 303 - PPC_BCL 1059 -1, // 304 - PPC_BCOND 1060 -1, // 305 - PPC_BCOND2 1061 -1, // 306 - PPC_BCCTR 1062 -1, // 307 - PPC_BCC 1063 -1, // 308 - PPC_ADDI 1064 -1, // 309 - PPC_ADDIS 1065 -1, // 310 - PPC_LDI 1066 -1, // 311 - PPC_LDIS 1067 -1, // 312 - PPC_CMP 1068 -1, // 313 - PPC_CMPI 1069 -1, // 314 - PPC_CMPL 1070 -1, // 315 - PPC_CMPLI 1071 -1, // 316 - PPC_CRAND 1072 -1, // 317 - PPC_CRANDC 1073 -1, // 318 - PPC_CROR 1074 -1, // 319 - PPC_CRORC 1075 -1, // 320 - PPC_FMR 1076 -1, // 321 - PPC_FRSP 1077 -1, // 322 - PPC_FCTIW 1078 -1, // 323 - PPC_FCTIWZ 1079 -1, // 324 - PPC_FADD 1080 -1, // 325 - PPC_FADDS 1081 -1, // 326 - PPC_FSQRT 1082 -1, // 327 - PPC_FSQRTS 1083 -1, // 328 - PPC_FABS 1084 -1, // 329 - PPC_FCMPO 1085 -1, // 330 - PPC_FCMPU 1086 -1, // 331 - PPC_FDIV 1087 -1, // 332 - PPC_FDIVS 1088 -1, // 333 - PPC_DIVW 1089 -1, // 334 - PPC_DIVWU 1090 -1, // 335 - PPC_FMUL 1091 -1, // 336 - PPC_FMULS 1092 -1, // 337 - PPC_FSEL 1093 -1, // 338 - PPC_FMADD 1094 -1, // 339 - PPC_FMADDS 1095 -1, // 340 - PPC_FMSUB 1096 -1, // 341 - PPC_FMSUBS 1097 -1, // 342 - PPC_FNMADD 1098 -1, // 343 - PPC_FNMADDS 1099 -1, // 344 - PPC_FNMSUB 1100 -1, // 345 - PPC_FNMSUBS 1101 -1, // 346 - PPC_MULLI 1102 -1, // 347 - PPC_MULLW 1103 -1, // 348 - PPC_MULHW 1104 -1, // 349 - PPC_MULHWU 1105 -1, // 350 - PPC_FNEG 1106 -1, // 351 - PPC_FSUB 1107 -1, // 352 - PPC_FSUBS 1108 -1, // 353 - PPC_LWZ 1109 -1, // 354 - PPC_LWZU 1110 -1, // 355 - PPC_LWZUX 1111 -1, // 356 - PPC_LWZX 1112 -1, // 357 - PPC_LWARX 1113 -1, // 358 - PPC_LBZ 1114 -1, // 359 - PPC_LBZUX 1115 -1, // 360 - PPC_LBZX 1116 -1, // 361 - PPC_LHA 1117 -1, // 362 - PPC_LHAX 1118 -1, // 363 - PPC_LHZ 1119 -1, // 364 - PPC_LHZX 1120 -1, // 365 - PPC_LFD 1121 -1, // 366 - PPC_LFDX 1122 -1, // 367 - PPC_LFS 1123 -1, // 368 - PPC_LFSX 1124 -1, // 369 - PPC_LMW 1125 -1, // 370 - PPC_STW 1126 -1, // 371 - PPC_STWX 1127 -1, // 372 - PPC_STWCXr 1128 -1, // 373 - PPC_STWU 1129 -1, // 374 - PPC_STB 1130 -1, // 375 - PPC_STBX 1131 -1, // 376 - PPC_STH 1132 -1, // 377 - PPC_STHX 1133 -1, // 378 - PPC_STFD 1134 -1, // 379 - PPC_STFDX 1135 -1, // 380 - PPC_STFDU 1136 -1, // 381 - PPC_STFS 1137 -1, // 382 - PPC_STFSX 1138 -1, // 383 - PPC_STFSU 1139 -1, // 384 - PPC_STMW 1140 -1, // 385 - PPC_TW 1141 -1, // 386 - PPC_TWI 1142 -1, // 387 - PPC_MFSPR 1143 -1, // 388 - PPC_MTSPR 1144 -1, // 389 - PPC_MFTB 1145 -1, // 390 - PPC_MFTBU 1146 -1, // 391 - PPC_HWSYNC 1147 -1, // 392 - PPC_SYNC 1148 -1, // 393 - PPC_ISYNC 1149 -1, // 394 - PPC_DCBF 1150 -1, // 395 - PPC_DCBST 1151 -1, // 396 - PPC_DCBT 1152 -1, // 397 - PPC_DCBTST 1153 -1, // 398 - PPC_DCBZ 1154 -1, // 399 - PPC_DCBZL 1155 -1, // 400 - PPC_ICBI 1156 -1, // 401 - PPC64_EXTSW 1157 -1, // 402 - PPC64_EXTSWr 1158 -1, // 403 - PPC64_EXTZW 1159 -1, // 404 - PPC64_RLDICL 1160 -1, // 405 - PPC64_RLDICR 1161 -1, // 406 - PPC64_SLD 1162 -1, // 407 - PPC64_SLDr 1163 -1, // 408 - PPC64_SLDI 1164 -1, // 409 - PPC64_SRD 1165 -1, // 410 - PPC64_SRDr 1166 -1, // 411 - PPC64_SRAD 1167 -1, // 412 - PPC64_SRADr 1168 -1, // 413 - PPC64_SRADI 1169 -1, // 414 - PPC64_SRADIr 1170 -1, // 415 - PPC64_SRDI 1171 -1, // 416 - PPC64_RLDIMI 1172 -1, // 417 - PPC64_RLDIMIr 1173 -1, // 418 - PPC64_CMP 1174 -1, // 419 - PPC64_CMPI 1175 -1, // 420 - PPC64_CMPL 1176 -1, // 421 - PPC64_CMPLI 1177 -1, // 422 - PPC64_FCFID 1178 -1, // 423 - PPC64_FCTIDZ 1179 -1, // 424 - PPC64_DIVD 1180 -1, // 425 - PPC64_MULLD 1181 -1, // 426 - PPC64_LD 1182 -1, // 427 - PPC64_LDX 1183 -1, // 428 - PPC64_STD 1184 -1, // 429 - PPC64_STDX 1185 -1, // 430 - PPC64_TD 1186 -1, // 431 - PPC64_TDI 1187 -1, // 432 - PPC_CNTLZAddr 1188 -1, // 433 - PPC_SRAAddrI 1189 -1, // 434 - PPC_SRAddrI 1190 -1, // 435 - PPC64_LWA 1191 -1, // 436 - PPC_LInt 1192 -1, // 437 - PPC64_LWAX 1193 -1, // 438 - PPC_LIntX 1194 -1, // 439 - PPC_LIntUX 1195 -1, // 440 - PPC_LAddr 1196 -1, // 441 - PPC_LAddrX 1197 -1, // 442 - PPC_LAddrU 1198 -1, // 443 - PPC_LAddrUX 1199 -1, // 444 - PPC_LAddrARX 1200 -1, // 445 - PPC_STAddr 1201 -1, // 446 - PPC_STAddrX 1202 -1, // 447 - PPC_STAddrU 1203 -1, // 448 - PPC_STAddrUX 1204 -1, // 449 - PPC_STAddrCXr 1205 -1, // 450 - PPC_TAddr 1206 -1, // 451 - MIR_END 1207 };*/ 1208 1209 /** 1210 * Decoding table. Translate the target non-terminal and minimal cost covering state encoding 1211 * non-terminal into the rule that produces the non-terminal. 1212 * The first index is the non-terminal that we wish to produce. 1213 * The second index is the state non-terminal associated with covering a tree 1214 * with minimal cost and is computed by jburg based on the non-terminal to be produced. 1215 * The value in the array is the rule number 1216 */ 1217 private static final char[][] decode = { 1218 null, // [0][0] 1219 { // stm_NT 1220 0, // [1][0] 1221 1, // [1][1] - stm: r 1222 13, // [1][2] - stm: RESOLVE 1223 14, // [1][3] - stm: IG_PATCH_POINT 1224 15, // [1][4] - stm: UNINT_BEGIN 1225 16, // [1][5] - stm: UNINT_END 1226 17, // [1][6] - stm: YIELDPOINT_PROLOGUE 1227 18, // [1][7] - stm: YIELDPOINT_EPILOGUE 1228 19, // [1][8] - stm: YIELDPOINT_BACKEDGE 1229 101, // [1][9] - stm: LOWTABLESWITCH(r) 1230 20, // [1][10] - stm: NOP 1231 102, // [1][11] - stm: NULL_CHECK(r) 1232 103, // [1][12] - stm: SET_CAUGHT_EXCEPTION(r) 1233 24, // [1][13] - stm: FENCE 1234 25, // [1][14] - stm: WRITE_FLOOR 1235 26, // [1][15] - stm: READ_CEILING 1236 104, // [1][16] - stm: DCBF(r) 1237 105, // [1][17] - stm: DCBST(r) 1238 106, // [1][18] - stm: DCBT(r) 1239 107, // [1][19] - stm: DCBTST(r) 1240 108, // [1][20] - stm: DCBZ(r) 1241 109, // [1][21] - stm: DCBZL(r) 1242 110, // [1][22] - stm: ICBI(r) 1243 27, // [1][23] - stm: TRAP 1244 40, // [1][24] - stm: TRAP_IF(r,r) 1245 111, // [1][25] - stm: TRAP_IF(r,INT_CONSTANT) 1246 112, // [1][26] - stm: TRAP_IF(r,LONG_CONSTANT) 1247 222, // [1][27] - stm: BYTE_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 1248 252, // [1][28] - stm: BYTE_STORE(r,OTHER_OPERAND(r,r)) 1249 217, // [1][29] - stm: BYTE_STORE(INT_2BYTE(r),OTHER_OPERAND(r,INT_CONSTANT)) 1250 264, // [1][30] - stm: BYTE_STORE(INT_2BYTE(r),OTHER_OPERAND(r,r)) 1251 223, // [1][31] - stm: SHORT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 1252 253, // [1][32] - stm: SHORT_STORE(r,OTHER_OPERAND(r,r)) 1253 218, // [1][33] - stm: SHORT_STORE(INT_2SHORT(r),OTHER_OPERAND(r,INT_CONSTANT)) 1254 265, // [1][34] - stm: SHORT_STORE(INT_2SHORT(r),OTHER_OPERAND(r,r)) 1255 219, // [1][35] - stm: SHORT_STORE(INT_2USHORT(r),OTHER_OPERAND(r,INT_CONSTANT)) 1256 266, // [1][36] - stm: SHORT_STORE(INT_2USHORT(r),OTHER_OPERAND(r,r)) 1257 224, // [1][37] - stm: INT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 1258 225, // [1][38] - stm: INT_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 1259 254, // [1][39] - stm: INT_STORE(r,OTHER_OPERAND(r,r)) 1260 267, // [1][40] - stm: INT_STORE(r,OTHER_OPERAND(REF_ADD(r,INT_CONSTANT),INT_CONSTANT)) 1261 226, // [1][41] - stm: FLOAT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 1262 227, // [1][42] - stm: FLOAT_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 1263 255, // [1][43] - stm: FLOAT_STORE(r,OTHER_OPERAND(r,r)) 1264 228, // [1][44] - stm: DOUBLE_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 1265 229, // [1][45] - stm: DOUBLE_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 1266 256, // [1][46] - stm: DOUBLE_STORE(r,OTHER_OPERAND(r,r)) 1267 71, // [1][47] - stm: INT_IFCMP(r,r) 1268 169, // [1][48] - stm: INT_IFCMP(r,INT_CONSTANT) 1269 204, // [1][49] - stm: INT_IFCMP(INT_2BYTE(r),INT_CONSTANT) 1270 205, // [1][50] - stm: INT_IFCMP(INT_2SHORT(r),INT_CONSTANT) 1271 237, // [1][51] - stm: INT_IFCMP(INT_USHR(r,r),INT_CONSTANT) 1272 238, // [1][52] - stm: INT_IFCMP(INT_SHL(r,r),INT_CONSTANT) 1273 239, // [1][53] - stm: INT_IFCMP(INT_SHR(r,r),INT_CONSTANT) 1274 206, // [1][54] - stm: INT_IFCMP(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 1275 207, // [1][55] - stm: INT_IFCMP(INT_SHL(r,INT_CONSTANT),INT_CONSTANT) 1276 208, // [1][56] - stm: INT_IFCMP(INT_SHR(r,INT_CONSTANT),INT_CONSTANT) 1277 209, // [1][57] - stm: INT_IFCMP(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 1278 170, // [1][58] - stm: INT_IFCMP(boolcmp,INT_CONSTANT) 1279 171, // [1][59] - stm: INT_IFCMP(boolcmp,INT_CONSTANT) 1280 172, // [1][60] - stm: INT_IFCMP(boolcmp,INT_CONSTANT) 1281 173, // [1][61] - stm: INT_IFCMP(boolcmp,INT_CONSTANT) 1282 72, // [1][62] - stm: INT_IFCMP2(r,r) 1283 174, // [1][63] - stm: INT_IFCMP2(r,INT_CONSTANT) 1284 73, // [1][64] - stm: FLOAT_IFCMP(r,r) 1285 74, // [1][65] - stm: DOUBLE_IFCMP(r,r) 1286 75, // [1][66] - stm: FLOAT_CMPL(r,r) 1287 76, // [1][67] - stm: FLOAT_CMPG(r,r) 1288 77, // [1][68] - stm: DOUBLE_CMPL(r,r) 1289 78, // [1][69] - stm: DOUBLE_CMPG(r,r) 1290 31, // [1][70] - stm: GOTO 1291 32, // [1][71] - stm: RETURN(NULL) 1292 175, // [1][72] - stm: RETURN(r) 1293 34, // [1][73] - stm: IR_PROLOGUE 1294 96, // [1][74] - stm: LONG_CMP(r,r) 1295 97, // [1][75] - stm: LONG_IFCMP(r,r) 1296 240, // [1][76] - stm: INT_IFCMP(ATTEMPT_INT(r,r),INT_CONSTANT) 1297 241, // [1][77] - stm: INT_IFCMP(ATTEMPT_ADDR(r,r),INT_CONSTANT) 1298 210, // [1][78] - stm: INT_IFCMP(REF_NEG(r),INT_CONSTANT) 1299 211, // [1][79] - stm: INT_IFCMP(REF_NOT(r),INT_CONSTANT) 1300 242, // [1][80] - stm: INT_IFCMP(REF_ADD(r,r),INT_CONSTANT) 1301 243, // [1][81] - stm: INT_IFCMP(REF_AND(r,r),INT_CONSTANT) 1302 244, // [1][82] - stm: INT_IFCMP(REF_OR(r,r),INT_CONSTANT) 1303 245, // [1][83] - stm: INT_IFCMP(REF_XOR(r,r),INT_CONSTANT) 1304 212, // [1][84] - stm: INT_IFCMP(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 1305 213, // [1][85] - stm: INT_IFCMP(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 1306 214, // [1][86] - stm: INT_IFCMP(REF_ADD(r,INT_CONSTANT),INT_CONSTANT) 1307 268, // [1][87] - stm: INT_IFCMP(REF_AND(r,REF_NOT(r)),INT_CONSTANT) 1308 269, // [1][88] - stm: INT_IFCMP(REF_OR(r,REF_NOT(r)),INT_CONSTANT) 1309 230, // [1][89] - stm: LONG_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 1310 231, // [1][90] - stm: LONG_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 1311 257, // [1][91] - stm: LONG_STORE(r,OTHER_OPERAND(r,r)) 1312 }, 1313 { // r_NT 1314 0, // [2][0] 1315 8, // [2][1] - r: REGISTER 1316 2, // [2][2] - r: czr 1317 3, // [2][3] - r: rs 1318 4, // [2][4] - r: rz 1319 21, // [2][5] - r: GUARD_MOVE 1320 22, // [2][6] - r: GUARD_COMBINE 1321 23, // [2][7] - r: GET_CAUGHT_EXCEPTION 1322 113, // [2][8] - r: BOOLEAN_NOT(r) 1323 114, // [2][9] - r: BOOLEAN_CMP_INT(r,INT_CONSTANT) 1324 41, // [2][10] - r: BOOLEAN_CMP_INT(r,r) 1325 116, // [2][11] - r: BOOLEAN_CMP_ADDR(r,INT_CONSTANT) 1326 43, // [2][12] - r: BOOLEAN_CMP_ADDR(r,r) 1327 122, // [2][13] - r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 1328 123, // [2][14] - r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 1329 124, // [2][15] - r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 1330 125, // [2][16] - r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 1331 126, // [2][17] - r: REF_ADD(r,INT_CONSTANT) 1332 45, // [2][18] - r: REF_ADD(r,r) 1333 127, // [2][19] - r: REF_ADD(r,REF_MOVE(INT_CONSTANT)) 1334 128, // [2][20] - r: REF_ADD(r,REF_MOVE(INT_CONSTANT)) 1335 46, // [2][21] - r: REF_SUB(r,r) 1336 193, // [2][22] - r: REF_SUB(INT_CONSTANT,r) 1337 129, // [2][23] - r: INT_MUL(r,INT_CONSTANT) 1338 47, // [2][24] - r: INT_MUL(r,r) 1339 48, // [2][25] - r: INT_DIV(r,r) 1340 130, // [2][26] - r: INT_DIV(r,REF_MOVE(INT_CONSTANT)) 1341 49, // [2][27] - r: INT_REM(r,r) 1342 131, // [2][28] - r: INT_REM(r,REF_MOVE(INT_CONSTANT)) 1343 132, // [2][29] - r: REF_NEG(r) 1344 53, // [2][30] - r: REF_AND(r,r) 1345 215, // [2][31] - r: REF_AND(REF_NOT(r),REF_NOT(r)) 1346 220, // [2][32] - r: REF_AND(r,REF_NOT(r)) 1347 54, // [2][33] - r: REF_OR(r,r) 1348 138, // [2][34] - r: REF_OR(r,INT_CONSTANT) 1349 216, // [2][35] - r: REF_OR(REF_NOT(r),REF_NOT(r)) 1350 221, // [2][36] - r: REF_OR(r,REF_NOT(r)) 1351 55, // [2][37] - r: REF_XOR(r,r) 1352 139, // [2][38] - r: REF_XOR(r,INT_CONSTANT) 1353 140, // [2][39] - r: REF_NOT(r) 1354 232, // [2][40] - r: REF_NOT(REF_OR(r,r)) 1355 233, // [2][41] - r: REF_NOT(REF_AND(r,r)) 1356 234, // [2][42] - r: REF_NOT(REF_XOR(r,r)) 1357 56, // [2][43] - r: FLOAT_ADD(r,r) 1358 57, // [2][44] - r: DOUBLE_ADD(r,r) 1359 58, // [2][45] - r: FLOAT_MUL(r,r) 1360 59, // [2][46] - r: DOUBLE_MUL(r,r) 1361 60, // [2][47] - r: FLOAT_SUB(r,r) 1362 61, // [2][48] - r: DOUBLE_SUB(r,r) 1363 62, // [2][49] - r: FLOAT_DIV(r,r) 1364 63, // [2][50] - r: DOUBLE_DIV(r,r) 1365 141, // [2][51] - r: FLOAT_NEG(r) 1366 142, // [2][52] - r: DOUBLE_NEG(r) 1367 143, // [2][53] - r: FLOAT_SQRT(r) 1368 144, // [2][54] - r: DOUBLE_SQRT(r) 1369 246, // [2][55] - r: FLOAT_ADD(FLOAT_MUL(r,r),r) 1370 247, // [2][56] - r: DOUBLE_ADD(DOUBLE_MUL(r,r),r) 1371 250, // [2][57] - r: FLOAT_ADD(r,FLOAT_MUL(r,r)) 1372 251, // [2][58] - r: DOUBLE_ADD(r,DOUBLE_MUL(r,r)) 1373 248, // [2][59] - r: FLOAT_SUB(FLOAT_MUL(r,r),r) 1374 249, // [2][60] - r: DOUBLE_SUB(DOUBLE_MUL(r,r),r) 1375 258, // [2][61] - r: FLOAT_NEG(FLOAT_ADD(FLOAT_MUL(r,r),r)) 1376 259, // [2][62] - r: DOUBLE_NEG(DOUBLE_ADD(DOUBLE_MUL(r,r),r)) 1377 262, // [2][63] - r: FLOAT_NEG(FLOAT_ADD(r,FLOAT_MUL(r,r))) 1378 263, // [2][64] - r: DOUBLE_NEG(DOUBLE_ADD(r,DOUBLE_MUL(r,r))) 1379 260, // [2][65] - r: FLOAT_NEG(FLOAT_SUB(FLOAT_MUL(r,r),r)) 1380 261, // [2][66] - r: DOUBLE_NEG(DOUBLE_SUB(DOUBLE_MUL(r,r),r)) 1381 148, // [2][67] - r: INT_2FLOAT(r) 1382 149, // [2][68] - r: INT_2DOUBLE(r) 1383 150, // [2][69] - r: FLOAT_2INT(r) 1384 151, // [2][70] - r: FLOAT_2DOUBLE(r) 1385 152, // [2][71] - r: DOUBLE_2INT(r) 1386 153, // [2][72] - r: DOUBLE_2FLOAT(r) 1387 154, // [2][73] - r: FLOAT_AS_INT_BITS(r) 1388 155, // [2][74] - r: INT_BITS_AS_FLOAT(r) 1389 156, // [2][75] - r: REF_MOVE(r) 1390 157, // [2][76] - r: FLOAT_MOVE(r) 1391 158, // [2][77] - r: DOUBLE_MOVE(r) 1392 163, // [2][78] - r: FLOAT_LOAD(r,INT_CONSTANT) 1393 164, // [2][79] - r: FLOAT_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 1394 68, // [2][80] - r: FLOAT_LOAD(r,r) 1395 165, // [2][81] - r: DOUBLE_LOAD(r,INT_CONSTANT) 1396 166, // [2][82] - r: DOUBLE_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 1397 69, // [2][83] - r: DOUBLE_LOAD(r,r) 1398 79, // [2][84] - r: CALL(r,any) 1399 194, // [2][85] - r: CALL(BRANCH_TARGET,any) 1400 80, // [2][86] - r: SYSCALL(r,any) 1401 33, // [2][87] - r: GET_TIME_BASE 1402 81, // [2][88] - r: OTHER_OPERAND(r,r) 1403 82, // [2][89] - r: YIELDPOINT_OSR(any,any) 1404 83, // [2][90] - r: PREPARE_INT(r,r) 1405 84, // [2][91] - r: PREPARE_LONG(r,r) 1406 85, // [2][92] - r: ATTEMPT_INT(r,r) 1407 86, // [2][93] - r: ATTEMPT_LONG(r,r) 1408 87, // [2][94] - r: LONG_ADD(r,r) 1409 88, // [2][95] - r: LONG_SUB(r,r) 1410 89, // [2][96] - r: LONG_MUL(r,r) 1411 176, // [2][97] - r: LONG_NEG(r) 1412 90, // [2][98] - r: LONG_SHL(r,r) 1413 177, // [2][99] - r: LONG_SHL(r,INT_CONSTANT) 1414 91, // [2][100] - r: LONG_SHR(r,r) 1415 178, // [2][101] - r: LONG_SHR(r,INT_CONSTANT) 1416 92, // [2][102] - r: LONG_USHR(r,r) 1417 179, // [2][103] - r: LONG_USHR(r,INT_CONSTANT) 1418 93, // [2][104] - r: LONG_AND(r,r) 1419 94, // [2][105] - r: LONG_OR(r,r) 1420 95, // [2][106] - r: LONG_XOR(r,r) 1421 180, // [2][107] - r: LONG_NOT(r) 1422 181, // [2][108] - r: INT_2LONG(r) 1423 182, // [2][109] - r: LONG_2INT(r) 1424 183, // [2][110] - r: DOUBLE_AS_LONG_BITS(r) 1425 184, // [2][111] - r: LONG_BITS_AS_DOUBLE(r) 1426 35, // [2][112] - r: LONG_MOVE(LONG_CONSTANT) 1427 185, // [2][113] - r: LONG_MOVE(r) 1428 187, // [2][114] - r: REF_AND(r,REF_MOVE(INT_CONSTANT)) 1429 188, // [2][115] - r: REF_OR(r,REF_MOVE(INT_CONSTANT)) 1430 189, // [2][116] - r: REF_OR(r,REF_MOVE(INT_CONSTANT)) 1431 190, // [2][117] - r: REF_XOR(r,REF_MOVE(INT_CONSTANT)) 1432 36, // [2][118] - r: REF_MOVE(ADDRESS_CONSTANT) 1433 37, // [2][119] - r: REF_MOVE(ADDRESS_CONSTANT) 1434 38, // [2][120] - r: REF_MOVE(ADDRESS_CONSTANT) 1435 191, // [2][121] - r: LONG_LOAD(r,INT_CONSTANT) 1436 192, // [2][122] - r: LONG_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 1437 98, // [2][123] - r: LONG_LOAD(r,r) 1438 99, // [2][124] - r: PREPARE_ADDR(r,r) 1439 100, // [2][125] - r: ATTEMPT_ADDR(r,r) 1440 }, 1441 { // czr_NT 1442 0, // [3][0] 1443 136, // [3][1] - czr: REF_AND(r,INT_CONSTANT) 1444 186, // [3][2] - czr: REF_AND(r,REF_MOVE(INT_CONSTANT)) 1445 }, 1446 { // rs_NT 1447 0, // [4][0] 1448 5, // [4][1] - rs: rp 1449 134, // [4][2] - rs: INT_SHR(r,INT_CONSTANT) 1450 51, // [4][3] - rs: INT_SHR(r,r) 1451 145, // [4][4] - rs: INT_2BYTE(r) 1452 147, // [4][5] - rs: INT_2SHORT(r) 1453 28, // [4][6] - rs: REF_MOVE(INT_CONSTANT) 1454 29, // [4][7] - rs: REF_MOVE(INT_CONSTANT) 1455 30, // [4][8] - rs: REF_MOVE(INT_CONSTANT) 1456 159, // [4][9] - rs: BYTE_LOAD(r,INT_CONSTANT) 1457 64, // [4][10] - rs: BYTE_LOAD(r,r) 1458 161, // [4][11] - rs: SHORT_LOAD(r,INT_CONSTANT) 1459 66, // [4][12] - rs: SHORT_LOAD(r,r) 1460 167, // [4][13] - rs: INT_LOAD(r,INT_CONSTANT) 1461 168, // [4][14] - rs: INT_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 1462 70, // [4][15] - rs: INT_LOAD(r,r) 1463 236, // [4][16] - rs: INT_LOAD(REF_ADD(r,r),INT_CONSTANT) 1464 203, // [4][17] - rs: INT_LOAD(REF_ADD(r,INT_CONSTANT),INT_CONSTANT) 1465 }, 1466 { // rz_NT 1467 0, // [5][0] 1468 6, // [5][1] - rz: rp 1469 133, // [5][2] - rz: INT_SHL(r,INT_CONSTANT) 1470 50, // [5][3] - rz: INT_SHL(r,r) 1471 195, // [5][4] - rz: INT_SHL(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 1472 52, // [5][5] - rz: INT_USHR(r,r) 1473 }, 1474 { // rp_NT 1475 0, // [6][0] 1476 196, // [6][1] - rp: INT_SHR(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 1477 135, // [6][2] - rp: INT_USHR(r,INT_CONSTANT) 1478 197, // [6][3] - rp: INT_USHR(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 1479 198, // [6][4] - rp: INT_USHR(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 1480 199, // [6][5] - rp: INT_USHR(INT_SHL(r,INT_CONSTANT),INT_CONSTANT) 1481 137, // [6][6] - rp: REF_AND(r,INT_CONSTANT) 1482 200, // [6][7] - rp: REF_AND(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 1483 201, // [6][8] - rp: REF_AND(INT_USHR(r,INT_CONSTANT),REF_MOVE(INT_CONSTANT)) 1484 146, // [6][9] - rp: INT_2USHORT(r) 1485 235, // [6][10] - rp: REF_AND(BYTE_LOAD(r,r),INT_CONSTANT) 1486 202, // [6][11] - rp: REF_AND(BYTE_LOAD(r,INT_CONSTANT),INT_CONSTANT) 1487 160, // [6][12] - rp: UBYTE_LOAD(r,INT_CONSTANT) 1488 65, // [6][13] - rp: UBYTE_LOAD(r,r) 1489 162, // [6][14] - rp: USHORT_LOAD(r,INT_CONSTANT) 1490 67, // [6][15] - rp: USHORT_LOAD(r,r) 1491 }, 1492 { // any_NT 1493 0, // [7][0] 1494 9, // [7][1] - any: NULL 1495 7, // [7][2] - any: r 1496 10, // [7][3] - any: ADDRESS_CONSTANT 1497 11, // [7][4] - any: INT_CONSTANT 1498 12, // [7][5] - any: LONG_CONSTANT 1499 39, // [7][6] - any: OTHER_OPERAND(any,any) 1500 }, 1501 { // boolcmp_NT 1502 0, // [8][0] 1503 115, // [8][1] - boolcmp: BOOLEAN_CMP_INT(r,INT_CONSTANT) 1504 42, // [8][2] - boolcmp: BOOLEAN_CMP_INT(r,r) 1505 117, // [8][3] - boolcmp: BOOLEAN_CMP_ADDR(r,INT_CONSTANT) 1506 44, // [8][4] - boolcmp: BOOLEAN_CMP_ADDR(r,r) 1507 118, // [8][5] - boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 1508 119, // [8][6] - boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 1509 120, // [8][7] - boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 1510 121, // [8][8] - boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 1511 }, 1512 }; 1513 1514 /** 1515 * Create closure for r 1516 * @param p the node 1517 * @param c the cost 1518 */ 1519 @Inline 1520 private static void closure_r(AbstractBURS_TreeNode p, int c) { 1521 if(BURS.DEBUG) trace(p, 7, c + 0, p.getCost(7) /* any */); 1522 if (c < p.getCost(7) /* any */) { 1523 p.setCost(7 /* any */, (char)(c)); 1524 p.writePacked(0, 0x8FFFFFFF, 0x20000000); // p.any = 2 1525 } 1526 if(BURS.DEBUG) trace(p, 1, c + 0, p.getCost(1) /* stm */); 1527 if (c < p.getCost(1) /* stm */) { 1528 p.setCost(1 /* stm */, (char)(c)); 1529 p.writePacked(0, 0xFFFFFF80, 0x1); // p.stm = 1 1530 } 1531 } 1532 1533 /** 1534 * Create closure for czr 1535 * @param p the node 1536 * @param c the cost 1537 */ 1538 @Inline 1539 private static void closure_czr(AbstractBURS_TreeNode p, int c) { 1540 if(BURS.DEBUG) trace(p, 2, c + 0, p.getCost(2) /* r */); 1541 if (c < p.getCost(2) /* r */) { 1542 p.setCost(2 /* r */, (char)(c)); 1543 p.writePacked(0, 0xFFFFC07F, 0x100); // p.r = 2 1544 closure_r(p, c); 1545 } 1546 } 1547 1548 /** 1549 * Create closure for rs 1550 * @param p the node 1551 * @param c the cost 1552 */ 1553 @Inline 1554 private static void closure_rs(AbstractBURS_TreeNode p, int c) { 1555 if(BURS.DEBUG) trace(p, 3, c + 0, p.getCost(2) /* r */); 1556 if (c < p.getCost(2) /* r */) { 1557 p.setCost(2 /* r */, (char)(c)); 1558 p.writePacked(0, 0xFFFFC07F, 0x180); // p.r = 3 1559 closure_r(p, c); 1560 } 1561 } 1562 1563 /** 1564 * Create closure for rz 1565 * @param p the node 1566 * @param c the cost 1567 */ 1568 @Inline 1569 private static void closure_rz(AbstractBURS_TreeNode p, int c) { 1570 if(BURS.DEBUG) trace(p, 4, c + 0, p.getCost(2) /* r */); 1571 if (c < p.getCost(2) /* r */) { 1572 p.setCost(2 /* r */, (char)(c)); 1573 p.writePacked(0, 0xFFFFC07F, 0x200); // p.r = 4 1574 closure_r(p, c); 1575 } 1576 } 1577 1578 /** 1579 * Create closure for rp 1580 * @param p the node 1581 * @param c the cost 1582 */ 1583 @Inline 1584 private static void closure_rp(AbstractBURS_TreeNode p, int c) { 1585 if(BURS.DEBUG) trace(p, 6, c + 0, p.getCost(5) /* rz */); 1586 if (c < p.getCost(5) /* rz */) { 1587 p.setCost(5 /* rz */, (char)(c)); 1588 p.writePacked(0, 0xFF1FFFFF, 0x200000); // p.rz = 1 1589 closure_rz(p, c); 1590 } 1591 if(BURS.DEBUG) trace(p, 5, c + 0, p.getCost(4) /* rs */); 1592 if (c < p.getCost(4) /* rs */) { 1593 p.setCost(4 /* rs */, (char)(c)); 1594 p.writePacked(0, 0xFFE0FFFF, 0x10000); // p.rs = 1 1595 closure_rs(p, c); 1596 } 1597 } 1598 1599 /** 1600 /** Recursively labels the tree/ 1601 * @param p node to label 1602 */ 1603 public static void label(AbstractBURS_TreeNode p) { 1604 switch (p.getOpcode()) { 1605 case GET_CAUGHT_EXCEPTION_opcode: 1606 label_GET_CAUGHT_EXCEPTION(p); 1607 break; 1608 case SET_CAUGHT_EXCEPTION_opcode: 1609 label_SET_CAUGHT_EXCEPTION(p); 1610 break; 1611 case IG_PATCH_POINT_opcode: 1612 label_IG_PATCH_POINT(p); 1613 break; 1614 case INT_IFCMP_opcode: 1615 label_INT_IFCMP(p); 1616 break; 1617 case INT_IFCMP2_opcode: 1618 label_INT_IFCMP2(p); 1619 break; 1620 case LONG_IFCMP_opcode: 1621 label_LONG_IFCMP(p); 1622 break; 1623 case FLOAT_IFCMP_opcode: 1624 label_FLOAT_IFCMP(p); 1625 break; 1626 case DOUBLE_IFCMP_opcode: 1627 label_DOUBLE_IFCMP(p); 1628 break; 1629 case UNINT_BEGIN_opcode: 1630 label_UNINT_BEGIN(p); 1631 break; 1632 case UNINT_END_opcode: 1633 label_UNINT_END(p); 1634 break; 1635 case FENCE_opcode: 1636 label_FENCE(p); 1637 break; 1638 case READ_CEILING_opcode: 1639 label_READ_CEILING(p); 1640 break; 1641 case WRITE_FLOOR_opcode: 1642 label_WRITE_FLOOR(p); 1643 break; 1644 case NOP_opcode: 1645 label_NOP(p); 1646 break; 1647 case LONG_MOVE_opcode: 1648 label_LONG_MOVE(p); 1649 break; 1650 case FLOAT_MOVE_opcode: 1651 label_FLOAT_MOVE(p); 1652 break; 1653 case DOUBLE_MOVE_opcode: 1654 label_DOUBLE_MOVE(p); 1655 break; 1656 case REF_MOVE_opcode: 1657 label_REF_MOVE(p); 1658 break; 1659 case GUARD_MOVE_opcode: 1660 label_GUARD_MOVE(p); 1661 break; 1662 case GUARD_COMBINE_opcode: 1663 label_GUARD_COMBINE(p); 1664 break; 1665 case REF_ADD_opcode: 1666 label_REF_ADD(p); 1667 break; 1668 case LONG_ADD_opcode: 1669 label_LONG_ADD(p); 1670 break; 1671 case FLOAT_ADD_opcode: 1672 label_FLOAT_ADD(p); 1673 break; 1674 case DOUBLE_ADD_opcode: 1675 label_DOUBLE_ADD(p); 1676 break; 1677 case REF_SUB_opcode: 1678 label_REF_SUB(p); 1679 break; 1680 case LONG_SUB_opcode: 1681 label_LONG_SUB(p); 1682 break; 1683 case FLOAT_SUB_opcode: 1684 label_FLOAT_SUB(p); 1685 break; 1686 case DOUBLE_SUB_opcode: 1687 label_DOUBLE_SUB(p); 1688 break; 1689 case INT_MUL_opcode: 1690 label_INT_MUL(p); 1691 break; 1692 case LONG_MUL_opcode: 1693 label_LONG_MUL(p); 1694 break; 1695 case FLOAT_MUL_opcode: 1696 label_FLOAT_MUL(p); 1697 break; 1698 case DOUBLE_MUL_opcode: 1699 label_DOUBLE_MUL(p); 1700 break; 1701 case INT_DIV_opcode: 1702 label_INT_DIV(p); 1703 break; 1704 case FLOAT_DIV_opcode: 1705 label_FLOAT_DIV(p); 1706 break; 1707 case DOUBLE_DIV_opcode: 1708 label_DOUBLE_DIV(p); 1709 break; 1710 case INT_REM_opcode: 1711 label_INT_REM(p); 1712 break; 1713 case REF_NEG_opcode: 1714 label_REF_NEG(p); 1715 break; 1716 case LONG_NEG_opcode: 1717 label_LONG_NEG(p); 1718 break; 1719 case FLOAT_NEG_opcode: 1720 label_FLOAT_NEG(p); 1721 break; 1722 case DOUBLE_NEG_opcode: 1723 label_DOUBLE_NEG(p); 1724 break; 1725 case FLOAT_SQRT_opcode: 1726 label_FLOAT_SQRT(p); 1727 break; 1728 case DOUBLE_SQRT_opcode: 1729 label_DOUBLE_SQRT(p); 1730 break; 1731 case INT_SHL_opcode: 1732 label_INT_SHL(p); 1733 break; 1734 case LONG_SHL_opcode: 1735 label_LONG_SHL(p); 1736 break; 1737 case INT_SHR_opcode: 1738 label_INT_SHR(p); 1739 break; 1740 case LONG_SHR_opcode: 1741 label_LONG_SHR(p); 1742 break; 1743 case INT_USHR_opcode: 1744 label_INT_USHR(p); 1745 break; 1746 case LONG_USHR_opcode: 1747 label_LONG_USHR(p); 1748 break; 1749 case REF_AND_opcode: 1750 label_REF_AND(p); 1751 break; 1752 case LONG_AND_opcode: 1753 label_LONG_AND(p); 1754 break; 1755 case REF_OR_opcode: 1756 label_REF_OR(p); 1757 break; 1758 case LONG_OR_opcode: 1759 label_LONG_OR(p); 1760 break; 1761 case REF_XOR_opcode: 1762 label_REF_XOR(p); 1763 break; 1764 case REF_NOT_opcode: 1765 label_REF_NOT(p); 1766 break; 1767 case LONG_NOT_opcode: 1768 label_LONG_NOT(p); 1769 break; 1770 case LONG_XOR_opcode: 1771 label_LONG_XOR(p); 1772 break; 1773 case INT_2LONG_opcode: 1774 label_INT_2LONG(p); 1775 break; 1776 case INT_2FLOAT_opcode: 1777 label_INT_2FLOAT(p); 1778 break; 1779 case INT_2DOUBLE_opcode: 1780 label_INT_2DOUBLE(p); 1781 break; 1782 case LONG_2INT_opcode: 1783 label_LONG_2INT(p); 1784 break; 1785 case FLOAT_2INT_opcode: 1786 label_FLOAT_2INT(p); 1787 break; 1788 case FLOAT_2DOUBLE_opcode: 1789 label_FLOAT_2DOUBLE(p); 1790 break; 1791 case DOUBLE_2INT_opcode: 1792 label_DOUBLE_2INT(p); 1793 break; 1794 case DOUBLE_2FLOAT_opcode: 1795 label_DOUBLE_2FLOAT(p); 1796 break; 1797 case INT_2BYTE_opcode: 1798 label_INT_2BYTE(p); 1799 break; 1800 case INT_2USHORT_opcode: 1801 label_INT_2USHORT(p); 1802 break; 1803 case INT_2SHORT_opcode: 1804 label_INT_2SHORT(p); 1805 break; 1806 case LONG_CMP_opcode: 1807 label_LONG_CMP(p); 1808 break; 1809 case FLOAT_CMPL_opcode: 1810 label_FLOAT_CMPL(p); 1811 break; 1812 case FLOAT_CMPG_opcode: 1813 label_FLOAT_CMPG(p); 1814 break; 1815 case DOUBLE_CMPL_opcode: 1816 label_DOUBLE_CMPL(p); 1817 break; 1818 case DOUBLE_CMPG_opcode: 1819 label_DOUBLE_CMPG(p); 1820 break; 1821 case RETURN_opcode: 1822 label_RETURN(p); 1823 break; 1824 case NULL_CHECK_opcode: 1825 label_NULL_CHECK(p); 1826 break; 1827 case GOTO_opcode: 1828 label_GOTO(p); 1829 break; 1830 case BOOLEAN_NOT_opcode: 1831 label_BOOLEAN_NOT(p); 1832 break; 1833 case BOOLEAN_CMP_INT_opcode: 1834 label_BOOLEAN_CMP_INT(p); 1835 break; 1836 case BOOLEAN_CMP_ADDR_opcode: 1837 label_BOOLEAN_CMP_ADDR(p); 1838 break; 1839 case BYTE_LOAD_opcode: 1840 label_BYTE_LOAD(p); 1841 break; 1842 case UBYTE_LOAD_opcode: 1843 label_UBYTE_LOAD(p); 1844 break; 1845 case SHORT_LOAD_opcode: 1846 label_SHORT_LOAD(p); 1847 break; 1848 case USHORT_LOAD_opcode: 1849 label_USHORT_LOAD(p); 1850 break; 1851 case INT_LOAD_opcode: 1852 label_INT_LOAD(p); 1853 break; 1854 case LONG_LOAD_opcode: 1855 label_LONG_LOAD(p); 1856 break; 1857 case FLOAT_LOAD_opcode: 1858 label_FLOAT_LOAD(p); 1859 break; 1860 case DOUBLE_LOAD_opcode: 1861 label_DOUBLE_LOAD(p); 1862 break; 1863 case BYTE_STORE_opcode: 1864 label_BYTE_STORE(p); 1865 break; 1866 case SHORT_STORE_opcode: 1867 label_SHORT_STORE(p); 1868 break; 1869 case INT_STORE_opcode: 1870 label_INT_STORE(p); 1871 break; 1872 case LONG_STORE_opcode: 1873 label_LONG_STORE(p); 1874 break; 1875 case FLOAT_STORE_opcode: 1876 label_FLOAT_STORE(p); 1877 break; 1878 case DOUBLE_STORE_opcode: 1879 label_DOUBLE_STORE(p); 1880 break; 1881 case PREPARE_INT_opcode: 1882 label_PREPARE_INT(p); 1883 break; 1884 case PREPARE_ADDR_opcode: 1885 label_PREPARE_ADDR(p); 1886 break; 1887 case PREPARE_LONG_opcode: 1888 label_PREPARE_LONG(p); 1889 break; 1890 case ATTEMPT_INT_opcode: 1891 label_ATTEMPT_INT(p); 1892 break; 1893 case ATTEMPT_ADDR_opcode: 1894 label_ATTEMPT_ADDR(p); 1895 break; 1896 case ATTEMPT_LONG_opcode: 1897 label_ATTEMPT_LONG(p); 1898 break; 1899 case CALL_opcode: 1900 label_CALL(p); 1901 break; 1902 case SYSCALL_opcode: 1903 label_SYSCALL(p); 1904 break; 1905 case YIELDPOINT_PROLOGUE_opcode: 1906 label_YIELDPOINT_PROLOGUE(p); 1907 break; 1908 case YIELDPOINT_EPILOGUE_opcode: 1909 label_YIELDPOINT_EPILOGUE(p); 1910 break; 1911 case YIELDPOINT_BACKEDGE_opcode: 1912 label_YIELDPOINT_BACKEDGE(p); 1913 break; 1914 case YIELDPOINT_OSR_opcode: 1915 label_YIELDPOINT_OSR(p); 1916 break; 1917 case IR_PROLOGUE_opcode: 1918 label_IR_PROLOGUE(p); 1919 break; 1920 case RESOLVE_opcode: 1921 label_RESOLVE(p); 1922 break; 1923 case GET_TIME_BASE_opcode: 1924 label_GET_TIME_BASE(p); 1925 break; 1926 case TRAP_IF_opcode: 1927 label_TRAP_IF(p); 1928 break; 1929 case TRAP_opcode: 1930 label_TRAP(p); 1931 break; 1932 case FLOAT_AS_INT_BITS_opcode: 1933 label_FLOAT_AS_INT_BITS(p); 1934 break; 1935 case INT_BITS_AS_FLOAT_opcode: 1936 label_INT_BITS_AS_FLOAT(p); 1937 break; 1938 case DOUBLE_AS_LONG_BITS_opcode: 1939 label_DOUBLE_AS_LONG_BITS(p); 1940 break; 1941 case LONG_BITS_AS_DOUBLE_opcode: 1942 label_LONG_BITS_AS_DOUBLE(p); 1943 break; 1944 case LOWTABLESWITCH_opcode: 1945 label_LOWTABLESWITCH(p); 1946 break; 1947 case ADDRESS_CONSTANT_opcode: 1948 label_ADDRESS_CONSTANT(p); 1949 break; 1950 case INT_CONSTANT_opcode: 1951 label_INT_CONSTANT(p); 1952 break; 1953 case LONG_CONSTANT_opcode: 1954 label_LONG_CONSTANT(p); 1955 break; 1956 case REGISTER_opcode: 1957 label_REGISTER(p); 1958 break; 1959 case OTHER_OPERAND_opcode: 1960 label_OTHER_OPERAND(p); 1961 break; 1962 case NULL_opcode: 1963 label_NULL(p); 1964 break; 1965 case BRANCH_TARGET_opcode: 1966 label_BRANCH_TARGET(p); 1967 break; 1968 case DCBF_opcode: 1969 label_DCBF(p); 1970 break; 1971 case DCBST_opcode: 1972 label_DCBST(p); 1973 break; 1974 case DCBT_opcode: 1975 label_DCBT(p); 1976 break; 1977 case DCBTST_opcode: 1978 label_DCBTST(p); 1979 break; 1980 case DCBZ_opcode: 1981 label_DCBZ(p); 1982 break; 1983 case DCBZL_opcode: 1984 label_DCBZL(p); 1985 break; 1986 case ICBI_opcode: 1987 label_ICBI(p); 1988 break; 1989 default: 1990 throw new OptimizingCompilerException("BURS","terminal not in grammar:", 1991 p.toString()); 1992 } 1993 } 1994 1995 /** 1996 * Labels GET_CAUGHT_EXCEPTION tree node 1997 * @param p node to label 1998 */ 1999 private static void label_GET_CAUGHT_EXCEPTION(AbstractBURS_TreeNode p) { 2000 p.initCost(); 2001 // r: GET_CAUGHT_EXCEPTION 2002 if(BURS.DEBUG) trace(p, 23, 11 + 0, p.getCost(2) /* r */); 2003 if (11 < p.getCost(2) /* r */) { 2004 p.setCost(2 /* r */, (char)(11)); 2005 p.writePacked(0, 0xFFFFC07F, 0x380); // p.r = 7 2006 closure_r(p, 11); 2007 } 2008 } 2009 2010 /** 2011 * Labels SET_CAUGHT_EXCEPTION tree node 2012 * @param p node to label 2013 */ 2014 private static void label_SET_CAUGHT_EXCEPTION(AbstractBURS_TreeNode p) { 2015 p.initCost(); 2016 AbstractBURS_TreeNode lchild; 2017 lchild = p.getChild1(); 2018 label(lchild); 2019 int c; 2020 // stm: SET_CAUGHT_EXCEPTION(r) 2021 c = STATE(lchild).getCost(2 /* r */) + 11; 2022 if(BURS.DEBUG) trace(p, 103, c + 0, p.getCost(1) /* stm */); 2023 if (c < p.getCost(1) /* stm */) { 2024 p.setCost(1 /* stm */, (char)(c)); 2025 p.writePacked(0, 0xFFFFFF80, 0xC); // p.stm = 12 2026 } 2027 } 2028 2029 /** 2030 * Labels IG_PATCH_POINT tree node 2031 * @param p node to label 2032 */ 2033 private static void label_IG_PATCH_POINT(AbstractBURS_TreeNode p) { 2034 p.initCost(); 2035 // stm: IG_PATCH_POINT 2036 if(BURS.DEBUG) trace(p, 14, 10 + 0, p.getCost(1) /* stm */); 2037 if (10 < p.getCost(1) /* stm */) { 2038 p.setCost(1 /* stm */, (char)(10)); 2039 p.writePacked(0, 0xFFFFFF80, 0x3); // p.stm = 3 2040 } 2041 } 2042 2043 /** 2044 * Labels INT_IFCMP tree node 2045 * @param p node to label 2046 */ 2047 private static void label_INT_IFCMP(AbstractBURS_TreeNode p) { 2048 p.initCost(); 2049 AbstractBURS_TreeNode lchild, rchild; 2050 lchild = p.getChild1(); 2051 rchild = p.getChild2(); 2052 label(lchild); 2053 label(rchild); 2054 int c; 2055 // stm: INT_IFCMP(r,r) 2056 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 20; 2057 if(BURS.DEBUG) trace(p, 71, c + 0, p.getCost(1) /* stm */); 2058 if (c < p.getCost(1) /* stm */) { 2059 p.setCost(1 /* stm */, (char)(c)); 2060 p.writePacked(0, 0xFFFFFF80, 0x2F); // p.stm = 47 2061 } 2062 if ( // stm: INT_IFCMP(r,INT_CONSTANT) 2063 rchild.getOpcode() == INT_CONSTANT_opcode 2064 ) { 2065 c = STATE(lchild).getCost(2 /* r */) + 20; 2066 if(BURS.DEBUG) trace(p, 169, c + 0, p.getCost(1) /* stm */); 2067 if (c < p.getCost(1) /* stm */) { 2068 p.setCost(1 /* stm */, (char)(c)); 2069 p.writePacked(0, 0xFFFFFF80, 0x30); // p.stm = 48 2070 } 2071 } 2072 if ( // stm: INT_IFCMP(INT_2BYTE(r),INT_CONSTANT) 2073 lchild.getOpcode() == INT_2BYTE_opcode && 2074 rchild.getOpcode() == INT_CONSTANT_opcode 2075 ) { 2076 c = STATE(lchild.getChild1()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2077 if(BURS.DEBUG) trace(p, 204, c + 0, p.getCost(1) /* stm */); 2078 if (c < p.getCost(1) /* stm */) { 2079 p.setCost(1 /* stm */, (char)(c)); 2080 p.writePacked(0, 0xFFFFFF80, 0x31); // p.stm = 49 2081 } 2082 } 2083 if ( // stm: INT_IFCMP(INT_2SHORT(r),INT_CONSTANT) 2084 lchild.getOpcode() == INT_2SHORT_opcode && 2085 rchild.getOpcode() == INT_CONSTANT_opcode 2086 ) { 2087 c = STATE(lchild.getChild1()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2088 if(BURS.DEBUG) trace(p, 205, c + 0, p.getCost(1) /* stm */); 2089 if (c < p.getCost(1) /* stm */) { 2090 p.setCost(1 /* stm */, (char)(c)); 2091 p.writePacked(0, 0xFFFFFF80, 0x32); // p.stm = 50 2092 } 2093 } 2094 if ( // stm: INT_IFCMP(INT_USHR(r,r),INT_CONSTANT) 2095 lchild.getOpcode() == INT_USHR_opcode && 2096 rchild.getOpcode() == INT_CONSTANT_opcode 2097 ) { 2098 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2099 if(BURS.DEBUG) trace(p, 237, c + 0, p.getCost(1) /* stm */); 2100 if (c < p.getCost(1) /* stm */) { 2101 p.setCost(1 /* stm */, (char)(c)); 2102 p.writePacked(0, 0xFFFFFF80, 0x33); // p.stm = 51 2103 } 2104 } 2105 if ( // stm: INT_IFCMP(INT_SHL(r,r),INT_CONSTANT) 2106 lchild.getOpcode() == INT_SHL_opcode && 2107 rchild.getOpcode() == INT_CONSTANT_opcode 2108 ) { 2109 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2110 if(BURS.DEBUG) trace(p, 238, c + 0, p.getCost(1) /* stm */); 2111 if (c < p.getCost(1) /* stm */) { 2112 p.setCost(1 /* stm */, (char)(c)); 2113 p.writePacked(0, 0xFFFFFF80, 0x34); // p.stm = 52 2114 } 2115 } 2116 if ( // stm: INT_IFCMP(INT_SHR(r,r),INT_CONSTANT) 2117 lchild.getOpcode() == INT_SHR_opcode && 2118 rchild.getOpcode() == INT_CONSTANT_opcode 2119 ) { 2120 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2121 if(BURS.DEBUG) trace(p, 239, c + 0, p.getCost(1) /* stm */); 2122 if (c < p.getCost(1) /* stm */) { 2123 p.setCost(1 /* stm */, (char)(c)); 2124 p.writePacked(0, 0xFFFFFF80, 0x35); // p.stm = 53 2125 } 2126 } 2127 if ( // stm: INT_IFCMP(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 2128 lchild.getOpcode() == INT_USHR_opcode && 2129 lchild.getChild2().getOpcode() == INT_CONSTANT_opcode && 2130 rchild.getOpcode() == INT_CONSTANT_opcode 2131 ) { 2132 c = STATE(lchild.getChild1()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2133 if(BURS.DEBUG) trace(p, 206, c + 0, p.getCost(1) /* stm */); 2134 if (c < p.getCost(1) /* stm */) { 2135 p.setCost(1 /* stm */, (char)(c)); 2136 p.writePacked(0, 0xFFFFFF80, 0x36); // p.stm = 54 2137 } 2138 } 2139 if ( // stm: INT_IFCMP(INT_SHL(r,INT_CONSTANT),INT_CONSTANT) 2140 lchild.getOpcode() == INT_SHL_opcode && 2141 lchild.getChild2().getOpcode() == INT_CONSTANT_opcode && 2142 rchild.getOpcode() == INT_CONSTANT_opcode 2143 ) { 2144 c = STATE(lchild.getChild1()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2145 if(BURS.DEBUG) trace(p, 207, c + 0, p.getCost(1) /* stm */); 2146 if (c < p.getCost(1) /* stm */) { 2147 p.setCost(1 /* stm */, (char)(c)); 2148 p.writePacked(0, 0xFFFFFF80, 0x37); // p.stm = 55 2149 } 2150 } 2151 if ( // stm: INT_IFCMP(INT_SHR(r,INT_CONSTANT),INT_CONSTANT) 2152 lchild.getOpcode() == INT_SHR_opcode && 2153 lchild.getChild2().getOpcode() == INT_CONSTANT_opcode && 2154 rchild.getOpcode() == INT_CONSTANT_opcode 2155 ) { 2156 c = STATE(lchild.getChild1()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2157 if(BURS.DEBUG) trace(p, 208, c + 0, p.getCost(1) /* stm */); 2158 if (c < p.getCost(1) /* stm */) { 2159 p.setCost(1 /* stm */, (char)(c)); 2160 p.writePacked(0, 0xFFFFFF80, 0x38); // p.stm = 56 2161 } 2162 } 2163 if ( // stm: INT_IFCMP(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 2164 lchild.getOpcode() == REF_AND_opcode && 2165 lchild.getChild2().getOpcode() == INT_CONSTANT_opcode && 2166 rchild.getOpcode() == INT_CONSTANT_opcode 2167 ) { 2168 c = STATE(lchild.getChild1()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2169 if(BURS.DEBUG) trace(p, 209, c + 0, p.getCost(1) /* stm */); 2170 if (c < p.getCost(1) /* stm */) { 2171 p.setCost(1 /* stm */, (char)(c)); 2172 p.writePacked(0, 0xFFFFFF80, 0x39); // p.stm = 57 2173 } 2174 } 2175 if ( // stm: INT_IFCMP(boolcmp,INT_CONSTANT) 2176 rchild.getOpcode() == INT_CONSTANT_opcode 2177 ) { 2178 c = STATE(lchild).getCost(8 /* boolcmp */) + (VR(p) == 0 && IfCmp.getCond(P(p)).isNOT_EQUAL()?20:INFINITE); 2179 if(BURS.DEBUG) trace(p, 170, c + 0, p.getCost(1) /* stm */); 2180 if (c < p.getCost(1) /* stm */) { 2181 p.setCost(1 /* stm */, (char)(c)); 2182 p.writePacked(0, 0xFFFFFF80, 0x3A); // p.stm = 58 2183 } 2184 } 2185 if ( // stm: INT_IFCMP(boolcmp,INT_CONSTANT) 2186 rchild.getOpcode() == INT_CONSTANT_opcode 2187 ) { 2188 c = STATE(lchild).getCost(8 /* boolcmp */) + (VR(p) == 0 && IfCmp.getCond(P(p)).isEQUAL()?20:INFINITE); 2189 if(BURS.DEBUG) trace(p, 171, c + 0, p.getCost(1) /* stm */); 2190 if (c < p.getCost(1) /* stm */) { 2191 p.setCost(1 /* stm */, (char)(c)); 2192 p.writePacked(0, 0xFFFFFF80, 0x3B); // p.stm = 59 2193 } 2194 } 2195 if ( // stm: INT_IFCMP(boolcmp,INT_CONSTANT) 2196 rchild.getOpcode() == INT_CONSTANT_opcode 2197 ) { 2198 c = STATE(lchild).getCost(8 /* boolcmp */) + (VR(p) == 1 && IfCmp.getCond(P(p)).isEQUAL()?20:INFINITE); 2199 if(BURS.DEBUG) trace(p, 172, c + 0, p.getCost(1) /* stm */); 2200 if (c < p.getCost(1) /* stm */) { 2201 p.setCost(1 /* stm */, (char)(c)); 2202 p.writePacked(0, 0xFFFFFF80, 0x3C); // p.stm = 60 2203 } 2204 } 2205 if ( // stm: INT_IFCMP(boolcmp,INT_CONSTANT) 2206 rchild.getOpcode() == INT_CONSTANT_opcode 2207 ) { 2208 c = STATE(lchild).getCost(8 /* boolcmp */) + (VR(p) == 1 && (IfCmp.getCond(P(p)).isNOT_EQUAL())?26:INFINITE); 2209 if(BURS.DEBUG) trace(p, 173, c + 0, p.getCost(1) /* stm */); 2210 if (c < p.getCost(1) /* stm */) { 2211 p.setCost(1 /* stm */, (char)(c)); 2212 p.writePacked(0, 0xFFFFFF80, 0x3D); // p.stm = 61 2213 } 2214 } 2215 if ( // stm: INT_IFCMP(ATTEMPT_INT(r,r),INT_CONSTANT) 2216 lchild.getOpcode() == ATTEMPT_INT_opcode && 2217 rchild.getOpcode() == INT_CONSTANT_opcode 2218 ) { 2219 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2220 if(BURS.DEBUG) trace(p, 240, c + 0, p.getCost(1) /* stm */); 2221 if (c < p.getCost(1) /* stm */) { 2222 p.setCost(1 /* stm */, (char)(c)); 2223 p.writePacked(0, 0xFFFFFF80, 0x4C); // p.stm = 76 2224 } 2225 } 2226 if ( // stm: INT_IFCMP(ATTEMPT_ADDR(r,r),INT_CONSTANT) 2227 lchild.getOpcode() == ATTEMPT_ADDR_opcode && 2228 rchild.getOpcode() == INT_CONSTANT_opcode 2229 ) { 2230 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2231 if(BURS.DEBUG) trace(p, 241, c + 0, p.getCost(1) /* stm */); 2232 if (c < p.getCost(1) /* stm */) { 2233 p.setCost(1 /* stm */, (char)(c)); 2234 p.writePacked(0, 0xFFFFFF80, 0x4D); // p.stm = 77 2235 } 2236 } 2237 if ( // stm: INT_IFCMP(REF_NEG(r),INT_CONSTANT) 2238 lchild.getOpcode() == REF_NEG_opcode && 2239 rchild.getOpcode() == INT_CONSTANT_opcode 2240 ) { 2241 c = STATE(lchild.getChild1()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2242 if(BURS.DEBUG) trace(p, 210, c + 0, p.getCost(1) /* stm */); 2243 if (c < p.getCost(1) /* stm */) { 2244 p.setCost(1 /* stm */, (char)(c)); 2245 p.writePacked(0, 0xFFFFFF80, 0x4E); // p.stm = 78 2246 } 2247 } 2248 if ( // stm: INT_IFCMP(REF_NOT(r),INT_CONSTANT) 2249 lchild.getOpcode() == REF_NOT_opcode && 2250 rchild.getOpcode() == INT_CONSTANT_opcode 2251 ) { 2252 c = STATE(lchild.getChild1()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2253 if(BURS.DEBUG) trace(p, 211, c + 0, p.getCost(1) /* stm */); 2254 if (c < p.getCost(1) /* stm */) { 2255 p.setCost(1 /* stm */, (char)(c)); 2256 p.writePacked(0, 0xFFFFFF80, 0x4F); // p.stm = 79 2257 } 2258 } 2259 if ( // stm: INT_IFCMP(REF_ADD(r,r),INT_CONSTANT) 2260 lchild.getOpcode() == REF_ADD_opcode && 2261 rchild.getOpcode() == INT_CONSTANT_opcode 2262 ) { 2263 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2264 if(BURS.DEBUG) trace(p, 242, c + 0, p.getCost(1) /* stm */); 2265 if (c < p.getCost(1) /* stm */) { 2266 p.setCost(1 /* stm */, (char)(c)); 2267 p.writePacked(0, 0xFFFFFF80, 0x50); // p.stm = 80 2268 } 2269 } 2270 if ( // stm: INT_IFCMP(REF_AND(r,r),INT_CONSTANT) 2271 lchild.getOpcode() == REF_AND_opcode && 2272 rchild.getOpcode() == INT_CONSTANT_opcode 2273 ) { 2274 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2275 if(BURS.DEBUG) trace(p, 243, c + 0, p.getCost(1) /* stm */); 2276 if (c < p.getCost(1) /* stm */) { 2277 p.setCost(1 /* stm */, (char)(c)); 2278 p.writePacked(0, 0xFFFFFF80, 0x51); // p.stm = 81 2279 } 2280 } 2281 if ( // stm: INT_IFCMP(REF_OR(r,r),INT_CONSTANT) 2282 lchild.getOpcode() == REF_OR_opcode && 2283 rchild.getOpcode() == INT_CONSTANT_opcode 2284 ) { 2285 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2286 if(BURS.DEBUG) trace(p, 244, c + 0, p.getCost(1) /* stm */); 2287 if (c < p.getCost(1) /* stm */) { 2288 p.setCost(1 /* stm */, (char)(c)); 2289 p.writePacked(0, 0xFFFFFF80, 0x52); // p.stm = 82 2290 } 2291 } 2292 if ( // stm: INT_IFCMP(REF_XOR(r,r),INT_CONSTANT) 2293 lchild.getOpcode() == REF_XOR_opcode && 2294 rchild.getOpcode() == INT_CONSTANT_opcode 2295 ) { 2296 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2297 if(BURS.DEBUG) trace(p, 245, c + 0, p.getCost(1) /* stm */); 2298 if (c < p.getCost(1) /* stm */) { 2299 p.setCost(1 /* stm */, (char)(c)); 2300 p.writePacked(0, 0xFFFFFF80, 0x53); // p.stm = 83 2301 } 2302 } 2303 if ( // stm: INT_IFCMP(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 2304 lchild.getOpcode() == REF_AND_opcode && 2305 lchild.getChild2().getOpcode() == REF_MOVE_opcode && 2306 lchild.getChild2().getChild1().getOpcode() == INT_CONSTANT_opcode && 2307 rchild.getOpcode() == INT_CONSTANT_opcode 2308 ) { 2309 c = STATE(lchild.getChild1()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))&&U16(IV(Move.getVal(PLR(p))))?20:INFINITE); 2310 if(BURS.DEBUG) trace(p, 212, c + 0, p.getCost(1) /* stm */); 2311 if (c < p.getCost(1) /* stm */) { 2312 p.setCost(1 /* stm */, (char)(c)); 2313 p.writePacked(0, 0xFFFFFF80, 0x54); // p.stm = 84 2314 } 2315 } 2316 if ( // stm: INT_IFCMP(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 2317 lchild.getOpcode() == REF_AND_opcode && 2318 lchild.getChild2().getOpcode() == REF_MOVE_opcode && 2319 lchild.getChild2().getChild1().getOpcode() == INT_CONSTANT_opcode && 2320 rchild.getOpcode() == INT_CONSTANT_opcode 2321 ) { 2322 c = STATE(lchild.getChild1()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))&&MASK(IV(Move.getVal(PLR(p))))?20:INFINITE); 2323 if(BURS.DEBUG) trace(p, 213, c + 0, p.getCost(1) /* stm */); 2324 if (c < p.getCost(1) /* stm */) { 2325 p.setCost(1 /* stm */, (char)(c)); 2326 p.writePacked(0, 0xFFFFFF80, 0x55); // p.stm = 85 2327 } 2328 } 2329 if ( // stm: INT_IFCMP(REF_ADD(r,INT_CONSTANT),INT_CONSTANT) 2330 lchild.getOpcode() == REF_ADD_opcode && 2331 lchild.getChild2().getOpcode() == INT_CONSTANT_opcode && 2332 rchild.getOpcode() == INT_CONSTANT_opcode 2333 ) { 2334 c = STATE(lchild.getChild1()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2335 if(BURS.DEBUG) trace(p, 214, c + 0, p.getCost(1) /* stm */); 2336 if (c < p.getCost(1) /* stm */) { 2337 p.setCost(1 /* stm */, (char)(c)); 2338 p.writePacked(0, 0xFFFFFF80, 0x56); // p.stm = 86 2339 } 2340 } 2341 if ( // stm: INT_IFCMP(REF_AND(r,REF_NOT(r)),INT_CONSTANT) 2342 lchild.getOpcode() == REF_AND_opcode && 2343 lchild.getChild2().getOpcode() == REF_NOT_opcode && 2344 rchild.getOpcode() == INT_CONSTANT_opcode 2345 ) { 2346 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2().getChild1()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2347 if(BURS.DEBUG) trace(p, 268, c + 0, p.getCost(1) /* stm */); 2348 if (c < p.getCost(1) /* stm */) { 2349 p.setCost(1 /* stm */, (char)(c)); 2350 p.writePacked(0, 0xFFFFFF80, 0x57); // p.stm = 87 2351 } 2352 } 2353 if ( // stm: INT_IFCMP(REF_OR(r,REF_NOT(r)),INT_CONSTANT) 2354 lchild.getOpcode() == REF_OR_opcode && 2355 lchild.getChild2().getOpcode() == REF_NOT_opcode && 2356 rchild.getOpcode() == INT_CONSTANT_opcode 2357 ) { 2358 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2().getChild1()).getCost(2 /* r */) + ((!IfCmp.getCond(P(p)).isUNSIGNED())&&ZERO(IfCmp.getVal2(P(p)))?20:INFINITE); 2359 if(BURS.DEBUG) trace(p, 269, c + 0, p.getCost(1) /* stm */); 2360 if (c < p.getCost(1) /* stm */) { 2361 p.setCost(1 /* stm */, (char)(c)); 2362 p.writePacked(0, 0xFFFFFF80, 0x58); // p.stm = 88 2363 } 2364 } 2365 } 2366 2367 /** 2368 * Labels INT_IFCMP2 tree node 2369 * @param p node to label 2370 */ 2371 private static void label_INT_IFCMP2(AbstractBURS_TreeNode p) { 2372 p.initCost(); 2373 AbstractBURS_TreeNode lchild, rchild; 2374 lchild = p.getChild1(); 2375 rchild = p.getChild2(); 2376 label(lchild); 2377 label(rchild); 2378 int c; 2379 // stm: INT_IFCMP2(r,r) 2380 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 20; 2381 if(BURS.DEBUG) trace(p, 72, c + 0, p.getCost(1) /* stm */); 2382 if (c < p.getCost(1) /* stm */) { 2383 p.setCost(1 /* stm */, (char)(c)); 2384 p.writePacked(0, 0xFFFFFF80, 0x3E); // p.stm = 62 2385 } 2386 if ( // stm: INT_IFCMP2(r,INT_CONSTANT) 2387 rchild.getOpcode() == INT_CONSTANT_opcode 2388 ) { 2389 c = STATE(lchild).getCost(2 /* r */) + 20; 2390 if(BURS.DEBUG) trace(p, 174, c + 0, p.getCost(1) /* stm */); 2391 if (c < p.getCost(1) /* stm */) { 2392 p.setCost(1 /* stm */, (char)(c)); 2393 p.writePacked(0, 0xFFFFFF80, 0x3F); // p.stm = 63 2394 } 2395 } 2396 } 2397 2398 /** 2399 * Labels LONG_IFCMP tree node 2400 * @param p node to label 2401 */ 2402 private static void label_LONG_IFCMP(AbstractBURS_TreeNode p) { 2403 p.initCost(); 2404 AbstractBURS_TreeNode lchild, rchild; 2405 lchild = p.getChild1(); 2406 rchild = p.getChild2(); 2407 label(lchild); 2408 label(rchild); 2409 int c; 2410 // stm: LONG_IFCMP(r,r) 2411 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 30; 2412 if(BURS.DEBUG) trace(p, 97, c + 0, p.getCost(1) /* stm */); 2413 if (c < p.getCost(1) /* stm */) { 2414 p.setCost(1 /* stm */, (char)(c)); 2415 p.writePacked(0, 0xFFFFFF80, 0x4B); // p.stm = 75 2416 } 2417 } 2418 2419 /** 2420 * Labels FLOAT_IFCMP tree node 2421 * @param p node to label 2422 */ 2423 private static void label_FLOAT_IFCMP(AbstractBURS_TreeNode p) { 2424 p.initCost(); 2425 AbstractBURS_TreeNode lchild, rchild; 2426 lchild = p.getChild1(); 2427 rchild = p.getChild2(); 2428 label(lchild); 2429 label(rchild); 2430 int c; 2431 // stm: FLOAT_IFCMP(r,r) 2432 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 20; 2433 if(BURS.DEBUG) trace(p, 73, c + 0, p.getCost(1) /* stm */); 2434 if (c < p.getCost(1) /* stm */) { 2435 p.setCost(1 /* stm */, (char)(c)); 2436 p.writePacked(0, 0xFFFFFF80, 0x40); // p.stm = 64 2437 } 2438 } 2439 2440 /** 2441 * Labels DOUBLE_IFCMP tree node 2442 * @param p node to label 2443 */ 2444 private static void label_DOUBLE_IFCMP(AbstractBURS_TreeNode p) { 2445 p.initCost(); 2446 AbstractBURS_TreeNode lchild, rchild; 2447 lchild = p.getChild1(); 2448 rchild = p.getChild2(); 2449 label(lchild); 2450 label(rchild); 2451 int c; 2452 // stm: DOUBLE_IFCMP(r,r) 2453 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 20; 2454 if(BURS.DEBUG) trace(p, 74, c + 0, p.getCost(1) /* stm */); 2455 if (c < p.getCost(1) /* stm */) { 2456 p.setCost(1 /* stm */, (char)(c)); 2457 p.writePacked(0, 0xFFFFFF80, 0x41); // p.stm = 65 2458 } 2459 } 2460 2461 /** 2462 * Labels UNINT_BEGIN tree node 2463 * @param p node to label 2464 */ 2465 private static void label_UNINT_BEGIN(AbstractBURS_TreeNode p) { 2466 p.initCost(); 2467 // stm: UNINT_BEGIN 2468 if(BURS.DEBUG) trace(p, 15, 10 + 0, p.getCost(1) /* stm */); 2469 if (10 < p.getCost(1) /* stm */) { 2470 p.setCost(1 /* stm */, (char)(10)); 2471 p.writePacked(0, 0xFFFFFF80, 0x4); // p.stm = 4 2472 } 2473 } 2474 2475 /** 2476 * Labels UNINT_END tree node 2477 * @param p node to label 2478 */ 2479 private static void label_UNINT_END(AbstractBURS_TreeNode p) { 2480 p.initCost(); 2481 // stm: UNINT_END 2482 if(BURS.DEBUG) trace(p, 16, 10 + 0, p.getCost(1) /* stm */); 2483 if (10 < p.getCost(1) /* stm */) { 2484 p.setCost(1 /* stm */, (char)(10)); 2485 p.writePacked(0, 0xFFFFFF80, 0x5); // p.stm = 5 2486 } 2487 } 2488 2489 /** 2490 * Labels FENCE tree node 2491 * @param p node to label 2492 */ 2493 private static void label_FENCE(AbstractBURS_TreeNode p) { 2494 p.initCost(); 2495 // stm: FENCE 2496 if(BURS.DEBUG) trace(p, 24, 11 + 0, p.getCost(1) /* stm */); 2497 if (11 < p.getCost(1) /* stm */) { 2498 p.setCost(1 /* stm */, (char)(11)); 2499 p.writePacked(0, 0xFFFFFF80, 0xD); // p.stm = 13 2500 } 2501 } 2502 2503 /** 2504 * Labels READ_CEILING tree node 2505 * @param p node to label 2506 */ 2507 private static void label_READ_CEILING(AbstractBURS_TreeNode p) { 2508 p.initCost(); 2509 // stm: READ_CEILING 2510 if(BURS.DEBUG) trace(p, 26, 11 + 0, p.getCost(1) /* stm */); 2511 if (11 < p.getCost(1) /* stm */) { 2512 p.setCost(1 /* stm */, (char)(11)); 2513 p.writePacked(0, 0xFFFFFF80, 0xF); // p.stm = 15 2514 } 2515 } 2516 2517 /** 2518 * Labels WRITE_FLOOR tree node 2519 * @param p node to label 2520 */ 2521 private static void label_WRITE_FLOOR(AbstractBURS_TreeNode p) { 2522 p.initCost(); 2523 // stm: WRITE_FLOOR 2524 if(BURS.DEBUG) trace(p, 25, 11 + 0, p.getCost(1) /* stm */); 2525 if (11 < p.getCost(1) /* stm */) { 2526 p.setCost(1 /* stm */, (char)(11)); 2527 p.writePacked(0, 0xFFFFFF80, 0xE); // p.stm = 14 2528 } 2529 } 2530 2531 /** 2532 * Labels NOP tree node 2533 * @param p node to label 2534 */ 2535 private static void label_NOP(AbstractBURS_TreeNode p) { 2536 p.initCost(); 2537 // stm: NOP 2538 if(BURS.DEBUG) trace(p, 20, 10 + 0, p.getCost(1) /* stm */); 2539 if (10 < p.getCost(1) /* stm */) { 2540 p.setCost(1 /* stm */, (char)(10)); 2541 p.writePacked(0, 0xFFFFFF80, 0xA); // p.stm = 10 2542 } 2543 } 2544 2545 /** 2546 * Labels LONG_MOVE tree node 2547 * @param p node to label 2548 */ 2549 private static void label_LONG_MOVE(AbstractBURS_TreeNode p) { 2550 p.initCost(); 2551 AbstractBURS_TreeNode lchild; 2552 lchild = p.getChild1(); 2553 label(lchild); 2554 int c; 2555 if ( // r: LONG_MOVE(LONG_CONSTANT) 2556 lchild.getOpcode() == LONG_CONSTANT_opcode 2557 ) { 2558 c = 40; 2559 if(BURS.DEBUG) trace(p, 35, c + 0, p.getCost(2) /* r */); 2560 if (c < p.getCost(2) /* r */) { 2561 p.setCost(2 /* r */, (char)(c)); 2562 p.writePacked(0, 0xFFFFC07F, 0x3800); // p.r = 112 2563 closure_r(p, c); 2564 } 2565 } 2566 // r: LONG_MOVE(r) 2567 c = STATE(lchild).getCost(2 /* r */) + 22; 2568 if(BURS.DEBUG) trace(p, 185, c + 0, p.getCost(2) /* r */); 2569 if (c < p.getCost(2) /* r */) { 2570 p.setCost(2 /* r */, (char)(c)); 2571 p.writePacked(0, 0xFFFFC07F, 0x3880); // p.r = 113 2572 closure_r(p, c); 2573 } 2574 } 2575 2576 /** 2577 * Labels FLOAT_MOVE tree node 2578 * @param p node to label 2579 */ 2580 private static void label_FLOAT_MOVE(AbstractBURS_TreeNode p) { 2581 p.initCost(); 2582 AbstractBURS_TreeNode lchild; 2583 lchild = p.getChild1(); 2584 label(lchild); 2585 int c; 2586 // r: FLOAT_MOVE(r) 2587 c = STATE(lchild).getCost(2 /* r */) + 10; 2588 if(BURS.DEBUG) trace(p, 157, c + 0, p.getCost(2) /* r */); 2589 if (c < p.getCost(2) /* r */) { 2590 p.setCost(2 /* r */, (char)(c)); 2591 p.writePacked(0, 0xFFFFC07F, 0x2600); // p.r = 76 2592 closure_r(p, c); 2593 } 2594 } 2595 2596 /** 2597 * Labels DOUBLE_MOVE tree node 2598 * @param p node to label 2599 */ 2600 private static void label_DOUBLE_MOVE(AbstractBURS_TreeNode p) { 2601 p.initCost(); 2602 AbstractBURS_TreeNode lchild; 2603 lchild = p.getChild1(); 2604 label(lchild); 2605 int c; 2606 // r: DOUBLE_MOVE(r) 2607 c = STATE(lchild).getCost(2 /* r */) + 10; 2608 if(BURS.DEBUG) trace(p, 158, c + 0, p.getCost(2) /* r */); 2609 if (c < p.getCost(2) /* r */) { 2610 p.setCost(2 /* r */, (char)(c)); 2611 p.writePacked(0, 0xFFFFC07F, 0x2680); // p.r = 77 2612 closure_r(p, c); 2613 } 2614 } 2615 2616 /** 2617 * Labels REF_MOVE tree node 2618 * @param p node to label 2619 */ 2620 private static void label_REF_MOVE(AbstractBURS_TreeNode p) { 2621 p.initCost(); 2622 AbstractBURS_TreeNode lchild; 2623 lchild = p.getChild1(); 2624 label(lchild); 2625 int c; 2626 // r: REF_MOVE(r) 2627 c = STATE(lchild).getCost(2 /* r */) + 11; 2628 if(BURS.DEBUG) trace(p, 156, c + 0, p.getCost(2) /* r */); 2629 if (c < p.getCost(2) /* r */) { 2630 p.setCost(2 /* r */, (char)(c)); 2631 p.writePacked(0, 0xFFFFC07F, 0x2580); // p.r = 75 2632 closure_r(p, c); 2633 } 2634 if ( // rs: REF_MOVE(INT_CONSTANT) 2635 lchild.getOpcode() == INT_CONSTANT_opcode 2636 ) { 2637 c = (SI16(IV(Move.getVal(P(p))))?11:INFINITE); 2638 if(BURS.DEBUG) trace(p, 28, c + 0, p.getCost(4) /* rs */); 2639 if (c < p.getCost(4) /* rs */) { 2640 p.setCost(4 /* rs */, (char)(c)); 2641 p.writePacked(0, 0xFFE0FFFF, 0x60000); // p.rs = 6 2642 closure_rs(p, c); 2643 } 2644 } 2645 if ( // rs: REF_MOVE(INT_CONSTANT) 2646 lchild.getOpcode() == INT_CONSTANT_opcode 2647 ) { 2648 c = (U16(IV(Move.getVal(P(p))))?11:INFINITE); 2649 if(BURS.DEBUG) trace(p, 29, c + 0, p.getCost(4) /* rs */); 2650 if (c < p.getCost(4) /* rs */) { 2651 p.setCost(4 /* rs */, (char)(c)); 2652 p.writePacked(0, 0xFFE0FFFF, 0x70000); // p.rs = 7 2653 closure_rs(p, c); 2654 } 2655 } 2656 if ( // rs: REF_MOVE(INT_CONSTANT) 2657 lchild.getOpcode() == INT_CONSTANT_opcode 2658 ) { 2659 c = 22; 2660 if(BURS.DEBUG) trace(p, 30, c + 0, p.getCost(4) /* rs */); 2661 if (c < p.getCost(4) /* rs */) { 2662 p.setCost(4 /* rs */, (char)(c)); 2663 p.writePacked(0, 0xFFE0FFFF, 0x80000); // p.rs = 8 2664 closure_rs(p, c); 2665 } 2666 } 2667 if ( // r: REF_MOVE(ADDRESS_CONSTANT) 2668 lchild.getOpcode() == ADDRESS_CONSTANT_opcode 2669 ) { 2670 c = (SI16(AV(Move.getVal(P(p))))?11:INFINITE); 2671 if(BURS.DEBUG) trace(p, 36, c + 0, p.getCost(2) /* r */); 2672 if (c < p.getCost(2) /* r */) { 2673 p.setCost(2 /* r */, (char)(c)); 2674 p.writePacked(0, 0xFFFFC07F, 0x3B00); // p.r = 118 2675 closure_r(p, c); 2676 } 2677 } 2678 if ( // r: REF_MOVE(ADDRESS_CONSTANT) 2679 lchild.getOpcode() == ADDRESS_CONSTANT_opcode 2680 ) { 2681 c = (U16(AV(Move.getVal(P(p))))?11:INFINITE); 2682 if(BURS.DEBUG) trace(p, 37, c + 0, p.getCost(2) /* r */); 2683 if (c < p.getCost(2) /* r */) { 2684 p.setCost(2 /* r */, (char)(c)); 2685 p.writePacked(0, 0xFFFFC07F, 0x3B80); // p.r = 119 2686 closure_r(p, c); 2687 } 2688 } 2689 if ( // r: REF_MOVE(ADDRESS_CONSTANT) 2690 lchild.getOpcode() == ADDRESS_CONSTANT_opcode 2691 ) { 2692 c = 22; 2693 if(BURS.DEBUG) trace(p, 38, c + 0, p.getCost(2) /* r */); 2694 if (c < p.getCost(2) /* r */) { 2695 p.setCost(2 /* r */, (char)(c)); 2696 p.writePacked(0, 0xFFFFC07F, 0x3C00); // p.r = 120 2697 closure_r(p, c); 2698 } 2699 } 2700 } 2701 2702 /** 2703 * Labels GUARD_MOVE tree node 2704 * @param p node to label 2705 */ 2706 private static void label_GUARD_MOVE(AbstractBURS_TreeNode p) { 2707 p.initCost(); 2708 // r: GUARD_MOVE 2709 if(BURS.DEBUG) trace(p, 21, 11 + 0, p.getCost(2) /* r */); 2710 if (11 < p.getCost(2) /* r */) { 2711 p.setCost(2 /* r */, (char)(11)); 2712 p.writePacked(0, 0xFFFFC07F, 0x280); // p.r = 5 2713 closure_r(p, 11); 2714 } 2715 } 2716 2717 /** 2718 * Labels GUARD_COMBINE tree node 2719 * @param p node to label 2720 */ 2721 private static void label_GUARD_COMBINE(AbstractBURS_TreeNode p) { 2722 p.initCost(); 2723 // r: GUARD_COMBINE 2724 if(BURS.DEBUG) trace(p, 22, 11 + 0, p.getCost(2) /* r */); 2725 if (11 < p.getCost(2) /* r */) { 2726 p.setCost(2 /* r */, (char)(11)); 2727 p.writePacked(0, 0xFFFFC07F, 0x300); // p.r = 6 2728 closure_r(p, 11); 2729 } 2730 } 2731 2732 /** 2733 * Labels REF_ADD tree node 2734 * @param p node to label 2735 */ 2736 private static void label_REF_ADD(AbstractBURS_TreeNode p) { 2737 p.initCost(); 2738 AbstractBURS_TreeNode lchild, rchild; 2739 lchild = p.getChild1(); 2740 rchild = p.getChild2(); 2741 label(lchild); 2742 label(rchild); 2743 int c; 2744 if ( // r: REF_ADD(r,INT_CONSTANT) 2745 rchild.getOpcode() == INT_CONSTANT_opcode 2746 ) { 2747 c = STATE(lchild).getCost(2 /* r */) + 11; 2748 if(BURS.DEBUG) trace(p, 126, c + 0, p.getCost(2) /* r */); 2749 if (c < p.getCost(2) /* r */) { 2750 p.setCost(2 /* r */, (char)(c)); 2751 p.writePacked(0, 0xFFFFC07F, 0x880); // p.r = 17 2752 closure_r(p, c); 2753 } 2754 } 2755 // r: REF_ADD(r,r) 2756 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 11; 2757 if(BURS.DEBUG) trace(p, 45, c + 0, p.getCost(2) /* r */); 2758 if (c < p.getCost(2) /* r */) { 2759 p.setCost(2 /* r */, (char)(c)); 2760 p.writePacked(0, 0xFFFFC07F, 0x900); // p.r = 18 2761 closure_r(p, c); 2762 } 2763 if ( // r: REF_ADD(r,REF_MOVE(INT_CONSTANT)) 2764 rchild.getOpcode() == REF_MOVE_opcode && 2765 rchild.getChild1().getOpcode() == INT_CONSTANT_opcode 2766 ) { 2767 c = STATE(lchild).getCost(2 /* r */) + 20; 2768 if(BURS.DEBUG) trace(p, 127, c + 0, p.getCost(2) /* r */); 2769 if (c < p.getCost(2) /* r */) { 2770 p.setCost(2 /* r */, (char)(c)); 2771 p.writePacked(0, 0xFFFFC07F, 0x980); // p.r = 19 2772 closure_r(p, c); 2773 } 2774 } 2775 if ( // r: REF_ADD(r,REF_MOVE(INT_CONSTANT)) 2776 rchild.getOpcode() == REF_MOVE_opcode && 2777 rchild.getChild1().getOpcode() == INT_CONSTANT_opcode 2778 ) { 2779 c = STATE(lchild).getCost(2 /* r */) + (U16(IV(Move.getVal(PR(p))))?10:INFINITE); 2780 if(BURS.DEBUG) trace(p, 128, c + 0, p.getCost(2) /* r */); 2781 if (c < p.getCost(2) /* r */) { 2782 p.setCost(2 /* r */, (char)(c)); 2783 p.writePacked(0, 0xFFFFC07F, 0xA00); // p.r = 20 2784 closure_r(p, c); 2785 } 2786 } 2787 } 2788 2789 /** 2790 * Labels LONG_ADD tree node 2791 * @param p node to label 2792 */ 2793 private static void label_LONG_ADD(AbstractBURS_TreeNode p) { 2794 p.initCost(); 2795 AbstractBURS_TreeNode lchild, rchild; 2796 lchild = p.getChild1(); 2797 rchild = p.getChild2(); 2798 label(lchild); 2799 label(rchild); 2800 int c; 2801 // r: LONG_ADD(r,r) 2802 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 20; 2803 if(BURS.DEBUG) trace(p, 87, c + 0, p.getCost(2) /* r */); 2804 if (c < p.getCost(2) /* r */) { 2805 p.setCost(2 /* r */, (char)(c)); 2806 p.writePacked(0, 0xFFFFC07F, 0x2F00); // p.r = 94 2807 closure_r(p, c); 2808 } 2809 } 2810 2811 /** 2812 * Labels FLOAT_ADD tree node 2813 * @param p node to label 2814 */ 2815 private static void label_FLOAT_ADD(AbstractBURS_TreeNode p) { 2816 p.initCost(); 2817 AbstractBURS_TreeNode lchild, rchild; 2818 lchild = p.getChild1(); 2819 rchild = p.getChild2(); 2820 label(lchild); 2821 label(rchild); 2822 int c; 2823 // r: FLOAT_ADD(r,r) 2824 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 10; 2825 if(BURS.DEBUG) trace(p, 56, c + 0, p.getCost(2) /* r */); 2826 if (c < p.getCost(2) /* r */) { 2827 p.setCost(2 /* r */, (char)(c)); 2828 p.writePacked(0, 0xFFFFC07F, 0x1580); // p.r = 43 2829 closure_r(p, c); 2830 } 2831 if ( // r: FLOAT_ADD(FLOAT_MUL(r,r),r) 2832 lchild.getOpcode() == FLOAT_MUL_opcode 2833 ) { 2834 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + (IR.strictFP(P(p),PL(p))?INFINITE:10); 2835 if(BURS.DEBUG) trace(p, 246, c + 0, p.getCost(2) /* r */); 2836 if (c < p.getCost(2) /* r */) { 2837 p.setCost(2 /* r */, (char)(c)); 2838 p.writePacked(0, 0xFFFFC07F, 0x1B80); // p.r = 55 2839 closure_r(p, c); 2840 } 2841 } 2842 if ( // r: FLOAT_ADD(r,FLOAT_MUL(r,r)) 2843 rchild.getOpcode() == FLOAT_MUL_opcode 2844 ) { 2845 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild2()).getCost(2 /* r */) + (IR.strictFP(P(p),PR(p))?INFINITE:10); 2846 if(BURS.DEBUG) trace(p, 250, c + 0, p.getCost(2) /* r */); 2847 if (c < p.getCost(2) /* r */) { 2848 p.setCost(2 /* r */, (char)(c)); 2849 p.writePacked(0, 0xFFFFC07F, 0x1C80); // p.r = 57 2850 closure_r(p, c); 2851 } 2852 } 2853 } 2854 2855 /** 2856 * Labels DOUBLE_ADD tree node 2857 * @param p node to label 2858 */ 2859 private static void label_DOUBLE_ADD(AbstractBURS_TreeNode p) { 2860 p.initCost(); 2861 AbstractBURS_TreeNode lchild, rchild; 2862 lchild = p.getChild1(); 2863 rchild = p.getChild2(); 2864 label(lchild); 2865 label(rchild); 2866 int c; 2867 // r: DOUBLE_ADD(r,r) 2868 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 10; 2869 if(BURS.DEBUG) trace(p, 57, c + 0, p.getCost(2) /* r */); 2870 if (c < p.getCost(2) /* r */) { 2871 p.setCost(2 /* r */, (char)(c)); 2872 p.writePacked(0, 0xFFFFC07F, 0x1600); // p.r = 44 2873 closure_r(p, c); 2874 } 2875 if ( // r: DOUBLE_ADD(DOUBLE_MUL(r,r),r) 2876 lchild.getOpcode() == DOUBLE_MUL_opcode 2877 ) { 2878 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + (IR.strictFP(P(p),PL(p))?INFINITE:10); 2879 if(BURS.DEBUG) trace(p, 247, c + 0, p.getCost(2) /* r */); 2880 if (c < p.getCost(2) /* r */) { 2881 p.setCost(2 /* r */, (char)(c)); 2882 p.writePacked(0, 0xFFFFC07F, 0x1C00); // p.r = 56 2883 closure_r(p, c); 2884 } 2885 } 2886 if ( // r: DOUBLE_ADD(r,DOUBLE_MUL(r,r)) 2887 rchild.getOpcode() == DOUBLE_MUL_opcode 2888 ) { 2889 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild2()).getCost(2 /* r */) + (IR.strictFP(P(p),PR(p))?INFINITE:10); 2890 if(BURS.DEBUG) trace(p, 251, c + 0, p.getCost(2) /* r */); 2891 if (c < p.getCost(2) /* r */) { 2892 p.setCost(2 /* r */, (char)(c)); 2893 p.writePacked(0, 0xFFFFC07F, 0x1D00); // p.r = 58 2894 closure_r(p, c); 2895 } 2896 } 2897 } 2898 2899 /** 2900 * Labels REF_SUB tree node 2901 * @param p node to label 2902 */ 2903 private static void label_REF_SUB(AbstractBURS_TreeNode p) { 2904 p.initCost(); 2905 AbstractBURS_TreeNode lchild, rchild; 2906 lchild = p.getChild1(); 2907 rchild = p.getChild2(); 2908 label(lchild); 2909 label(rchild); 2910 int c; 2911 // r: REF_SUB(r,r) 2912 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 11; 2913 if(BURS.DEBUG) trace(p, 46, c + 0, p.getCost(2) /* r */); 2914 if (c < p.getCost(2) /* r */) { 2915 p.setCost(2 /* r */, (char)(c)); 2916 p.writePacked(0, 0xFFFFC07F, 0xA80); // p.r = 21 2917 closure_r(p, c); 2918 } 2919 if ( // r: REF_SUB(INT_CONSTANT,r) 2920 lchild.getOpcode() == INT_CONSTANT_opcode 2921 ) { 2922 c = STATE(rchild).getCost(2 /* r */) + (SI16(IV(Binary.getVal1(P(p))))?11:INFINITE); 2923 if(BURS.DEBUG) trace(p, 193, c + 0, p.getCost(2) /* r */); 2924 if (c < p.getCost(2) /* r */) { 2925 p.setCost(2 /* r */, (char)(c)); 2926 p.writePacked(0, 0xFFFFC07F, 0xB00); // p.r = 22 2927 closure_r(p, c); 2928 } 2929 } 2930 } 2931 2932 /** 2933 * Labels LONG_SUB tree node 2934 * @param p node to label 2935 */ 2936 private static void label_LONG_SUB(AbstractBURS_TreeNode p) { 2937 p.initCost(); 2938 AbstractBURS_TreeNode lchild, rchild; 2939 lchild = p.getChild1(); 2940 rchild = p.getChild2(); 2941 label(lchild); 2942 label(rchild); 2943 int c; 2944 // r: LONG_SUB(r,r) 2945 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 20; 2946 if(BURS.DEBUG) trace(p, 88, c + 0, p.getCost(2) /* r */); 2947 if (c < p.getCost(2) /* r */) { 2948 p.setCost(2 /* r */, (char)(c)); 2949 p.writePacked(0, 0xFFFFC07F, 0x2F80); // p.r = 95 2950 closure_r(p, c); 2951 } 2952 } 2953 2954 /** 2955 * Labels FLOAT_SUB tree node 2956 * @param p node to label 2957 */ 2958 private static void label_FLOAT_SUB(AbstractBURS_TreeNode p) { 2959 p.initCost(); 2960 AbstractBURS_TreeNode lchild, rchild; 2961 lchild = p.getChild1(); 2962 rchild = p.getChild2(); 2963 label(lchild); 2964 label(rchild); 2965 int c; 2966 // r: FLOAT_SUB(r,r) 2967 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 10; 2968 if(BURS.DEBUG) trace(p, 60, c + 0, p.getCost(2) /* r */); 2969 if (c < p.getCost(2) /* r */) { 2970 p.setCost(2 /* r */, (char)(c)); 2971 p.writePacked(0, 0xFFFFC07F, 0x1780); // p.r = 47 2972 closure_r(p, c); 2973 } 2974 if ( // r: FLOAT_SUB(FLOAT_MUL(r,r),r) 2975 lchild.getOpcode() == FLOAT_MUL_opcode 2976 ) { 2977 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + (IR.strictFP(P(p),PL(p))?INFINITE:10); 2978 if(BURS.DEBUG) trace(p, 248, c + 0, p.getCost(2) /* r */); 2979 if (c < p.getCost(2) /* r */) { 2980 p.setCost(2 /* r */, (char)(c)); 2981 p.writePacked(0, 0xFFFFC07F, 0x1D80); // p.r = 59 2982 closure_r(p, c); 2983 } 2984 } 2985 } 2986 2987 /** 2988 * Labels DOUBLE_SUB tree node 2989 * @param p node to label 2990 */ 2991 private static void label_DOUBLE_SUB(AbstractBURS_TreeNode p) { 2992 p.initCost(); 2993 AbstractBURS_TreeNode lchild, rchild; 2994 lchild = p.getChild1(); 2995 rchild = p.getChild2(); 2996 label(lchild); 2997 label(rchild); 2998 int c; 2999 // r: DOUBLE_SUB(r,r) 3000 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 10; 3001 if(BURS.DEBUG) trace(p, 61, c + 0, p.getCost(2) /* r */); 3002 if (c < p.getCost(2) /* r */) { 3003 p.setCost(2 /* r */, (char)(c)); 3004 p.writePacked(0, 0xFFFFC07F, 0x1800); // p.r = 48 3005 closure_r(p, c); 3006 } 3007 if ( // r: DOUBLE_SUB(DOUBLE_MUL(r,r),r) 3008 lchild.getOpcode() == DOUBLE_MUL_opcode 3009 ) { 3010 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + (IR.strictFP(P(p),PL(p))?INFINITE:10); 3011 if(BURS.DEBUG) trace(p, 249, c + 0, p.getCost(2) /* r */); 3012 if (c < p.getCost(2) /* r */) { 3013 p.setCost(2 /* r */, (char)(c)); 3014 p.writePacked(0, 0xFFFFC07F, 0x1E00); // p.r = 60 3015 closure_r(p, c); 3016 } 3017 } 3018 } 3019 3020 /** 3021 * Labels INT_MUL tree node 3022 * @param p node to label 3023 */ 3024 private static void label_INT_MUL(AbstractBURS_TreeNode p) { 3025 p.initCost(); 3026 AbstractBURS_TreeNode lchild, rchild; 3027 lchild = p.getChild1(); 3028 rchild = p.getChild2(); 3029 label(lchild); 3030 label(rchild); 3031 int c; 3032 if ( // r: INT_MUL(r,INT_CONSTANT) 3033 rchild.getOpcode() == INT_CONSTANT_opcode 3034 ) { 3035 c = STATE(lchild).getCost(2 /* r */) + 11; 3036 if(BURS.DEBUG) trace(p, 129, c + 0, p.getCost(2) /* r */); 3037 if (c < p.getCost(2) /* r */) { 3038 p.setCost(2 /* r */, (char)(c)); 3039 p.writePacked(0, 0xFFFFC07F, 0xB80); // p.r = 23 3040 closure_r(p, c); 3041 } 3042 } 3043 // r: INT_MUL(r,r) 3044 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 11; 3045 if(BURS.DEBUG) trace(p, 47, c + 0, p.getCost(2) /* r */); 3046 if (c < p.getCost(2) /* r */) { 3047 p.setCost(2 /* r */, (char)(c)); 3048 p.writePacked(0, 0xFFFFC07F, 0xC00); // p.r = 24 3049 closure_r(p, c); 3050 } 3051 } 3052 3053 /** 3054 * Labels LONG_MUL tree node 3055 * @param p node to label 3056 */ 3057 private static void label_LONG_MUL(AbstractBURS_TreeNode p) { 3058 p.initCost(); 3059 AbstractBURS_TreeNode lchild, rchild; 3060 lchild = p.getChild1(); 3061 rchild = p.getChild2(); 3062 label(lchild); 3063 label(rchild); 3064 int c; 3065 // r: LONG_MUL(r,r) 3066 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 20; 3067 if(BURS.DEBUG) trace(p, 89, c + 0, p.getCost(2) /* r */); 3068 if (c < p.getCost(2) /* r */) { 3069 p.setCost(2 /* r */, (char)(c)); 3070 p.writePacked(0, 0xFFFFC07F, 0x3000); // p.r = 96 3071 closure_r(p, c); 3072 } 3073 } 3074 3075 /** 3076 * Labels FLOAT_MUL tree node 3077 * @param p node to label 3078 */ 3079 private static void label_FLOAT_MUL(AbstractBURS_TreeNode p) { 3080 p.initCost(); 3081 AbstractBURS_TreeNode lchild, rchild; 3082 lchild = p.getChild1(); 3083 rchild = p.getChild2(); 3084 label(lchild); 3085 label(rchild); 3086 int c; 3087 // r: FLOAT_MUL(r,r) 3088 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 10; 3089 if(BURS.DEBUG) trace(p, 58, c + 0, p.getCost(2) /* r */); 3090 if (c < p.getCost(2) /* r */) { 3091 p.setCost(2 /* r */, (char)(c)); 3092 p.writePacked(0, 0xFFFFC07F, 0x1680); // p.r = 45 3093 closure_r(p, c); 3094 } 3095 } 3096 3097 /** 3098 * Labels DOUBLE_MUL tree node 3099 * @param p node to label 3100 */ 3101 private static void label_DOUBLE_MUL(AbstractBURS_TreeNode p) { 3102 p.initCost(); 3103 AbstractBURS_TreeNode lchild, rchild; 3104 lchild = p.getChild1(); 3105 rchild = p.getChild2(); 3106 label(lchild); 3107 label(rchild); 3108 int c; 3109 // r: DOUBLE_MUL(r,r) 3110 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 10; 3111 if(BURS.DEBUG) trace(p, 59, c + 0, p.getCost(2) /* r */); 3112 if (c < p.getCost(2) /* r */) { 3113 p.setCost(2 /* r */, (char)(c)); 3114 p.writePacked(0, 0xFFFFC07F, 0x1700); // p.r = 46 3115 closure_r(p, c); 3116 } 3117 } 3118 3119 /** 3120 * Labels INT_DIV tree node 3121 * @param p node to label 3122 */ 3123 private static void label_INT_DIV(AbstractBURS_TreeNode p) { 3124 p.initCost(); 3125 AbstractBURS_TreeNode lchild, rchild; 3126 lchild = p.getChild1(); 3127 rchild = p.getChild2(); 3128 label(lchild); 3129 label(rchild); 3130 int c; 3131 // r: INT_DIV(r,r) 3132 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 20; 3133 if(BURS.DEBUG) trace(p, 48, c + 0, p.getCost(2) /* r */); 3134 if (c < p.getCost(2) /* r */) { 3135 p.setCost(2 /* r */, (char)(c)); 3136 p.writePacked(0, 0xFFFFC07F, 0xC80); // p.r = 25 3137 closure_r(p, c); 3138 } 3139 if ( // r: INT_DIV(r,REF_MOVE(INT_CONSTANT)) 3140 rchild.getOpcode() == REF_MOVE_opcode && 3141 rchild.getChild1().getOpcode() == INT_CONSTANT_opcode 3142 ) { 3143 c = STATE(lchild).getCost(2 /* r */) + 20; 3144 if(BURS.DEBUG) trace(p, 130, c + 0, p.getCost(2) /* r */); 3145 if (c < p.getCost(2) /* r */) { 3146 p.setCost(2 /* r */, (char)(c)); 3147 p.writePacked(0, 0xFFFFC07F, 0xD00); // p.r = 26 3148 closure_r(p, c); 3149 } 3150 } 3151 } 3152 3153 /** 3154 * Labels FLOAT_DIV tree node 3155 * @param p node to label 3156 */ 3157 private static void label_FLOAT_DIV(AbstractBURS_TreeNode p) { 3158 p.initCost(); 3159 AbstractBURS_TreeNode lchild, rchild; 3160 lchild = p.getChild1(); 3161 rchild = p.getChild2(); 3162 label(lchild); 3163 label(rchild); 3164 int c; 3165 // r: FLOAT_DIV(r,r) 3166 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 10; 3167 if(BURS.DEBUG) trace(p, 62, c + 0, p.getCost(2) /* r */); 3168 if (c < p.getCost(2) /* r */) { 3169 p.setCost(2 /* r */, (char)(c)); 3170 p.writePacked(0, 0xFFFFC07F, 0x1880); // p.r = 49 3171 closure_r(p, c); 3172 } 3173 } 3174 3175 /** 3176 * Labels DOUBLE_DIV tree node 3177 * @param p node to label 3178 */ 3179 private static void label_DOUBLE_DIV(AbstractBURS_TreeNode p) { 3180 p.initCost(); 3181 AbstractBURS_TreeNode lchild, rchild; 3182 lchild = p.getChild1(); 3183 rchild = p.getChild2(); 3184 label(lchild); 3185 label(rchild); 3186 int c; 3187 // r: DOUBLE_DIV(r,r) 3188 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 10; 3189 if(BURS.DEBUG) trace(p, 63, c + 0, p.getCost(2) /* r */); 3190 if (c < p.getCost(2) /* r */) { 3191 p.setCost(2 /* r */, (char)(c)); 3192 p.writePacked(0, 0xFFFFC07F, 0x1900); // p.r = 50 3193 closure_r(p, c); 3194 } 3195 } 3196 3197 /** 3198 * Labels INT_REM tree node 3199 * @param p node to label 3200 */ 3201 private static void label_INT_REM(AbstractBURS_TreeNode p) { 3202 p.initCost(); 3203 AbstractBURS_TreeNode lchild, rchild; 3204 lchild = p.getChild1(); 3205 rchild = p.getChild2(); 3206 label(lchild); 3207 label(rchild); 3208 int c; 3209 // r: INT_REM(r,r) 3210 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 20; 3211 if(BURS.DEBUG) trace(p, 49, c + 0, p.getCost(2) /* r */); 3212 if (c < p.getCost(2) /* r */) { 3213 p.setCost(2 /* r */, (char)(c)); 3214 p.writePacked(0, 0xFFFFC07F, 0xD80); // p.r = 27 3215 closure_r(p, c); 3216 } 3217 if ( // r: INT_REM(r,REF_MOVE(INT_CONSTANT)) 3218 rchild.getOpcode() == REF_MOVE_opcode && 3219 rchild.getChild1().getOpcode() == INT_CONSTANT_opcode 3220 ) { 3221 c = STATE(lchild).getCost(2 /* r */) + 20; 3222 if(BURS.DEBUG) trace(p, 131, c + 0, p.getCost(2) /* r */); 3223 if (c < p.getCost(2) /* r */) { 3224 p.setCost(2 /* r */, (char)(c)); 3225 p.writePacked(0, 0xFFFFC07F, 0xE00); // p.r = 28 3226 closure_r(p, c); 3227 } 3228 } 3229 } 3230 3231 /** 3232 * Labels REF_NEG tree node 3233 * @param p node to label 3234 */ 3235 private static void label_REF_NEG(AbstractBURS_TreeNode p) { 3236 p.initCost(); 3237 AbstractBURS_TreeNode lchild; 3238 lchild = p.getChild1(); 3239 label(lchild); 3240 int c; 3241 // r: REF_NEG(r) 3242 c = STATE(lchild).getCost(2 /* r */) + 11; 3243 if(BURS.DEBUG) trace(p, 132, c + 0, p.getCost(2) /* r */); 3244 if (c < p.getCost(2) /* r */) { 3245 p.setCost(2 /* r */, (char)(c)); 3246 p.writePacked(0, 0xFFFFC07F, 0xE80); // p.r = 29 3247 closure_r(p, c); 3248 } 3249 } 3250 3251 /** 3252 * Labels LONG_NEG tree node 3253 * @param p node to label 3254 */ 3255 private static void label_LONG_NEG(AbstractBURS_TreeNode p) { 3256 p.initCost(); 3257 AbstractBURS_TreeNode lchild; 3258 lchild = p.getChild1(); 3259 label(lchild); 3260 int c; 3261 // r: LONG_NEG(r) 3262 c = STATE(lchild).getCost(2 /* r */) + 20; 3263 if(BURS.DEBUG) trace(p, 176, c + 0, p.getCost(2) /* r */); 3264 if (c < p.getCost(2) /* r */) { 3265 p.setCost(2 /* r */, (char)(c)); 3266 p.writePacked(0, 0xFFFFC07F, 0x3080); // p.r = 97 3267 closure_r(p, c); 3268 } 3269 } 3270 3271 /** 3272 * Labels FLOAT_NEG tree node 3273 * @param p node to label 3274 */ 3275 private static void label_FLOAT_NEG(AbstractBURS_TreeNode p) { 3276 p.initCost(); 3277 AbstractBURS_TreeNode lchild; 3278 lchild = p.getChild1(); 3279 label(lchild); 3280 int c; 3281 // r: FLOAT_NEG(r) 3282 c = STATE(lchild).getCost(2 /* r */) + 10; 3283 if(BURS.DEBUG) trace(p, 141, c + 0, p.getCost(2) /* r */); 3284 if (c < p.getCost(2) /* r */) { 3285 p.setCost(2 /* r */, (char)(c)); 3286 p.writePacked(0, 0xFFFFC07F, 0x1980); // p.r = 51 3287 closure_r(p, c); 3288 } 3289 if ( // r: FLOAT_NEG(FLOAT_ADD(FLOAT_MUL(r,r),r)) 3290 lchild.getOpcode() == FLOAT_ADD_opcode && 3291 lchild.getChild1().getOpcode() == FLOAT_MUL_opcode 3292 ) { 3293 c = STATE(lchild.getChild1().getChild1()).getCost(2 /* r */) + STATE(lchild.getChild1().getChild2()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + (IR.strictFP(P(p),PL(p),PLL(p))?INFINITE:10); 3294 if(BURS.DEBUG) trace(p, 258, c + 0, p.getCost(2) /* r */); 3295 if (c < p.getCost(2) /* r */) { 3296 p.setCost(2 /* r */, (char)(c)); 3297 p.writePacked(0, 0xFFFFC07F, 0x1E80); // p.r = 61 3298 closure_r(p, c); 3299 } 3300 } 3301 if ( // r: FLOAT_NEG(FLOAT_ADD(r,FLOAT_MUL(r,r))) 3302 lchild.getOpcode() == FLOAT_ADD_opcode && 3303 lchild.getChild2().getOpcode() == FLOAT_MUL_opcode 3304 ) { 3305 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2().getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2().getChild2()).getCost(2 /* r */) + (IR.strictFP(P(p),PL(p),PLR(p))?INFINITE:10); 3306 if(BURS.DEBUG) trace(p, 262, c + 0, p.getCost(2) /* r */); 3307 if (c < p.getCost(2) /* r */) { 3308 p.setCost(2 /* r */, (char)(c)); 3309 p.writePacked(0, 0xFFFFC07F, 0x1F80); // p.r = 63 3310 closure_r(p, c); 3311 } 3312 } 3313 if ( // r: FLOAT_NEG(FLOAT_SUB(FLOAT_MUL(r,r),r)) 3314 lchild.getOpcode() == FLOAT_SUB_opcode && 3315 lchild.getChild1().getOpcode() == FLOAT_MUL_opcode 3316 ) { 3317 c = STATE(lchild.getChild1().getChild1()).getCost(2 /* r */) + STATE(lchild.getChild1().getChild2()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + (IR.strictFP(P(p),PL(p),PLL(p))?INFINITE:10); 3318 if(BURS.DEBUG) trace(p, 260, c + 0, p.getCost(2) /* r */); 3319 if (c < p.getCost(2) /* r */) { 3320 p.setCost(2 /* r */, (char)(c)); 3321 p.writePacked(0, 0xFFFFC07F, 0x2080); // p.r = 65 3322 closure_r(p, c); 3323 } 3324 } 3325 } 3326 3327 /** 3328 * Labels DOUBLE_NEG tree node 3329 * @param p node to label 3330 */ 3331 private static void label_DOUBLE_NEG(AbstractBURS_TreeNode p) { 3332 p.initCost(); 3333 AbstractBURS_TreeNode lchild; 3334 lchild = p.getChild1(); 3335 label(lchild); 3336 int c; 3337 // r: DOUBLE_NEG(r) 3338 c = STATE(lchild).getCost(2 /* r */) + 10; 3339 if(BURS.DEBUG) trace(p, 142, c + 0, p.getCost(2) /* r */); 3340 if (c < p.getCost(2) /* r */) { 3341 p.setCost(2 /* r */, (char)(c)); 3342 p.writePacked(0, 0xFFFFC07F, 0x1A00); // p.r = 52 3343 closure_r(p, c); 3344 } 3345 if ( // r: DOUBLE_NEG(DOUBLE_ADD(DOUBLE_MUL(r,r),r)) 3346 lchild.getOpcode() == DOUBLE_ADD_opcode && 3347 lchild.getChild1().getOpcode() == DOUBLE_MUL_opcode 3348 ) { 3349 c = STATE(lchild.getChild1().getChild1()).getCost(2 /* r */) + STATE(lchild.getChild1().getChild2()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + (IR.strictFP(P(p),PL(p),PLL(p))?INFINITE:10); 3350 if(BURS.DEBUG) trace(p, 259, c + 0, p.getCost(2) /* r */); 3351 if (c < p.getCost(2) /* r */) { 3352 p.setCost(2 /* r */, (char)(c)); 3353 p.writePacked(0, 0xFFFFC07F, 0x1F00); // p.r = 62 3354 closure_r(p, c); 3355 } 3356 } 3357 if ( // r: DOUBLE_NEG(DOUBLE_ADD(r,DOUBLE_MUL(r,r))) 3358 lchild.getOpcode() == DOUBLE_ADD_opcode && 3359 lchild.getChild2().getOpcode() == DOUBLE_MUL_opcode 3360 ) { 3361 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2().getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2().getChild2()).getCost(2 /* r */) + (IR.strictFP(P(p),PL(p),PLR(p))?INFINITE:10); 3362 if(BURS.DEBUG) trace(p, 263, c + 0, p.getCost(2) /* r */); 3363 if (c < p.getCost(2) /* r */) { 3364 p.setCost(2 /* r */, (char)(c)); 3365 p.writePacked(0, 0xFFFFC07F, 0x2000); // p.r = 64 3366 closure_r(p, c); 3367 } 3368 } 3369 if ( // r: DOUBLE_NEG(DOUBLE_SUB(DOUBLE_MUL(r,r),r)) 3370 lchild.getOpcode() == DOUBLE_SUB_opcode && 3371 lchild.getChild1().getOpcode() == DOUBLE_MUL_opcode 3372 ) { 3373 c = STATE(lchild.getChild1().getChild1()).getCost(2 /* r */) + STATE(lchild.getChild1().getChild2()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + (IR.strictFP(P(p),PL(p),PLL(p))?INFINITE:10); 3374 if(BURS.DEBUG) trace(p, 261, c + 0, p.getCost(2) /* r */); 3375 if (c < p.getCost(2) /* r */) { 3376 p.setCost(2 /* r */, (char)(c)); 3377 p.writePacked(0, 0xFFFFC07F, 0x2100); // p.r = 66 3378 closure_r(p, c); 3379 } 3380 } 3381 } 3382 3383 /** 3384 * Labels FLOAT_SQRT tree node 3385 * @param p node to label 3386 */ 3387 private static void label_FLOAT_SQRT(AbstractBURS_TreeNode p) { 3388 p.initCost(); 3389 AbstractBURS_TreeNode lchild; 3390 lchild = p.getChild1(); 3391 label(lchild); 3392 int c; 3393 // r: FLOAT_SQRT(r) 3394 c = STATE(lchild).getCost(2 /* r */) + 10; 3395 if(BURS.DEBUG) trace(p, 143, c + 0, p.getCost(2) /* r */); 3396 if (c < p.getCost(2) /* r */) { 3397 p.setCost(2 /* r */, (char)(c)); 3398 p.writePacked(0, 0xFFFFC07F, 0x1A80); // p.r = 53 3399 closure_r(p, c); 3400 } 3401 } 3402 3403 /** 3404 * Labels DOUBLE_SQRT tree node 3405 * @param p node to label 3406 */ 3407 private static void label_DOUBLE_SQRT(AbstractBURS_TreeNode p) { 3408 p.initCost(); 3409 AbstractBURS_TreeNode lchild; 3410 lchild = p.getChild1(); 3411 label(lchild); 3412 int c; 3413 // r: DOUBLE_SQRT(r) 3414 c = STATE(lchild).getCost(2 /* r */) + 10; 3415 if(BURS.DEBUG) trace(p, 144, c + 0, p.getCost(2) /* r */); 3416 if (c < p.getCost(2) /* r */) { 3417 p.setCost(2 /* r */, (char)(c)); 3418 p.writePacked(0, 0xFFFFC07F, 0x1B00); // p.r = 54 3419 closure_r(p, c); 3420 } 3421 } 3422 3423 /** 3424 * Labels INT_SHL tree node 3425 * @param p node to label 3426 */ 3427 private static void label_INT_SHL(AbstractBURS_TreeNode p) { 3428 p.initCost(); 3429 AbstractBURS_TreeNode lchild, rchild; 3430 lchild = p.getChild1(); 3431 rchild = p.getChild2(); 3432 label(lchild); 3433 label(rchild); 3434 int c; 3435 if ( // rz: INT_SHL(r,INT_CONSTANT) 3436 rchild.getOpcode() == INT_CONSTANT_opcode 3437 ) { 3438 c = STATE(lchild).getCost(2 /* r */) + 10; 3439 if(BURS.DEBUG) trace(p, 133, c + 0, p.getCost(5) /* rz */); 3440 if (c < p.getCost(5) /* rz */) { 3441 p.setCost(5 /* rz */, (char)(c)); 3442 p.writePacked(0, 0xFF1FFFFF, 0x400000); // p.rz = 2 3443 closure_rz(p, c); 3444 } 3445 } 3446 // rz: INT_SHL(r,r) 3447 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 20; 3448 if(BURS.DEBUG) trace(p, 50, c + 0, p.getCost(5) /* rz */); 3449 if (c < p.getCost(5) /* rz */) { 3450 p.setCost(5 /* rz */, (char)(c)); 3451 p.writePacked(0, 0xFF1FFFFF, 0x600000); // p.rz = 3 3452 closure_rz(p, c); 3453 } 3454 if ( // rz: INT_SHL(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 3455 lchild.getOpcode() == INT_USHR_opcode && 3456 lchild.getChild2().getOpcode() == INT_CONSTANT_opcode && 3457 rchild.getOpcode() == INT_CONSTANT_opcode 3458 ) { 3459 c = STATE(lchild.getChild1()).getCost(2 /* r */) + 10; 3460 if(BURS.DEBUG) trace(p, 195, c + 0, p.getCost(5) /* rz */); 3461 if (c < p.getCost(5) /* rz */) { 3462 p.setCost(5 /* rz */, (char)(c)); 3463 p.writePacked(0, 0xFF1FFFFF, 0x800000); // p.rz = 4 3464 closure_rz(p, c); 3465 } 3466 } 3467 } 3468 3469 /** 3470 * Labels LONG_SHL tree node 3471 * @param p node to label 3472 */ 3473 private static void label_LONG_SHL(AbstractBURS_TreeNode p) { 3474 p.initCost(); 3475 AbstractBURS_TreeNode lchild, rchild; 3476 lchild = p.getChild1(); 3477 rchild = p.getChild2(); 3478 label(lchild); 3479 label(rchild); 3480 int c; 3481 // r: LONG_SHL(r,r) 3482 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 20; 3483 if(BURS.DEBUG) trace(p, 90, c + 0, p.getCost(2) /* r */); 3484 if (c < p.getCost(2) /* r */) { 3485 p.setCost(2 /* r */, (char)(c)); 3486 p.writePacked(0, 0xFFFFC07F, 0x3100); // p.r = 98 3487 closure_r(p, c); 3488 } 3489 if ( // r: LONG_SHL(r,INT_CONSTANT) 3490 rchild.getOpcode() == INT_CONSTANT_opcode 3491 ) { 3492 c = STATE(lchild).getCost(2 /* r */) + 20; 3493 if(BURS.DEBUG) trace(p, 177, c + 0, p.getCost(2) /* r */); 3494 if (c < p.getCost(2) /* r */) { 3495 p.setCost(2 /* r */, (char)(c)); 3496 p.writePacked(0, 0xFFFFC07F, 0x3180); // p.r = 99 3497 closure_r(p, c); 3498 } 3499 } 3500 } 3501 3502 /** 3503 * Labels INT_SHR tree node 3504 * @param p node to label 3505 */ 3506 private static void label_INT_SHR(AbstractBURS_TreeNode p) { 3507 p.initCost(); 3508 AbstractBURS_TreeNode lchild, rchild; 3509 lchild = p.getChild1(); 3510 rchild = p.getChild2(); 3511 label(lchild); 3512 label(rchild); 3513 int c; 3514 if ( // rs: INT_SHR(r,INT_CONSTANT) 3515 rchild.getOpcode() == INT_CONSTANT_opcode 3516 ) { 3517 c = STATE(lchild).getCost(2 /* r */) + 10; 3518 if(BURS.DEBUG) trace(p, 134, c + 0, p.getCost(4) /* rs */); 3519 if (c < p.getCost(4) /* rs */) { 3520 p.setCost(4 /* rs */, (char)(c)); 3521 p.writePacked(0, 0xFFE0FFFF, 0x20000); // p.rs = 2 3522 closure_rs(p, c); 3523 } 3524 } 3525 // rs: INT_SHR(r,r) 3526 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 20; 3527 if(BURS.DEBUG) trace(p, 51, c + 0, p.getCost(4) /* rs */); 3528 if (c < p.getCost(4) /* rs */) { 3529 p.setCost(4 /* rs */, (char)(c)); 3530 p.writePacked(0, 0xFFE0FFFF, 0x30000); // p.rs = 3 3531 closure_rs(p, c); 3532 } 3533 if ( // rp: INT_SHR(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 3534 lchild.getOpcode() == REF_AND_opcode && 3535 lchild.getChild2().getOpcode() == INT_CONSTANT_opcode && 3536 rchild.getOpcode() == INT_CONSTANT_opcode 3537 ) { 3538 c = STATE(lchild.getChild1()).getCost(2 /* r */) + (POSITIVE_MASK(IV(Binary.getVal2(PL(p))))?10:INFINITE); 3539 if(BURS.DEBUG) trace(p, 196, c + 0, p.getCost(6) /* rp */); 3540 if (c < p.getCost(6) /* rp */) { 3541 p.setCost(6 /* rp */, (char)(c)); 3542 p.writePacked(0, 0xF0FFFFFF, 0x1000000); // p.rp = 1 3543 closure_rp(p, c); 3544 } 3545 } 3546 } 3547 3548 /** 3549 * Labels LONG_SHR tree node 3550 * @param p node to label 3551 */ 3552 private static void label_LONG_SHR(AbstractBURS_TreeNode p) { 3553 p.initCost(); 3554 AbstractBURS_TreeNode lchild, rchild; 3555 lchild = p.getChild1(); 3556 rchild = p.getChild2(); 3557 label(lchild); 3558 label(rchild); 3559 int c; 3560 // r: LONG_SHR(r,r) 3561 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 20; 3562 if(BURS.DEBUG) trace(p, 91, c + 0, p.getCost(2) /* r */); 3563 if (c < p.getCost(2) /* r */) { 3564 p.setCost(2 /* r */, (char)(c)); 3565 p.writePacked(0, 0xFFFFC07F, 0x3200); // p.r = 100 3566 closure_r(p, c); 3567 } 3568 if ( // r: LONG_SHR(r,INT_CONSTANT) 3569 rchild.getOpcode() == INT_CONSTANT_opcode 3570 ) { 3571 c = STATE(lchild).getCost(2 /* r */) + 20; 3572 if(BURS.DEBUG) trace(p, 178, c + 0, p.getCost(2) /* r */); 3573 if (c < p.getCost(2) /* r */) { 3574 p.setCost(2 /* r */, (char)(c)); 3575 p.writePacked(0, 0xFFFFC07F, 0x3280); // p.r = 101 3576 closure_r(p, c); 3577 } 3578 } 3579 } 3580 3581 /** 3582 * Labels INT_USHR tree node 3583 * @param p node to label 3584 */ 3585 private static void label_INT_USHR(AbstractBURS_TreeNode p) { 3586 p.initCost(); 3587 AbstractBURS_TreeNode lchild, rchild; 3588 lchild = p.getChild1(); 3589 rchild = p.getChild2(); 3590 label(lchild); 3591 label(rchild); 3592 int c; 3593 if ( // rp: INT_USHR(r,INT_CONSTANT) 3594 rchild.getOpcode() == INT_CONSTANT_opcode 3595 ) { 3596 c = STATE(lchild).getCost(2 /* r */) + 10; 3597 if(BURS.DEBUG) trace(p, 135, c + 0, p.getCost(6) /* rp */); 3598 if (c < p.getCost(6) /* rp */) { 3599 p.setCost(6 /* rp */, (char)(c)); 3600 p.writePacked(0, 0xF0FFFFFF, 0x2000000); // p.rp = 2 3601 closure_rp(p, c); 3602 } 3603 } 3604 // rz: INT_USHR(r,r) 3605 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 20; 3606 if(BURS.DEBUG) trace(p, 52, c + 0, p.getCost(5) /* rz */); 3607 if (c < p.getCost(5) /* rz */) { 3608 p.setCost(5 /* rz */, (char)(c)); 3609 p.writePacked(0, 0xFF1FFFFF, 0xA00000); // p.rz = 5 3610 closure_rz(p, c); 3611 } 3612 if ( // rp: INT_USHR(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 3613 lchild.getOpcode() == REF_AND_opcode && 3614 lchild.getChild2().getOpcode() == INT_CONSTANT_opcode && 3615 rchild.getOpcode() == INT_CONSTANT_opcode 3616 ) { 3617 c = STATE(lchild.getChild1()).getCost(2 /* r */) + (POSITIVE_MASK(IV(Binary.getVal2(PL(p))))?10:INFINITE); 3618 if(BURS.DEBUG) trace(p, 197, c + 0, p.getCost(6) /* rp */); 3619 if (c < p.getCost(6) /* rp */) { 3620 p.setCost(6 /* rp */, (char)(c)); 3621 p.writePacked(0, 0xF0FFFFFF, 0x3000000); // p.rp = 3 3622 closure_rp(p, c); 3623 } 3624 } 3625 if ( // rp: INT_USHR(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 3626 lchild.getOpcode() == REF_AND_opcode && 3627 lchild.getChild2().getOpcode() == REF_MOVE_opcode && 3628 lchild.getChild2().getChild1().getOpcode() == INT_CONSTANT_opcode && 3629 rchild.getOpcode() == INT_CONSTANT_opcode 3630 ) { 3631 c = STATE(lchild.getChild1()).getCost(2 /* r */) + (POSITIVE_MASK(IV(Move.getVal(PLR(p))))?10:INFINITE); 3632 if(BURS.DEBUG) trace(p, 198, c + 0, p.getCost(6) /* rp */); 3633 if (c < p.getCost(6) /* rp */) { 3634 p.setCost(6 /* rp */, (char)(c)); 3635 p.writePacked(0, 0xF0FFFFFF, 0x4000000); // p.rp = 4 3636 closure_rp(p, c); 3637 } 3638 } 3639 if ( // rp: INT_USHR(INT_SHL(r,INT_CONSTANT),INT_CONSTANT) 3640 lchild.getOpcode() == INT_SHL_opcode && 3641 lchild.getChild2().getOpcode() == INT_CONSTANT_opcode && 3642 rchild.getOpcode() == INT_CONSTANT_opcode 3643 ) { 3644 c = STATE(lchild.getChild1()).getCost(2 /* r */) + 10; 3645 if(BURS.DEBUG) trace(p, 199, c + 0, p.getCost(6) /* rp */); 3646 if (c < p.getCost(6) /* rp */) { 3647 p.setCost(6 /* rp */, (char)(c)); 3648 p.writePacked(0, 0xF0FFFFFF, 0x5000000); // p.rp = 5 3649 closure_rp(p, c); 3650 } 3651 } 3652 } 3653 3654 /** 3655 * Labels LONG_USHR tree node 3656 * @param p node to label 3657 */ 3658 private static void label_LONG_USHR(AbstractBURS_TreeNode p) { 3659 p.initCost(); 3660 AbstractBURS_TreeNode lchild, rchild; 3661 lchild = p.getChild1(); 3662 rchild = p.getChild2(); 3663 label(lchild); 3664 label(rchild); 3665 int c; 3666 // r: LONG_USHR(r,r) 3667 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 20; 3668 if(BURS.DEBUG) trace(p, 92, c + 0, p.getCost(2) /* r */); 3669 if (c < p.getCost(2) /* r */) { 3670 p.setCost(2 /* r */, (char)(c)); 3671 p.writePacked(0, 0xFFFFC07F, 0x3300); // p.r = 102 3672 closure_r(p, c); 3673 } 3674 if ( // r: LONG_USHR(r,INT_CONSTANT) 3675 rchild.getOpcode() == INT_CONSTANT_opcode 3676 ) { 3677 c = STATE(lchild).getCost(2 /* r */) + 20; 3678 if(BURS.DEBUG) trace(p, 179, c + 0, p.getCost(2) /* r */); 3679 if (c < p.getCost(2) /* r */) { 3680 p.setCost(2 /* r */, (char)(c)); 3681 p.writePacked(0, 0xFFFFC07F, 0x3380); // p.r = 103 3682 closure_r(p, c); 3683 } 3684 } 3685 } 3686 3687 /** 3688 * Labels REF_AND tree node 3689 * @param p node to label 3690 */ 3691 private static void label_REF_AND(AbstractBURS_TreeNode p) { 3692 p.initCost(); 3693 AbstractBURS_TreeNode lchild, rchild; 3694 lchild = p.getChild1(); 3695 rchild = p.getChild2(); 3696 label(lchild); 3697 label(rchild); 3698 int c; 3699 // r: REF_AND(r,r) 3700 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 10; 3701 if(BURS.DEBUG) trace(p, 53, c + 0, p.getCost(2) /* r */); 3702 if (c < p.getCost(2) /* r */) { 3703 p.setCost(2 /* r */, (char)(c)); 3704 p.writePacked(0, 0xFFFFC07F, 0xF00); // p.r = 30 3705 closure_r(p, c); 3706 } 3707 if ( // czr: REF_AND(r,INT_CONSTANT) 3708 rchild.getOpcode() == INT_CONSTANT_opcode 3709 ) { 3710 c = STATE(lchild).getCost(2 /* r */) + 11; 3711 if(BURS.DEBUG) trace(p, 136, c + 0, p.getCost(3) /* czr */); 3712 if (c < p.getCost(3) /* czr */) { 3713 p.setCost(3 /* czr */, (char)(c)); 3714 p.writePacked(0, 0xFFFF3FFF, 0x4000); // p.czr = 1 3715 closure_czr(p, c); 3716 } 3717 } 3718 if ( // rp: REF_AND(r,INT_CONSTANT) 3719 rchild.getOpcode() == INT_CONSTANT_opcode 3720 ) { 3721 c = STATE(lchild).getCost(2 /* r */) + (MASK(IV(Binary.getVal2(P(p))))?10:INFINITE); 3722 if(BURS.DEBUG) trace(p, 137, c + 0, p.getCost(6) /* rp */); 3723 if (c < p.getCost(6) /* rp */) { 3724 p.setCost(6 /* rp */, (char)(c)); 3725 p.writePacked(0, 0xF0FFFFFF, 0x6000000); // p.rp = 6 3726 closure_rp(p, c); 3727 } 3728 } 3729 if ( // r: REF_AND(REF_NOT(r),REF_NOT(r)) 3730 lchild.getOpcode() == REF_NOT_opcode && 3731 rchild.getOpcode() == REF_NOT_opcode 3732 ) { 3733 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + 10; 3734 if(BURS.DEBUG) trace(p, 215, c + 0, p.getCost(2) /* r */); 3735 if (c < p.getCost(2) /* r */) { 3736 p.setCost(2 /* r */, (char)(c)); 3737 p.writePacked(0, 0xFFFFC07F, 0xF80); // p.r = 31 3738 closure_r(p, c); 3739 } 3740 } 3741 if ( // r: REF_AND(r,REF_NOT(r)) 3742 rchild.getOpcode() == REF_NOT_opcode 3743 ) { 3744 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + 10; 3745 if(BURS.DEBUG) trace(p, 220, c + 0, p.getCost(2) /* r */); 3746 if (c < p.getCost(2) /* r */) { 3747 p.setCost(2 /* r */, (char)(c)); 3748 p.writePacked(0, 0xFFFFC07F, 0x1000); // p.r = 32 3749 closure_r(p, c); 3750 } 3751 } 3752 if ( // rp: REF_AND(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 3753 lchild.getOpcode() == INT_USHR_opcode && 3754 lchild.getChild2().getOpcode() == INT_CONSTANT_opcode && 3755 rchild.getOpcode() == INT_CONSTANT_opcode 3756 ) { 3757 c = STATE(lchild.getChild1()).getCost(2 /* r */) + (POSITIVE_MASK(IV(Binary.getVal2(P(p))))?10:INFINITE); 3758 if(BURS.DEBUG) trace(p, 200, c + 0, p.getCost(6) /* rp */); 3759 if (c < p.getCost(6) /* rp */) { 3760 p.setCost(6 /* rp */, (char)(c)); 3761 p.writePacked(0, 0xF0FFFFFF, 0x7000000); // p.rp = 7 3762 closure_rp(p, c); 3763 } 3764 } 3765 if ( // rp: REF_AND(INT_USHR(r,INT_CONSTANT),REF_MOVE(INT_CONSTANT)) 3766 lchild.getOpcode() == INT_USHR_opcode && 3767 lchild.getChild2().getOpcode() == INT_CONSTANT_opcode && 3768 rchild.getOpcode() == REF_MOVE_opcode && 3769 rchild.getChild1().getOpcode() == INT_CONSTANT_opcode 3770 ) { 3771 c = STATE(lchild.getChild1()).getCost(2 /* r */) + (POSITIVE_MASK(IV(Move.getVal(PR(p))))?10:INFINITE); 3772 if(BURS.DEBUG) trace(p, 201, c + 0, p.getCost(6) /* rp */); 3773 if (c < p.getCost(6) /* rp */) { 3774 p.setCost(6 /* rp */, (char)(c)); 3775 p.writePacked(0, 0xF0FFFFFF, 0x8000000); // p.rp = 8 3776 closure_rp(p, c); 3777 } 3778 } 3779 if ( // rp: REF_AND(BYTE_LOAD(r,r),INT_CONSTANT) 3780 lchild.getOpcode() == BYTE_LOAD_opcode && 3781 rchild.getOpcode() == INT_CONSTANT_opcode 3782 ) { 3783 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + (VR(p) == 0xff ? 10 : INFINITE); 3784 if(BURS.DEBUG) trace(p, 235, c + 0, p.getCost(6) /* rp */); 3785 if (c < p.getCost(6) /* rp */) { 3786 p.setCost(6 /* rp */, (char)(c)); 3787 p.writePacked(0, 0xF0FFFFFF, 0xA000000); // p.rp = 10 3788 closure_rp(p, c); 3789 } 3790 } 3791 if ( // rp: REF_AND(BYTE_LOAD(r,INT_CONSTANT),INT_CONSTANT) 3792 lchild.getOpcode() == BYTE_LOAD_opcode && 3793 lchild.getChild2().getOpcode() == INT_CONSTANT_opcode && 3794 rchild.getOpcode() == INT_CONSTANT_opcode 3795 ) { 3796 c = STATE(lchild.getChild1()).getCost(2 /* r */) + (VR(p) == 0xff ? 10 : INFINITE); 3797 if(BURS.DEBUG) trace(p, 202, c + 0, p.getCost(6) /* rp */); 3798 if (c < p.getCost(6) /* rp */) { 3799 p.setCost(6 /* rp */, (char)(c)); 3800 p.writePacked(0, 0xF0FFFFFF, 0xB000000); // p.rp = 11 3801 closure_rp(p, c); 3802 } 3803 } 3804 if ( // czr: REF_AND(r,REF_MOVE(INT_CONSTANT)) 3805 rchild.getOpcode() == REF_MOVE_opcode && 3806 rchild.getChild1().getOpcode() == INT_CONSTANT_opcode 3807 ) { 3808 c = STATE(lchild).getCost(2 /* r */) + (U16(IV(Move.getVal(PR(p))))?11:INFINITE); 3809 if(BURS.DEBUG) trace(p, 186, c + 0, p.getCost(3) /* czr */); 3810 if (c < p.getCost(3) /* czr */) { 3811 p.setCost(3 /* czr */, (char)(c)); 3812 p.writePacked(0, 0xFFFF3FFF, 0x8000); // p.czr = 2 3813 closure_czr(p, c); 3814 } 3815 } 3816 if ( // r: REF_AND(r,REF_MOVE(INT_CONSTANT)) 3817 rchild.getOpcode() == REF_MOVE_opcode && 3818 rchild.getChild1().getOpcode() == INT_CONSTANT_opcode 3819 ) { 3820 c = STATE(lchild).getCost(2 /* r */) + (MASK(IV(Move.getVal(PR(p))))?10:INFINITE); 3821 if(BURS.DEBUG) trace(p, 187, c + 0, p.getCost(2) /* r */); 3822 if (c < p.getCost(2) /* r */) { 3823 p.setCost(2 /* r */, (char)(c)); 3824 p.writePacked(0, 0xFFFFC07F, 0x3900); // p.r = 114 3825 closure_r(p, c); 3826 } 3827 } 3828 } 3829 3830 /** 3831 * Labels LONG_AND tree node 3832 * @param p node to label 3833 */ 3834 private static void label_LONG_AND(AbstractBURS_TreeNode p) { 3835 p.initCost(); 3836 AbstractBURS_TreeNode lchild, rchild; 3837 lchild = p.getChild1(); 3838 rchild = p.getChild2(); 3839 label(lchild); 3840 label(rchild); 3841 int c; 3842 // r: LONG_AND(r,r) 3843 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 20; 3844 if(BURS.DEBUG) trace(p, 93, c + 0, p.getCost(2) /* r */); 3845 if (c < p.getCost(2) /* r */) { 3846 p.setCost(2 /* r */, (char)(c)); 3847 p.writePacked(0, 0xFFFFC07F, 0x3400); // p.r = 104 3848 closure_r(p, c); 3849 } 3850 } 3851 3852 /** 3853 * Labels REF_OR tree node 3854 * @param p node to label 3855 */ 3856 private static void label_REF_OR(AbstractBURS_TreeNode p) { 3857 p.initCost(); 3858 AbstractBURS_TreeNode lchild, rchild; 3859 lchild = p.getChild1(); 3860 rchild = p.getChild2(); 3861 label(lchild); 3862 label(rchild); 3863 int c; 3864 // r: REF_OR(r,r) 3865 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 10; 3866 if(BURS.DEBUG) trace(p, 54, c + 0, p.getCost(2) /* r */); 3867 if (c < p.getCost(2) /* r */) { 3868 p.setCost(2 /* r */, (char)(c)); 3869 p.writePacked(0, 0xFFFFC07F, 0x1080); // p.r = 33 3870 closure_r(p, c); 3871 } 3872 if ( // r: REF_OR(r,INT_CONSTANT) 3873 rchild.getOpcode() == INT_CONSTANT_opcode 3874 ) { 3875 c = STATE(lchild).getCost(2 /* r */) + 10; 3876 if(BURS.DEBUG) trace(p, 138, c + 0, p.getCost(2) /* r */); 3877 if (c < p.getCost(2) /* r */) { 3878 p.setCost(2 /* r */, (char)(c)); 3879 p.writePacked(0, 0xFFFFC07F, 0x1100); // p.r = 34 3880 closure_r(p, c); 3881 } 3882 } 3883 if ( // r: REF_OR(REF_NOT(r),REF_NOT(r)) 3884 lchild.getOpcode() == REF_NOT_opcode && 3885 rchild.getOpcode() == REF_NOT_opcode 3886 ) { 3887 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + 10; 3888 if(BURS.DEBUG) trace(p, 216, c + 0, p.getCost(2) /* r */); 3889 if (c < p.getCost(2) /* r */) { 3890 p.setCost(2 /* r */, (char)(c)); 3891 p.writePacked(0, 0xFFFFC07F, 0x1180); // p.r = 35 3892 closure_r(p, c); 3893 } 3894 } 3895 if ( // r: REF_OR(r,REF_NOT(r)) 3896 rchild.getOpcode() == REF_NOT_opcode 3897 ) { 3898 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + 10; 3899 if(BURS.DEBUG) trace(p, 221, c + 0, p.getCost(2) /* r */); 3900 if (c < p.getCost(2) /* r */) { 3901 p.setCost(2 /* r */, (char)(c)); 3902 p.writePacked(0, 0xFFFFC07F, 0x1200); // p.r = 36 3903 closure_r(p, c); 3904 } 3905 } 3906 if ( // r: REF_OR(r,REF_MOVE(INT_CONSTANT)) 3907 rchild.getOpcode() == REF_MOVE_opcode && 3908 rchild.getChild1().getOpcode() == INT_CONSTANT_opcode 3909 ) { 3910 c = STATE(lchild).getCost(2 /* r */) + (U16(IV(Move.getVal(PR(p))))?10:INFINITE); 3911 if(BURS.DEBUG) trace(p, 188, c + 0, p.getCost(2) /* r */); 3912 if (c < p.getCost(2) /* r */) { 3913 p.setCost(2 /* r */, (char)(c)); 3914 p.writePacked(0, 0xFFFFC07F, 0x3980); // p.r = 115 3915 closure_r(p, c); 3916 } 3917 } 3918 if ( // r: REF_OR(r,REF_MOVE(INT_CONSTANT)) 3919 rchild.getOpcode() == REF_MOVE_opcode && 3920 rchild.getChild1().getOpcode() == INT_CONSTANT_opcode 3921 ) { 3922 c = STATE(lchild).getCost(2 /* r */) + 20; 3923 if(BURS.DEBUG) trace(p, 189, c + 0, p.getCost(2) /* r */); 3924 if (c < p.getCost(2) /* r */) { 3925 p.setCost(2 /* r */, (char)(c)); 3926 p.writePacked(0, 0xFFFFC07F, 0x3A00); // p.r = 116 3927 closure_r(p, c); 3928 } 3929 } 3930 } 3931 3932 /** 3933 * Labels LONG_OR tree node 3934 * @param p node to label 3935 */ 3936 private static void label_LONG_OR(AbstractBURS_TreeNode p) { 3937 p.initCost(); 3938 AbstractBURS_TreeNode lchild, rchild; 3939 lchild = p.getChild1(); 3940 rchild = p.getChild2(); 3941 label(lchild); 3942 label(rchild); 3943 int c; 3944 // r: LONG_OR(r,r) 3945 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 20; 3946 if(BURS.DEBUG) trace(p, 94, c + 0, p.getCost(2) /* r */); 3947 if (c < p.getCost(2) /* r */) { 3948 p.setCost(2 /* r */, (char)(c)); 3949 p.writePacked(0, 0xFFFFC07F, 0x3480); // p.r = 105 3950 closure_r(p, c); 3951 } 3952 } 3953 3954 /** 3955 * Labels REF_XOR tree node 3956 * @param p node to label 3957 */ 3958 private static void label_REF_XOR(AbstractBURS_TreeNode p) { 3959 p.initCost(); 3960 AbstractBURS_TreeNode lchild, rchild; 3961 lchild = p.getChild1(); 3962 rchild = p.getChild2(); 3963 label(lchild); 3964 label(rchild); 3965 int c; 3966 // r: REF_XOR(r,r) 3967 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 10; 3968 if(BURS.DEBUG) trace(p, 55, c + 0, p.getCost(2) /* r */); 3969 if (c < p.getCost(2) /* r */) { 3970 p.setCost(2 /* r */, (char)(c)); 3971 p.writePacked(0, 0xFFFFC07F, 0x1280); // p.r = 37 3972 closure_r(p, c); 3973 } 3974 if ( // r: REF_XOR(r,INT_CONSTANT) 3975 rchild.getOpcode() == INT_CONSTANT_opcode 3976 ) { 3977 c = STATE(lchild).getCost(2 /* r */) + 10; 3978 if(BURS.DEBUG) trace(p, 139, c + 0, p.getCost(2) /* r */); 3979 if (c < p.getCost(2) /* r */) { 3980 p.setCost(2 /* r */, (char)(c)); 3981 p.writePacked(0, 0xFFFFC07F, 0x1300); // p.r = 38 3982 closure_r(p, c); 3983 } 3984 } 3985 if ( // r: REF_XOR(r,REF_MOVE(INT_CONSTANT)) 3986 rchild.getOpcode() == REF_MOVE_opcode && 3987 rchild.getChild1().getOpcode() == INT_CONSTANT_opcode 3988 ) { 3989 c = STATE(lchild).getCost(2 /* r */) + (U16(IV(Move.getVal(PR(p))))?10:INFINITE); 3990 if(BURS.DEBUG) trace(p, 190, c + 0, p.getCost(2) /* r */); 3991 if (c < p.getCost(2) /* r */) { 3992 p.setCost(2 /* r */, (char)(c)); 3993 p.writePacked(0, 0xFFFFC07F, 0x3A80); // p.r = 117 3994 closure_r(p, c); 3995 } 3996 } 3997 } 3998 3999 /** 4000 * Labels REF_NOT tree node 4001 * @param p node to label 4002 */ 4003 private static void label_REF_NOT(AbstractBURS_TreeNode p) { 4004 p.initCost(); 4005 AbstractBURS_TreeNode lchild; 4006 lchild = p.getChild1(); 4007 label(lchild); 4008 int c; 4009 // r: REF_NOT(r) 4010 c = STATE(lchild).getCost(2 /* r */) + 10; 4011 if(BURS.DEBUG) trace(p, 140, c + 0, p.getCost(2) /* r */); 4012 if (c < p.getCost(2) /* r */) { 4013 p.setCost(2 /* r */, (char)(c)); 4014 p.writePacked(0, 0xFFFFC07F, 0x1380); // p.r = 39 4015 closure_r(p, c); 4016 } 4017 if ( // r: REF_NOT(REF_OR(r,r)) 4018 lchild.getOpcode() == REF_OR_opcode 4019 ) { 4020 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + 10; 4021 if(BURS.DEBUG) trace(p, 232, c + 0, p.getCost(2) /* r */); 4022 if (c < p.getCost(2) /* r */) { 4023 p.setCost(2 /* r */, (char)(c)); 4024 p.writePacked(0, 0xFFFFC07F, 0x1400); // p.r = 40 4025 closure_r(p, c); 4026 } 4027 } 4028 if ( // r: REF_NOT(REF_AND(r,r)) 4029 lchild.getOpcode() == REF_AND_opcode 4030 ) { 4031 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + 10; 4032 if(BURS.DEBUG) trace(p, 233, c + 0, p.getCost(2) /* r */); 4033 if (c < p.getCost(2) /* r */) { 4034 p.setCost(2 /* r */, (char)(c)); 4035 p.writePacked(0, 0xFFFFC07F, 0x1480); // p.r = 41 4036 closure_r(p, c); 4037 } 4038 } 4039 if ( // r: REF_NOT(REF_XOR(r,r)) 4040 lchild.getOpcode() == REF_XOR_opcode 4041 ) { 4042 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + 10; 4043 if(BURS.DEBUG) trace(p, 234, c + 0, p.getCost(2) /* r */); 4044 if (c < p.getCost(2) /* r */) { 4045 p.setCost(2 /* r */, (char)(c)); 4046 p.writePacked(0, 0xFFFFC07F, 0x1500); // p.r = 42 4047 closure_r(p, c); 4048 } 4049 } 4050 } 4051 4052 /** 4053 * Labels LONG_NOT tree node 4054 * @param p node to label 4055 */ 4056 private static void label_LONG_NOT(AbstractBURS_TreeNode p) { 4057 p.initCost(); 4058 AbstractBURS_TreeNode lchild; 4059 lchild = p.getChild1(); 4060 label(lchild); 4061 int c; 4062 // r: LONG_NOT(r) 4063 c = STATE(lchild).getCost(2 /* r */) + 20; 4064 if(BURS.DEBUG) trace(p, 180, c + 0, p.getCost(2) /* r */); 4065 if (c < p.getCost(2) /* r */) { 4066 p.setCost(2 /* r */, (char)(c)); 4067 p.writePacked(0, 0xFFFFC07F, 0x3580); // p.r = 107 4068 closure_r(p, c); 4069 } 4070 } 4071 4072 /** 4073 * Labels LONG_XOR tree node 4074 * @param p node to label 4075 */ 4076 private static void label_LONG_XOR(AbstractBURS_TreeNode p) { 4077 p.initCost(); 4078 AbstractBURS_TreeNode lchild, rchild; 4079 lchild = p.getChild1(); 4080 rchild = p.getChild2(); 4081 label(lchild); 4082 label(rchild); 4083 int c; 4084 // r: LONG_XOR(r,r) 4085 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 20; 4086 if(BURS.DEBUG) trace(p, 95, c + 0, p.getCost(2) /* r */); 4087 if (c < p.getCost(2) /* r */) { 4088 p.setCost(2 /* r */, (char)(c)); 4089 p.writePacked(0, 0xFFFFC07F, 0x3500); // p.r = 106 4090 closure_r(p, c); 4091 } 4092 } 4093 4094 /** 4095 * Labels INT_2LONG tree node 4096 * @param p node to label 4097 */ 4098 private static void label_INT_2LONG(AbstractBURS_TreeNode p) { 4099 p.initCost(); 4100 AbstractBURS_TreeNode lchild; 4101 lchild = p.getChild1(); 4102 label(lchild); 4103 int c; 4104 // r: INT_2LONG(r) 4105 c = STATE(lchild).getCost(2 /* r */) + 20; 4106 if(BURS.DEBUG) trace(p, 181, c + 0, p.getCost(2) /* r */); 4107 if (c < p.getCost(2) /* r */) { 4108 p.setCost(2 /* r */, (char)(c)); 4109 p.writePacked(0, 0xFFFFC07F, 0x3600); // p.r = 108 4110 closure_r(p, c); 4111 } 4112 } 4113 4114 /** 4115 * Labels INT_2FLOAT tree node 4116 * @param p node to label 4117 */ 4118 private static void label_INT_2FLOAT(AbstractBURS_TreeNode p) { 4119 p.initCost(); 4120 AbstractBURS_TreeNode lchild; 4121 lchild = p.getChild1(); 4122 label(lchild); 4123 int c; 4124 // r: INT_2FLOAT(r) 4125 c = STATE(lchild).getCost(2 /* r */) + 10; 4126 if(BURS.DEBUG) trace(p, 148, c + 0, p.getCost(2) /* r */); 4127 if (c < p.getCost(2) /* r */) { 4128 p.setCost(2 /* r */, (char)(c)); 4129 p.writePacked(0, 0xFFFFC07F, 0x2180); // p.r = 67 4130 closure_r(p, c); 4131 } 4132 } 4133 4134 /** 4135 * Labels INT_2DOUBLE tree node 4136 * @param p node to label 4137 */ 4138 private static void label_INT_2DOUBLE(AbstractBURS_TreeNode p) { 4139 p.initCost(); 4140 AbstractBURS_TreeNode lchild; 4141 lchild = p.getChild1(); 4142 label(lchild); 4143 int c; 4144 // r: INT_2DOUBLE(r) 4145 c = STATE(lchild).getCost(2 /* r */) + 10; 4146 if(BURS.DEBUG) trace(p, 149, c + 0, p.getCost(2) /* r */); 4147 if (c < p.getCost(2) /* r */) { 4148 p.setCost(2 /* r */, (char)(c)); 4149 p.writePacked(0, 0xFFFFC07F, 0x2200); // p.r = 68 4150 closure_r(p, c); 4151 } 4152 } 4153 4154 /** 4155 * Labels LONG_2INT tree node 4156 * @param p node to label 4157 */ 4158 private static void label_LONG_2INT(AbstractBURS_TreeNode p) { 4159 p.initCost(); 4160 AbstractBURS_TreeNode lchild; 4161 lchild = p.getChild1(); 4162 label(lchild); 4163 int c; 4164 // r: LONG_2INT(r) 4165 c = STATE(lchild).getCost(2 /* r */) + 10; 4166 if(BURS.DEBUG) trace(p, 182, c + 0, p.getCost(2) /* r */); 4167 if (c < p.getCost(2) /* r */) { 4168 p.setCost(2 /* r */, (char)(c)); 4169 p.writePacked(0, 0xFFFFC07F, 0x3680); // p.r = 109 4170 closure_r(p, c); 4171 } 4172 } 4173 4174 /** 4175 * Labels FLOAT_2INT tree node 4176 * @param p node to label 4177 */ 4178 private static void label_FLOAT_2INT(AbstractBURS_TreeNode p) { 4179 p.initCost(); 4180 AbstractBURS_TreeNode lchild; 4181 lchild = p.getChild1(); 4182 label(lchild); 4183 int c; 4184 // r: FLOAT_2INT(r) 4185 c = STATE(lchild).getCost(2 /* r */) + 10; 4186 if(BURS.DEBUG) trace(p, 150, c + 0, p.getCost(2) /* r */); 4187 if (c < p.getCost(2) /* r */) { 4188 p.setCost(2 /* r */, (char)(c)); 4189 p.writePacked(0, 0xFFFFC07F, 0x2280); // p.r = 69 4190 closure_r(p, c); 4191 } 4192 } 4193 4194 /** 4195 * Labels FLOAT_2DOUBLE tree node 4196 * @param p node to label 4197 */ 4198 private static void label_FLOAT_2DOUBLE(AbstractBURS_TreeNode p) { 4199 p.initCost(); 4200 AbstractBURS_TreeNode lchild; 4201 lchild = p.getChild1(); 4202 label(lchild); 4203 int c; 4204 // r: FLOAT_2DOUBLE(r) 4205 c = STATE(lchild).getCost(2 /* r */) + 10; 4206 if(BURS.DEBUG) trace(p, 151, c + 0, p.getCost(2) /* r */); 4207 if (c < p.getCost(2) /* r */) { 4208 p.setCost(2 /* r */, (char)(c)); 4209 p.writePacked(0, 0xFFFFC07F, 0x2300); // p.r = 70 4210 closure_r(p, c); 4211 } 4212 } 4213 4214 /** 4215 * Labels DOUBLE_2INT tree node 4216 * @param p node to label 4217 */ 4218 private static void label_DOUBLE_2INT(AbstractBURS_TreeNode p) { 4219 p.initCost(); 4220 AbstractBURS_TreeNode lchild; 4221 lchild = p.getChild1(); 4222 label(lchild); 4223 int c; 4224 // r: DOUBLE_2INT(r) 4225 c = STATE(lchild).getCost(2 /* r */) + 10; 4226 if(BURS.DEBUG) trace(p, 152, c + 0, p.getCost(2) /* r */); 4227 if (c < p.getCost(2) /* r */) { 4228 p.setCost(2 /* r */, (char)(c)); 4229 p.writePacked(0, 0xFFFFC07F, 0x2380); // p.r = 71 4230 closure_r(p, c); 4231 } 4232 } 4233 4234 /** 4235 * Labels DOUBLE_2FLOAT tree node 4236 * @param p node to label 4237 */ 4238 private static void label_DOUBLE_2FLOAT(AbstractBURS_TreeNode p) { 4239 p.initCost(); 4240 AbstractBURS_TreeNode lchild; 4241 lchild = p.getChild1(); 4242 label(lchild); 4243 int c; 4244 // r: DOUBLE_2FLOAT(r) 4245 c = STATE(lchild).getCost(2 /* r */) + 10; 4246 if(BURS.DEBUG) trace(p, 153, c + 0, p.getCost(2) /* r */); 4247 if (c < p.getCost(2) /* r */) { 4248 p.setCost(2 /* r */, (char)(c)); 4249 p.writePacked(0, 0xFFFFC07F, 0x2400); // p.r = 72 4250 closure_r(p, c); 4251 } 4252 } 4253 4254 /** 4255 * Labels INT_2BYTE tree node 4256 * @param p node to label 4257 */ 4258 private static void label_INT_2BYTE(AbstractBURS_TreeNode p) { 4259 p.initCost(); 4260 AbstractBURS_TreeNode lchild; 4261 lchild = p.getChild1(); 4262 label(lchild); 4263 int c; 4264 // rs: INT_2BYTE(r) 4265 c = STATE(lchild).getCost(2 /* r */) + 10; 4266 if(BURS.DEBUG) trace(p, 145, c + 0, p.getCost(4) /* rs */); 4267 if (c < p.getCost(4) /* rs */) { 4268 p.setCost(4 /* rs */, (char)(c)); 4269 p.writePacked(0, 0xFFE0FFFF, 0x40000); // p.rs = 4 4270 closure_rs(p, c); 4271 } 4272 } 4273 4274 /** 4275 * Labels INT_2USHORT tree node 4276 * @param p node to label 4277 */ 4278 private static void label_INT_2USHORT(AbstractBURS_TreeNode p) { 4279 p.initCost(); 4280 AbstractBURS_TreeNode lchild; 4281 lchild = p.getChild1(); 4282 label(lchild); 4283 int c; 4284 // rp: INT_2USHORT(r) 4285 c = STATE(lchild).getCost(2 /* r */) + 20; 4286 if(BURS.DEBUG) trace(p, 146, c + 0, p.getCost(6) /* rp */); 4287 if (c < p.getCost(6) /* rp */) { 4288 p.setCost(6 /* rp */, (char)(c)); 4289 p.writePacked(0, 0xF0FFFFFF, 0x9000000); // p.rp = 9 4290 closure_rp(p, c); 4291 } 4292 } 4293 4294 /** 4295 * Labels INT_2SHORT tree node 4296 * @param p node to label 4297 */ 4298 private static void label_INT_2SHORT(AbstractBURS_TreeNode p) { 4299 p.initCost(); 4300 AbstractBURS_TreeNode lchild; 4301 lchild = p.getChild1(); 4302 label(lchild); 4303 int c; 4304 // rs: INT_2SHORT(r) 4305 c = STATE(lchild).getCost(2 /* r */) + 10; 4306 if(BURS.DEBUG) trace(p, 147, c + 0, p.getCost(4) /* rs */); 4307 if (c < p.getCost(4) /* rs */) { 4308 p.setCost(4 /* rs */, (char)(c)); 4309 p.writePacked(0, 0xFFE0FFFF, 0x50000); // p.rs = 5 4310 closure_rs(p, c); 4311 } 4312 } 4313 4314 /** 4315 * Labels LONG_CMP tree node 4316 * @param p node to label 4317 */ 4318 private static void label_LONG_CMP(AbstractBURS_TreeNode p) { 4319 p.initCost(); 4320 AbstractBURS_TreeNode lchild, rchild; 4321 lchild = p.getChild1(); 4322 rchild = p.getChild2(); 4323 label(lchild); 4324 label(rchild); 4325 int c; 4326 // stm: LONG_CMP(r,r) 4327 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 40; 4328 if(BURS.DEBUG) trace(p, 96, c + 0, p.getCost(1) /* stm */); 4329 if (c < p.getCost(1) /* stm */) { 4330 p.setCost(1 /* stm */, (char)(c)); 4331 p.writePacked(0, 0xFFFFFF80, 0x4A); // p.stm = 74 4332 } 4333 } 4334 4335 /** 4336 * Labels FLOAT_CMPL tree node 4337 * @param p node to label 4338 */ 4339 private static void label_FLOAT_CMPL(AbstractBURS_TreeNode p) { 4340 p.initCost(); 4341 AbstractBURS_TreeNode lchild, rchild; 4342 lchild = p.getChild1(); 4343 rchild = p.getChild2(); 4344 label(lchild); 4345 label(rchild); 4346 int c; 4347 // stm: FLOAT_CMPL(r,r) 4348 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 40; 4349 if(BURS.DEBUG) trace(p, 75, c + 0, p.getCost(1) /* stm */); 4350 if (c < p.getCost(1) /* stm */) { 4351 p.setCost(1 /* stm */, (char)(c)); 4352 p.writePacked(0, 0xFFFFFF80, 0x42); // p.stm = 66 4353 } 4354 } 4355 4356 /** 4357 * Labels FLOAT_CMPG tree node 4358 * @param p node to label 4359 */ 4360 private static void label_FLOAT_CMPG(AbstractBURS_TreeNode p) { 4361 p.initCost(); 4362 AbstractBURS_TreeNode lchild, rchild; 4363 lchild = p.getChild1(); 4364 rchild = p.getChild2(); 4365 label(lchild); 4366 label(rchild); 4367 int c; 4368 // stm: FLOAT_CMPG(r,r) 4369 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 40; 4370 if(BURS.DEBUG) trace(p, 76, c + 0, p.getCost(1) /* stm */); 4371 if (c < p.getCost(1) /* stm */) { 4372 p.setCost(1 /* stm */, (char)(c)); 4373 p.writePacked(0, 0xFFFFFF80, 0x43); // p.stm = 67 4374 } 4375 } 4376 4377 /** 4378 * Labels DOUBLE_CMPL tree node 4379 * @param p node to label 4380 */ 4381 private static void label_DOUBLE_CMPL(AbstractBURS_TreeNode p) { 4382 p.initCost(); 4383 AbstractBURS_TreeNode lchild, rchild; 4384 lchild = p.getChild1(); 4385 rchild = p.getChild2(); 4386 label(lchild); 4387 label(rchild); 4388 int c; 4389 // stm: DOUBLE_CMPL(r,r) 4390 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 40; 4391 if(BURS.DEBUG) trace(p, 77, c + 0, p.getCost(1) /* stm */); 4392 if (c < p.getCost(1) /* stm */) { 4393 p.setCost(1 /* stm */, (char)(c)); 4394 p.writePacked(0, 0xFFFFFF80, 0x44); // p.stm = 68 4395 } 4396 } 4397 4398 /** 4399 * Labels DOUBLE_CMPG tree node 4400 * @param p node to label 4401 */ 4402 private static void label_DOUBLE_CMPG(AbstractBURS_TreeNode p) { 4403 p.initCost(); 4404 AbstractBURS_TreeNode lchild, rchild; 4405 lchild = p.getChild1(); 4406 rchild = p.getChild2(); 4407 label(lchild); 4408 label(rchild); 4409 int c; 4410 // stm: DOUBLE_CMPG(r,r) 4411 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 40; 4412 if(BURS.DEBUG) trace(p, 78, c + 0, p.getCost(1) /* stm */); 4413 if (c < p.getCost(1) /* stm */) { 4414 p.setCost(1 /* stm */, (char)(c)); 4415 p.writePacked(0, 0xFFFFFF80, 0x45); // p.stm = 69 4416 } 4417 } 4418 4419 /** 4420 * Labels RETURN tree node 4421 * @param p node to label 4422 */ 4423 private static void label_RETURN(AbstractBURS_TreeNode p) { 4424 p.initCost(); 4425 AbstractBURS_TreeNode lchild; 4426 lchild = p.getChild1(); 4427 label(lchild); 4428 int c; 4429 if ( // stm: RETURN(NULL) 4430 lchild.getOpcode() == NULL_opcode 4431 ) { 4432 c = 10; 4433 if(BURS.DEBUG) trace(p, 32, c + 0, p.getCost(1) /* stm */); 4434 if (c < p.getCost(1) /* stm */) { 4435 p.setCost(1 /* stm */, (char)(c)); 4436 p.writePacked(0, 0xFFFFFF80, 0x47); // p.stm = 71 4437 } 4438 } 4439 // stm: RETURN(r) 4440 c = STATE(lchild).getCost(2 /* r */) + 10; 4441 if(BURS.DEBUG) trace(p, 175, c + 0, p.getCost(1) /* stm */); 4442 if (c < p.getCost(1) /* stm */) { 4443 p.setCost(1 /* stm */, (char)(c)); 4444 p.writePacked(0, 0xFFFFFF80, 0x48); // p.stm = 72 4445 } 4446 } 4447 4448 /** 4449 * Labels NULL_CHECK tree node 4450 * @param p node to label 4451 */ 4452 private static void label_NULL_CHECK(AbstractBURS_TreeNode p) { 4453 p.initCost(); 4454 AbstractBURS_TreeNode lchild; 4455 lchild = p.getChild1(); 4456 label(lchild); 4457 int c; 4458 // stm: NULL_CHECK(r) 4459 c = STATE(lchild).getCost(2 /* r */) + 11; 4460 if(BURS.DEBUG) trace(p, 102, c + 0, p.getCost(1) /* stm */); 4461 if (c < p.getCost(1) /* stm */) { 4462 p.setCost(1 /* stm */, (char)(c)); 4463 p.writePacked(0, 0xFFFFFF80, 0xB); // p.stm = 11 4464 } 4465 } 4466 4467 /** 4468 * Labels GOTO tree node 4469 * @param p node to label 4470 */ 4471 private static void label_GOTO(AbstractBURS_TreeNode p) { 4472 p.initCost(); 4473 // stm: GOTO 4474 if(BURS.DEBUG) trace(p, 31, 11 + 0, p.getCost(1) /* stm */); 4475 if (11 < p.getCost(1) /* stm */) { 4476 p.setCost(1 /* stm */, (char)(11)); 4477 p.writePacked(0, 0xFFFFFF80, 0x46); // p.stm = 70 4478 } 4479 } 4480 4481 /** 4482 * Labels BOOLEAN_NOT tree node 4483 * @param p node to label 4484 */ 4485 private static void label_BOOLEAN_NOT(AbstractBURS_TreeNode p) { 4486 p.initCost(); 4487 AbstractBURS_TreeNode lchild; 4488 lchild = p.getChild1(); 4489 label(lchild); 4490 int c; 4491 // r: BOOLEAN_NOT(r) 4492 c = STATE(lchild).getCost(2 /* r */) + 11; 4493 if(BURS.DEBUG) trace(p, 113, c + 0, p.getCost(2) /* r */); 4494 if (c < p.getCost(2) /* r */) { 4495 p.setCost(2 /* r */, (char)(c)); 4496 p.writePacked(0, 0xFFFFC07F, 0x400); // p.r = 8 4497 closure_r(p, c); 4498 } 4499 } 4500 4501 /** 4502 * Labels BOOLEAN_CMP_INT tree node 4503 * @param p node to label 4504 */ 4505 private static void label_BOOLEAN_CMP_INT(AbstractBURS_TreeNode p) { 4506 p.initCost(); 4507 AbstractBURS_TreeNode lchild, rchild; 4508 lchild = p.getChild1(); 4509 rchild = p.getChild2(); 4510 label(lchild); 4511 label(rchild); 4512 int c; 4513 if ( // r: BOOLEAN_CMP_INT(r,INT_CONSTANT) 4514 rchild.getOpcode() == INT_CONSTANT_opcode 4515 ) { 4516 c = STATE(lchild).getCost(2 /* r */) + 10; 4517 if(BURS.DEBUG) trace(p, 114, c + 0, p.getCost(2) /* r */); 4518 if (c < p.getCost(2) /* r */) { 4519 p.setCost(2 /* r */, (char)(c)); 4520 p.writePacked(0, 0xFFFFC07F, 0x480); // p.r = 9 4521 closure_r(p, c); 4522 } 4523 } 4524 // r: BOOLEAN_CMP_INT(r,r) 4525 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 10; 4526 if(BURS.DEBUG) trace(p, 41, c + 0, p.getCost(2) /* r */); 4527 if (c < p.getCost(2) /* r */) { 4528 p.setCost(2 /* r */, (char)(c)); 4529 p.writePacked(0, 0xFFFFC07F, 0x500); // p.r = 10 4530 closure_r(p, c); 4531 } 4532 if ( // boolcmp: BOOLEAN_CMP_INT(r,INT_CONSTANT) 4533 rchild.getOpcode() == INT_CONSTANT_opcode 4534 ) { 4535 c = STATE(lchild).getCost(2 /* r */) + 0; 4536 if(BURS.DEBUG) trace(p, 115, c + 0, p.getCost(8) /* boolcmp */); 4537 if (c < p.getCost(8) /* boolcmp */) { 4538 p.setCost(8 /* boolcmp */, (char)(c)); 4539 p.writePacked(1, 0xFFFFFFF0, 0x1); // p.boolcmp = 1 4540 } 4541 } 4542 // boolcmp: BOOLEAN_CMP_INT(r,r) 4543 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 0; 4544 if(BURS.DEBUG) trace(p, 42, c + 0, p.getCost(8) /* boolcmp */); 4545 if (c < p.getCost(8) /* boolcmp */) { 4546 p.setCost(8 /* boolcmp */, (char)(c)); 4547 p.writePacked(1, 0xFFFFFFF0, 0x2); // p.boolcmp = 2 4548 } 4549 if ( // boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 4550 rchild.getOpcode() == INT_CONSTANT_opcode 4551 ) { 4552 c = STATE(lchild).getCost(8 /* boolcmp */) + (VR(p) == 1 && BooleanCmp.getCond(P(p)).isEQUAL()?0:INFINITE); 4553 if(BURS.DEBUG) trace(p, 118, c + 0, p.getCost(8) /* boolcmp */); 4554 if (c < p.getCost(8) /* boolcmp */) { 4555 p.setCost(8 /* boolcmp */, (char)(c)); 4556 p.writePacked(1, 0xFFFFFFF0, 0x5); // p.boolcmp = 5 4557 } 4558 } 4559 if ( // boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 4560 rchild.getOpcode() == INT_CONSTANT_opcode 4561 ) { 4562 c = STATE(lchild).getCost(8 /* boolcmp */) + (VR(p) == 1 && BooleanCmp.getCond(P(p)).isNOT_EQUAL()?0:INFINITE); 4563 if(BURS.DEBUG) trace(p, 119, c + 0, p.getCost(8) /* boolcmp */); 4564 if (c < p.getCost(8) /* boolcmp */) { 4565 p.setCost(8 /* boolcmp */, (char)(c)); 4566 p.writePacked(1, 0xFFFFFFF0, 0x6); // p.boolcmp = 6 4567 } 4568 } 4569 if ( // boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 4570 rchild.getOpcode() == INT_CONSTANT_opcode 4571 ) { 4572 c = STATE(lchild).getCost(8 /* boolcmp */) + (VR(p) == 0 && BooleanCmp.getCond(P(p)).isNOT_EQUAL()?0:INFINITE); 4573 if(BURS.DEBUG) trace(p, 120, c + 0, p.getCost(8) /* boolcmp */); 4574 if (c < p.getCost(8) /* boolcmp */) { 4575 p.setCost(8 /* boolcmp */, (char)(c)); 4576 p.writePacked(1, 0xFFFFFFF0, 0x7); // p.boolcmp = 7 4577 } 4578 } 4579 if ( // boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 4580 rchild.getOpcode() == INT_CONSTANT_opcode 4581 ) { 4582 c = STATE(lchild).getCost(8 /* boolcmp */) + (VR(p) == 0 && BooleanCmp.getCond(P(p)).isEQUAL()?0:INFINITE); 4583 if(BURS.DEBUG) trace(p, 121, c + 0, p.getCost(8) /* boolcmp */); 4584 if (c < p.getCost(8) /* boolcmp */) { 4585 p.setCost(8 /* boolcmp */, (char)(c)); 4586 p.writePacked(1, 0xFFFFFFF0, 0x8); // p.boolcmp = 8 4587 } 4588 } 4589 if ( // r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 4590 rchild.getOpcode() == INT_CONSTANT_opcode 4591 ) { 4592 c = STATE(lchild).getCost(8 /* boolcmp */) + (VR(p) == 1 && BooleanCmp.getCond(P(p)).isEQUAL()?10:INFINITE); 4593 if(BURS.DEBUG) trace(p, 122, c + 0, p.getCost(2) /* r */); 4594 if (c < p.getCost(2) /* r */) { 4595 p.setCost(2 /* r */, (char)(c)); 4596 p.writePacked(0, 0xFFFFC07F, 0x680); // p.r = 13 4597 closure_r(p, c); 4598 } 4599 } 4600 if ( // r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 4601 rchild.getOpcode() == INT_CONSTANT_opcode 4602 ) { 4603 c = STATE(lchild).getCost(8 /* boolcmp */) + (VR(p) == 1 && BooleanCmp.getCond(P(p)).isNOT_EQUAL()?10:INFINITE); 4604 if(BURS.DEBUG) trace(p, 123, c + 0, p.getCost(2) /* r */); 4605 if (c < p.getCost(2) /* r */) { 4606 p.setCost(2 /* r */, (char)(c)); 4607 p.writePacked(0, 0xFFFFC07F, 0x700); // p.r = 14 4608 closure_r(p, c); 4609 } 4610 } 4611 if ( // r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 4612 rchild.getOpcode() == INT_CONSTANT_opcode 4613 ) { 4614 c = STATE(lchild).getCost(8 /* boolcmp */) + (VR(p) == 0 && BooleanCmp.getCond(P(p)).isNOT_EQUAL()?10:INFINITE); 4615 if(BURS.DEBUG) trace(p, 124, c + 0, p.getCost(2) /* r */); 4616 if (c < p.getCost(2) /* r */) { 4617 p.setCost(2 /* r */, (char)(c)); 4618 p.writePacked(0, 0xFFFFC07F, 0x780); // p.r = 15 4619 closure_r(p, c); 4620 } 4621 } 4622 if ( // r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 4623 rchild.getOpcode() == INT_CONSTANT_opcode 4624 ) { 4625 c = STATE(lchild).getCost(8 /* boolcmp */) + (VR(p) == 0 && BooleanCmp.getCond(P(p)).isEQUAL()?10:INFINITE); 4626 if(BURS.DEBUG) trace(p, 125, c + 0, p.getCost(2) /* r */); 4627 if (c < p.getCost(2) /* r */) { 4628 p.setCost(2 /* r */, (char)(c)); 4629 p.writePacked(0, 0xFFFFC07F, 0x800); // p.r = 16 4630 closure_r(p, c); 4631 } 4632 } 4633 } 4634 4635 /** 4636 * Labels BOOLEAN_CMP_ADDR tree node 4637 * @param p node to label 4638 */ 4639 private static void label_BOOLEAN_CMP_ADDR(AbstractBURS_TreeNode p) { 4640 p.initCost(); 4641 AbstractBURS_TreeNode lchild, rchild; 4642 lchild = p.getChild1(); 4643 rchild = p.getChild2(); 4644 label(lchild); 4645 label(rchild); 4646 int c; 4647 if ( // r: BOOLEAN_CMP_ADDR(r,INT_CONSTANT) 4648 rchild.getOpcode() == INT_CONSTANT_opcode 4649 ) { 4650 c = STATE(lchild).getCost(2 /* r */) + 10; 4651 if(BURS.DEBUG) trace(p, 116, c + 0, p.getCost(2) /* r */); 4652 if (c < p.getCost(2) /* r */) { 4653 p.setCost(2 /* r */, (char)(c)); 4654 p.writePacked(0, 0xFFFFC07F, 0x580); // p.r = 11 4655 closure_r(p, c); 4656 } 4657 } 4658 // r: BOOLEAN_CMP_ADDR(r,r) 4659 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 10; 4660 if(BURS.DEBUG) trace(p, 43, c + 0, p.getCost(2) /* r */); 4661 if (c < p.getCost(2) /* r */) { 4662 p.setCost(2 /* r */, (char)(c)); 4663 p.writePacked(0, 0xFFFFC07F, 0x600); // p.r = 12 4664 closure_r(p, c); 4665 } 4666 if ( // boolcmp: BOOLEAN_CMP_ADDR(r,INT_CONSTANT) 4667 rchild.getOpcode() == INT_CONSTANT_opcode 4668 ) { 4669 c = STATE(lchild).getCost(2 /* r */) + 0; 4670 if(BURS.DEBUG) trace(p, 117, c + 0, p.getCost(8) /* boolcmp */); 4671 if (c < p.getCost(8) /* boolcmp */) { 4672 p.setCost(8 /* boolcmp */, (char)(c)); 4673 p.writePacked(1, 0xFFFFFFF0, 0x3); // p.boolcmp = 3 4674 } 4675 } 4676 // boolcmp: BOOLEAN_CMP_ADDR(r,r) 4677 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 0; 4678 if(BURS.DEBUG) trace(p, 44, c + 0, p.getCost(8) /* boolcmp */); 4679 if (c < p.getCost(8) /* boolcmp */) { 4680 p.setCost(8 /* boolcmp */, (char)(c)); 4681 p.writePacked(1, 0xFFFFFFF0, 0x4); // p.boolcmp = 4 4682 } 4683 } 4684 4685 /** 4686 * Labels BYTE_LOAD tree node 4687 * @param p node to label 4688 */ 4689 private static void label_BYTE_LOAD(AbstractBURS_TreeNode p) { 4690 p.initCost(); 4691 AbstractBURS_TreeNode lchild, rchild; 4692 lchild = p.getChild1(); 4693 rchild = p.getChild2(); 4694 label(lchild); 4695 label(rchild); 4696 int c; 4697 if ( // rs: BYTE_LOAD(r,INT_CONSTANT) 4698 rchild.getOpcode() == INT_CONSTANT_opcode 4699 ) { 4700 c = STATE(lchild).getCost(2 /* r */) + 22; 4701 if(BURS.DEBUG) trace(p, 159, c + 0, p.getCost(4) /* rs */); 4702 if (c < p.getCost(4) /* rs */) { 4703 p.setCost(4 /* rs */, (char)(c)); 4704 p.writePacked(0, 0xFFE0FFFF, 0x90000); // p.rs = 9 4705 closure_rs(p, c); 4706 } 4707 } 4708 // rs: BYTE_LOAD(r,r) 4709 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 22; 4710 if(BURS.DEBUG) trace(p, 64, c + 0, p.getCost(4) /* rs */); 4711 if (c < p.getCost(4) /* rs */) { 4712 p.setCost(4 /* rs */, (char)(c)); 4713 p.writePacked(0, 0xFFE0FFFF, 0xA0000); // p.rs = 10 4714 closure_rs(p, c); 4715 } 4716 } 4717 4718 /** 4719 * Labels UBYTE_LOAD tree node 4720 * @param p node to label 4721 */ 4722 private static void label_UBYTE_LOAD(AbstractBURS_TreeNode p) { 4723 p.initCost(); 4724 AbstractBURS_TreeNode lchild, rchild; 4725 lchild = p.getChild1(); 4726 rchild = p.getChild2(); 4727 label(lchild); 4728 label(rchild); 4729 int c; 4730 if ( // rp: UBYTE_LOAD(r,INT_CONSTANT) 4731 rchild.getOpcode() == INT_CONSTANT_opcode 4732 ) { 4733 c = STATE(lchild).getCost(2 /* r */) + 11; 4734 if(BURS.DEBUG) trace(p, 160, c + 0, p.getCost(6) /* rp */); 4735 if (c < p.getCost(6) /* rp */) { 4736 p.setCost(6 /* rp */, (char)(c)); 4737 p.writePacked(0, 0xF0FFFFFF, 0xC000000); // p.rp = 12 4738 closure_rp(p, c); 4739 } 4740 } 4741 // rp: UBYTE_LOAD(r,r) 4742 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 11; 4743 if(BURS.DEBUG) trace(p, 65, c + 0, p.getCost(6) /* rp */); 4744 if (c < p.getCost(6) /* rp */) { 4745 p.setCost(6 /* rp */, (char)(c)); 4746 p.writePacked(0, 0xF0FFFFFF, 0xD000000); // p.rp = 13 4747 closure_rp(p, c); 4748 } 4749 } 4750 4751 /** 4752 * Labels SHORT_LOAD tree node 4753 * @param p node to label 4754 */ 4755 private static void label_SHORT_LOAD(AbstractBURS_TreeNode p) { 4756 p.initCost(); 4757 AbstractBURS_TreeNode lchild, rchild; 4758 lchild = p.getChild1(); 4759 rchild = p.getChild2(); 4760 label(lchild); 4761 label(rchild); 4762 int c; 4763 if ( // rs: SHORT_LOAD(r,INT_CONSTANT) 4764 rchild.getOpcode() == INT_CONSTANT_opcode 4765 ) { 4766 c = STATE(lchild).getCost(2 /* r */) + 11; 4767 if(BURS.DEBUG) trace(p, 161, c + 0, p.getCost(4) /* rs */); 4768 if (c < p.getCost(4) /* rs */) { 4769 p.setCost(4 /* rs */, (char)(c)); 4770 p.writePacked(0, 0xFFE0FFFF, 0xB0000); // p.rs = 11 4771 closure_rs(p, c); 4772 } 4773 } 4774 // rs: SHORT_LOAD(r,r) 4775 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 11; 4776 if(BURS.DEBUG) trace(p, 66, c + 0, p.getCost(4) /* rs */); 4777 if (c < p.getCost(4) /* rs */) { 4778 p.setCost(4 /* rs */, (char)(c)); 4779 p.writePacked(0, 0xFFE0FFFF, 0xC0000); // p.rs = 12 4780 closure_rs(p, c); 4781 } 4782 } 4783 4784 /** 4785 * Labels USHORT_LOAD tree node 4786 * @param p node to label 4787 */ 4788 private static void label_USHORT_LOAD(AbstractBURS_TreeNode p) { 4789 p.initCost(); 4790 AbstractBURS_TreeNode lchild, rchild; 4791 lchild = p.getChild1(); 4792 rchild = p.getChild2(); 4793 label(lchild); 4794 label(rchild); 4795 int c; 4796 if ( // rp: USHORT_LOAD(r,INT_CONSTANT) 4797 rchild.getOpcode() == INT_CONSTANT_opcode 4798 ) { 4799 c = STATE(lchild).getCost(2 /* r */) + 11; 4800 if(BURS.DEBUG) trace(p, 162, c + 0, p.getCost(6) /* rp */); 4801 if (c < p.getCost(6) /* rp */) { 4802 p.setCost(6 /* rp */, (char)(c)); 4803 p.writePacked(0, 0xF0FFFFFF, 0xE000000); // p.rp = 14 4804 closure_rp(p, c); 4805 } 4806 } 4807 // rp: USHORT_LOAD(r,r) 4808 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 11; 4809 if(BURS.DEBUG) trace(p, 67, c + 0, p.getCost(6) /* rp */); 4810 if (c < p.getCost(6) /* rp */) { 4811 p.setCost(6 /* rp */, (char)(c)); 4812 p.writePacked(0, 0xF0FFFFFF, 0xF000000); // p.rp = 15 4813 closure_rp(p, c); 4814 } 4815 } 4816 4817 /** 4818 * Labels INT_LOAD tree node 4819 * @param p node to label 4820 */ 4821 private static void label_INT_LOAD(AbstractBURS_TreeNode p) { 4822 p.initCost(); 4823 AbstractBURS_TreeNode lchild, rchild; 4824 lchild = p.getChild1(); 4825 rchild = p.getChild2(); 4826 label(lchild); 4827 label(rchild); 4828 int c; 4829 if ( // rs: INT_LOAD(r,INT_CONSTANT) 4830 rchild.getOpcode() == INT_CONSTANT_opcode 4831 ) { 4832 c = STATE(lchild).getCost(2 /* r */) + 11; 4833 if(BURS.DEBUG) trace(p, 167, c + 0, p.getCost(4) /* rs */); 4834 if (c < p.getCost(4) /* rs */) { 4835 p.setCost(4 /* rs */, (char)(c)); 4836 p.writePacked(0, 0xFFE0FFFF, 0xD0000); // p.rs = 13 4837 closure_rs(p, c); 4838 } 4839 } 4840 if ( // rs: INT_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 4841 rchild.getOpcode() == REF_MOVE_opcode && 4842 rchild.getChild1().getOpcode() == ADDRESS_CONSTANT_opcode 4843 ) { 4844 c = STATE(lchild).getCost(2 /* r */) + FITS(Move.getVal(PR(p)),32,22); 4845 if(BURS.DEBUG) trace(p, 168, c + 0, p.getCost(4) /* rs */); 4846 if (c < p.getCost(4) /* rs */) { 4847 p.setCost(4 /* rs */, (char)(c)); 4848 p.writePacked(0, 0xFFE0FFFF, 0xE0000); // p.rs = 14 4849 closure_rs(p, c); 4850 } 4851 } 4852 // rs: INT_LOAD(r,r) 4853 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 11; 4854 if(BURS.DEBUG) trace(p, 70, c + 0, p.getCost(4) /* rs */); 4855 if (c < p.getCost(4) /* rs */) { 4856 p.setCost(4 /* rs */, (char)(c)); 4857 p.writePacked(0, 0xFFE0FFFF, 0xF0000); // p.rs = 15 4858 closure_rs(p, c); 4859 } 4860 if ( // rs: INT_LOAD(REF_ADD(r,r),INT_CONSTANT) 4861 lchild.getOpcode() == REF_ADD_opcode && 4862 rchild.getOpcode() == INT_CONSTANT_opcode 4863 ) { 4864 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(lchild.getChild2()).getCost(2 /* r */) + isZERO(VR(p), 11); 4865 if(BURS.DEBUG) trace(p, 236, c + 0, p.getCost(4) /* rs */); 4866 if (c < p.getCost(4) /* rs */) { 4867 p.setCost(4 /* rs */, (char)(c)); 4868 p.writePacked(0, 0xFFE0FFFF, 0x100000); // p.rs = 16 4869 closure_rs(p, c); 4870 } 4871 } 4872 if ( // rs: INT_LOAD(REF_ADD(r,INT_CONSTANT),INT_CONSTANT) 4873 lchild.getOpcode() == REF_ADD_opcode && 4874 lchild.getChild2().getOpcode() == INT_CONSTANT_opcode && 4875 rchild.getOpcode() == INT_CONSTANT_opcode 4876 ) { 4877 c = STATE(lchild.getChild1()).getCost(2 /* r */) + (SI16(VR(p)+VLR(p)) ? 14 : INFINITE); 4878 if(BURS.DEBUG) trace(p, 203, c + 0, p.getCost(4) /* rs */); 4879 if (c < p.getCost(4) /* rs */) { 4880 p.setCost(4 /* rs */, (char)(c)); 4881 p.writePacked(0, 0xFFE0FFFF, 0x110000); // p.rs = 17 4882 closure_rs(p, c); 4883 } 4884 } 4885 } 4886 4887 /** 4888 * Labels LONG_LOAD tree node 4889 * @param p node to label 4890 */ 4891 private static void label_LONG_LOAD(AbstractBURS_TreeNode p) { 4892 p.initCost(); 4893 AbstractBURS_TreeNode lchild, rchild; 4894 lchild = p.getChild1(); 4895 rchild = p.getChild2(); 4896 label(lchild); 4897 label(rchild); 4898 int c; 4899 if ( // r: LONG_LOAD(r,INT_CONSTANT) 4900 rchild.getOpcode() == INT_CONSTANT_opcode 4901 ) { 4902 c = STATE(lchild).getCost(2 /* r */) + 21; 4903 if(BURS.DEBUG) trace(p, 191, c + 0, p.getCost(2) /* r */); 4904 if (c < p.getCost(2) /* r */) { 4905 p.setCost(2 /* r */, (char)(c)); 4906 p.writePacked(0, 0xFFFFC07F, 0x3C80); // p.r = 121 4907 closure_r(p, c); 4908 } 4909 } 4910 if ( // r: LONG_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 4911 rchild.getOpcode() == REF_MOVE_opcode && 4912 rchild.getChild1().getOpcode() == ADDRESS_CONSTANT_opcode 4913 ) { 4914 c = STATE(lchild).getCost(2 /* r */) + 21; 4915 if(BURS.DEBUG) trace(p, 192, c + 0, p.getCost(2) /* r */); 4916 if (c < p.getCost(2) /* r */) { 4917 p.setCost(2 /* r */, (char)(c)); 4918 p.writePacked(0, 0xFFFFC07F, 0x3D00); // p.r = 122 4919 closure_r(p, c); 4920 } 4921 } 4922 // r: LONG_LOAD(r,r) 4923 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 21; 4924 if(BURS.DEBUG) trace(p, 98, c + 0, p.getCost(2) /* r */); 4925 if (c < p.getCost(2) /* r */) { 4926 p.setCost(2 /* r */, (char)(c)); 4927 p.writePacked(0, 0xFFFFC07F, 0x3D80); // p.r = 123 4928 closure_r(p, c); 4929 } 4930 } 4931 4932 /** 4933 * Labels FLOAT_LOAD tree node 4934 * @param p node to label 4935 */ 4936 private static void label_FLOAT_LOAD(AbstractBURS_TreeNode p) { 4937 p.initCost(); 4938 AbstractBURS_TreeNode lchild, rchild; 4939 lchild = p.getChild1(); 4940 rchild = p.getChild2(); 4941 label(lchild); 4942 label(rchild); 4943 int c; 4944 if ( // r: FLOAT_LOAD(r,INT_CONSTANT) 4945 rchild.getOpcode() == INT_CONSTANT_opcode 4946 ) { 4947 c = STATE(lchild).getCost(2 /* r */) + 11; 4948 if(BURS.DEBUG) trace(p, 163, c + 0, p.getCost(2) /* r */); 4949 if (c < p.getCost(2) /* r */) { 4950 p.setCost(2 /* r */, (char)(c)); 4951 p.writePacked(0, 0xFFFFC07F, 0x2700); // p.r = 78 4952 closure_r(p, c); 4953 } 4954 } 4955 if ( // r: FLOAT_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 4956 rchild.getOpcode() == REF_MOVE_opcode && 4957 rchild.getChild1().getOpcode() == ADDRESS_CONSTANT_opcode 4958 ) { 4959 c = STATE(lchild).getCost(2 /* r */) + FITS(Move.getVal(PR(p)),32,22); 4960 if(BURS.DEBUG) trace(p, 164, c + 0, p.getCost(2) /* r */); 4961 if (c < p.getCost(2) /* r */) { 4962 p.setCost(2 /* r */, (char)(c)); 4963 p.writePacked(0, 0xFFFFC07F, 0x2780); // p.r = 79 4964 closure_r(p, c); 4965 } 4966 } 4967 // r: FLOAT_LOAD(r,r) 4968 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 11; 4969 if(BURS.DEBUG) trace(p, 68, c + 0, p.getCost(2) /* r */); 4970 if (c < p.getCost(2) /* r */) { 4971 p.setCost(2 /* r */, (char)(c)); 4972 p.writePacked(0, 0xFFFFC07F, 0x2800); // p.r = 80 4973 closure_r(p, c); 4974 } 4975 } 4976 4977 /** 4978 * Labels DOUBLE_LOAD tree node 4979 * @param p node to label 4980 */ 4981 private static void label_DOUBLE_LOAD(AbstractBURS_TreeNode p) { 4982 p.initCost(); 4983 AbstractBURS_TreeNode lchild, rchild; 4984 lchild = p.getChild1(); 4985 rchild = p.getChild2(); 4986 label(lchild); 4987 label(rchild); 4988 int c; 4989 if ( // r: DOUBLE_LOAD(r,INT_CONSTANT) 4990 rchild.getOpcode() == INT_CONSTANT_opcode 4991 ) { 4992 c = STATE(lchild).getCost(2 /* r */) + 11; 4993 if(BURS.DEBUG) trace(p, 165, c + 0, p.getCost(2) /* r */); 4994 if (c < p.getCost(2) /* r */) { 4995 p.setCost(2 /* r */, (char)(c)); 4996 p.writePacked(0, 0xFFFFC07F, 0x2880); // p.r = 81 4997 closure_r(p, c); 4998 } 4999 } 5000 if ( // r: DOUBLE_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 5001 rchild.getOpcode() == REF_MOVE_opcode && 5002 rchild.getChild1().getOpcode() == ADDRESS_CONSTANT_opcode 5003 ) { 5004 c = STATE(lchild).getCost(2 /* r */) + FITS(Move.getVal(PR(p)),32,22); 5005 if(BURS.DEBUG) trace(p, 166, c + 0, p.getCost(2) /* r */); 5006 if (c < p.getCost(2) /* r */) { 5007 p.setCost(2 /* r */, (char)(c)); 5008 p.writePacked(0, 0xFFFFC07F, 0x2900); // p.r = 82 5009 closure_r(p, c); 5010 } 5011 } 5012 // r: DOUBLE_LOAD(r,r) 5013 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 11; 5014 if(BURS.DEBUG) trace(p, 69, c + 0, p.getCost(2) /* r */); 5015 if (c < p.getCost(2) /* r */) { 5016 p.setCost(2 /* r */, (char)(c)); 5017 p.writePacked(0, 0xFFFFC07F, 0x2980); // p.r = 83 5018 closure_r(p, c); 5019 } 5020 } 5021 5022 /** 5023 * Labels BYTE_STORE tree node 5024 * @param p node to label 5025 */ 5026 private static void label_BYTE_STORE(AbstractBURS_TreeNode p) { 5027 p.initCost(); 5028 AbstractBURS_TreeNode lchild, rchild; 5029 lchild = p.getChild1(); 5030 rchild = p.getChild2(); 5031 label(lchild); 5032 label(rchild); 5033 int c; 5034 if ( // stm: BYTE_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 5035 rchild.getOpcode() == OTHER_OPERAND_opcode && 5036 rchild.getChild2().getOpcode() == INT_CONSTANT_opcode 5037 ) { 5038 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + 11; 5039 if(BURS.DEBUG) trace(p, 222, c + 0, p.getCost(1) /* stm */); 5040 if (c < p.getCost(1) /* stm */) { 5041 p.setCost(1 /* stm */, (char)(c)); 5042 p.writePacked(0, 0xFFFFFF80, 0x1B); // p.stm = 27 5043 } 5044 } 5045 if ( // stm: BYTE_STORE(r,OTHER_OPERAND(r,r)) 5046 rchild.getOpcode() == OTHER_OPERAND_opcode 5047 ) { 5048 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild2()).getCost(2 /* r */) + 11; 5049 if(BURS.DEBUG) trace(p, 252, c + 0, p.getCost(1) /* stm */); 5050 if (c < p.getCost(1) /* stm */) { 5051 p.setCost(1 /* stm */, (char)(c)); 5052 p.writePacked(0, 0xFFFFFF80, 0x1C); // p.stm = 28 5053 } 5054 } 5055 if ( // stm: BYTE_STORE(INT_2BYTE(r),OTHER_OPERAND(r,INT_CONSTANT)) 5056 lchild.getOpcode() == INT_2BYTE_opcode && 5057 rchild.getOpcode() == OTHER_OPERAND_opcode && 5058 rchild.getChild2().getOpcode() == INT_CONSTANT_opcode 5059 ) { 5060 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + 11; 5061 if(BURS.DEBUG) trace(p, 217, c + 0, p.getCost(1) /* stm */); 5062 if (c < p.getCost(1) /* stm */) { 5063 p.setCost(1 /* stm */, (char)(c)); 5064 p.writePacked(0, 0xFFFFFF80, 0x1D); // p.stm = 29 5065 } 5066 } 5067 if ( // stm: BYTE_STORE(INT_2BYTE(r),OTHER_OPERAND(r,r)) 5068 lchild.getOpcode() == INT_2BYTE_opcode && 5069 rchild.getOpcode() == OTHER_OPERAND_opcode 5070 ) { 5071 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild2()).getCost(2 /* r */) + 11; 5072 if(BURS.DEBUG) trace(p, 264, c + 0, p.getCost(1) /* stm */); 5073 if (c < p.getCost(1) /* stm */) { 5074 p.setCost(1 /* stm */, (char)(c)); 5075 p.writePacked(0, 0xFFFFFF80, 0x1E); // p.stm = 30 5076 } 5077 } 5078 } 5079 5080 /** 5081 * Labels SHORT_STORE tree node 5082 * @param p node to label 5083 */ 5084 private static void label_SHORT_STORE(AbstractBURS_TreeNode p) { 5085 p.initCost(); 5086 AbstractBURS_TreeNode lchild, rchild; 5087 lchild = p.getChild1(); 5088 rchild = p.getChild2(); 5089 label(lchild); 5090 label(rchild); 5091 int c; 5092 if ( // stm: SHORT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 5093 rchild.getOpcode() == OTHER_OPERAND_opcode && 5094 rchild.getChild2().getOpcode() == INT_CONSTANT_opcode 5095 ) { 5096 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + 11; 5097 if(BURS.DEBUG) trace(p, 223, c + 0, p.getCost(1) /* stm */); 5098 if (c < p.getCost(1) /* stm */) { 5099 p.setCost(1 /* stm */, (char)(c)); 5100 p.writePacked(0, 0xFFFFFF80, 0x1F); // p.stm = 31 5101 } 5102 } 5103 if ( // stm: SHORT_STORE(r,OTHER_OPERAND(r,r)) 5104 rchild.getOpcode() == OTHER_OPERAND_opcode 5105 ) { 5106 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild2()).getCost(2 /* r */) + 11; 5107 if(BURS.DEBUG) trace(p, 253, c + 0, p.getCost(1) /* stm */); 5108 if (c < p.getCost(1) /* stm */) { 5109 p.setCost(1 /* stm */, (char)(c)); 5110 p.writePacked(0, 0xFFFFFF80, 0x20); // p.stm = 32 5111 } 5112 } 5113 if ( // stm: SHORT_STORE(INT_2SHORT(r),OTHER_OPERAND(r,INT_CONSTANT)) 5114 lchild.getOpcode() == INT_2SHORT_opcode && 5115 rchild.getOpcode() == OTHER_OPERAND_opcode && 5116 rchild.getChild2().getOpcode() == INT_CONSTANT_opcode 5117 ) { 5118 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + 11; 5119 if(BURS.DEBUG) trace(p, 218, c + 0, p.getCost(1) /* stm */); 5120 if (c < p.getCost(1) /* stm */) { 5121 p.setCost(1 /* stm */, (char)(c)); 5122 p.writePacked(0, 0xFFFFFF80, 0x21); // p.stm = 33 5123 } 5124 } 5125 if ( // stm: SHORT_STORE(INT_2SHORT(r),OTHER_OPERAND(r,r)) 5126 lchild.getOpcode() == INT_2SHORT_opcode && 5127 rchild.getOpcode() == OTHER_OPERAND_opcode 5128 ) { 5129 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild2()).getCost(2 /* r */) + 11; 5130 if(BURS.DEBUG) trace(p, 265, c + 0, p.getCost(1) /* stm */); 5131 if (c < p.getCost(1) /* stm */) { 5132 p.setCost(1 /* stm */, (char)(c)); 5133 p.writePacked(0, 0xFFFFFF80, 0x22); // p.stm = 34 5134 } 5135 } 5136 if ( // stm: SHORT_STORE(INT_2USHORT(r),OTHER_OPERAND(r,INT_CONSTANT)) 5137 lchild.getOpcode() == INT_2USHORT_opcode && 5138 rchild.getOpcode() == OTHER_OPERAND_opcode && 5139 rchild.getChild2().getOpcode() == INT_CONSTANT_opcode 5140 ) { 5141 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + 11; 5142 if(BURS.DEBUG) trace(p, 219, c + 0, p.getCost(1) /* stm */); 5143 if (c < p.getCost(1) /* stm */) { 5144 p.setCost(1 /* stm */, (char)(c)); 5145 p.writePacked(0, 0xFFFFFF80, 0x23); // p.stm = 35 5146 } 5147 } 5148 if ( // stm: SHORT_STORE(INT_2USHORT(r),OTHER_OPERAND(r,r)) 5149 lchild.getOpcode() == INT_2USHORT_opcode && 5150 rchild.getOpcode() == OTHER_OPERAND_opcode 5151 ) { 5152 c = STATE(lchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild2()).getCost(2 /* r */) + 11; 5153 if(BURS.DEBUG) trace(p, 266, c + 0, p.getCost(1) /* stm */); 5154 if (c < p.getCost(1) /* stm */) { 5155 p.setCost(1 /* stm */, (char)(c)); 5156 p.writePacked(0, 0xFFFFFF80, 0x24); // p.stm = 36 5157 } 5158 } 5159 } 5160 5161 /** 5162 * Labels INT_STORE tree node 5163 * @param p node to label 5164 */ 5165 private static void label_INT_STORE(AbstractBURS_TreeNode p) { 5166 p.initCost(); 5167 AbstractBURS_TreeNode lchild, rchild; 5168 lchild = p.getChild1(); 5169 rchild = p.getChild2(); 5170 label(lchild); 5171 label(rchild); 5172 int c; 5173 if ( // stm: INT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 5174 rchild.getOpcode() == OTHER_OPERAND_opcode && 5175 rchild.getChild2().getOpcode() == INT_CONSTANT_opcode 5176 ) { 5177 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + 11; 5178 if(BURS.DEBUG) trace(p, 224, c + 0, p.getCost(1) /* stm */); 5179 if (c < p.getCost(1) /* stm */) { 5180 p.setCost(1 /* stm */, (char)(c)); 5181 p.writePacked(0, 0xFFFFFF80, 0x25); // p.stm = 37 5182 } 5183 } 5184 if ( // stm: INT_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 5185 rchild.getOpcode() == OTHER_OPERAND_opcode && 5186 rchild.getChild2().getOpcode() == REF_MOVE_opcode && 5187 rchild.getChild2().getChild1().getOpcode() == ADDRESS_CONSTANT_opcode 5188 ) { 5189 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + FITS(Move.getVal(PRR(p)),32,22); 5190 if(BURS.DEBUG) trace(p, 225, c + 0, p.getCost(1) /* stm */); 5191 if (c < p.getCost(1) /* stm */) { 5192 p.setCost(1 /* stm */, (char)(c)); 5193 p.writePacked(0, 0xFFFFFF80, 0x26); // p.stm = 38 5194 } 5195 } 5196 if ( // stm: INT_STORE(r,OTHER_OPERAND(r,r)) 5197 rchild.getOpcode() == OTHER_OPERAND_opcode 5198 ) { 5199 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild2()).getCost(2 /* r */) + 11; 5200 if(BURS.DEBUG) trace(p, 254, c + 0, p.getCost(1) /* stm */); 5201 if (c < p.getCost(1) /* stm */) { 5202 p.setCost(1 /* stm */, (char)(c)); 5203 p.writePacked(0, 0xFFFFFF80, 0x27); // p.stm = 39 5204 } 5205 } 5206 if ( // stm: INT_STORE(r,OTHER_OPERAND(REF_ADD(r,INT_CONSTANT),INT_CONSTANT)) 5207 rchild.getOpcode() == OTHER_OPERAND_opcode && 5208 rchild.getChild1().getOpcode() == REF_ADD_opcode && 5209 rchild.getChild1().getChild2().getOpcode() == INT_CONSTANT_opcode && 5210 rchild.getChild2().getOpcode() == INT_CONSTANT_opcode 5211 ) { 5212 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1().getChild1()).getCost(2 /* r */) + (SI16(VRR(p)+VRLR(p))?14:INFINITE); 5213 if(BURS.DEBUG) trace(p, 267, c + 0, p.getCost(1) /* stm */); 5214 if (c < p.getCost(1) /* stm */) { 5215 p.setCost(1 /* stm */, (char)(c)); 5216 p.writePacked(0, 0xFFFFFF80, 0x28); // p.stm = 40 5217 } 5218 } 5219 } 5220 5221 /** 5222 * Labels LONG_STORE tree node 5223 * @param p node to label 5224 */ 5225 private static void label_LONG_STORE(AbstractBURS_TreeNode p) { 5226 p.initCost(); 5227 AbstractBURS_TreeNode lchild, rchild; 5228 lchild = p.getChild1(); 5229 rchild = p.getChild2(); 5230 label(lchild); 5231 label(rchild); 5232 int c; 5233 if ( // stm: LONG_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 5234 rchild.getOpcode() == OTHER_OPERAND_opcode && 5235 rchild.getChild2().getOpcode() == INT_CONSTANT_opcode 5236 ) { 5237 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + 22; 5238 if(BURS.DEBUG) trace(p, 230, c + 0, p.getCost(1) /* stm */); 5239 if (c < p.getCost(1) /* stm */) { 5240 p.setCost(1 /* stm */, (char)(c)); 5241 p.writePacked(0, 0xFFFFFF80, 0x59); // p.stm = 89 5242 } 5243 } 5244 if ( // stm: LONG_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 5245 rchild.getOpcode() == OTHER_OPERAND_opcode && 5246 rchild.getChild2().getOpcode() == REF_MOVE_opcode && 5247 rchild.getChild2().getChild1().getOpcode() == ADDRESS_CONSTANT_opcode 5248 ) { 5249 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + 22; 5250 if(BURS.DEBUG) trace(p, 231, c + 0, p.getCost(1) /* stm */); 5251 if (c < p.getCost(1) /* stm */) { 5252 p.setCost(1 /* stm */, (char)(c)); 5253 p.writePacked(0, 0xFFFFFF80, 0x5A); // p.stm = 90 5254 } 5255 } 5256 if ( // stm: LONG_STORE(r,OTHER_OPERAND(r,r)) 5257 rchild.getOpcode() == OTHER_OPERAND_opcode 5258 ) { 5259 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild2()).getCost(2 /* r */) + 22; 5260 if(BURS.DEBUG) trace(p, 257, c + 0, p.getCost(1) /* stm */); 5261 if (c < p.getCost(1) /* stm */) { 5262 p.setCost(1 /* stm */, (char)(c)); 5263 p.writePacked(0, 0xFFFFFF80, 0x5B); // p.stm = 91 5264 } 5265 } 5266 } 5267 5268 /** 5269 * Labels FLOAT_STORE tree node 5270 * @param p node to label 5271 */ 5272 private static void label_FLOAT_STORE(AbstractBURS_TreeNode p) { 5273 p.initCost(); 5274 AbstractBURS_TreeNode lchild, rchild; 5275 lchild = p.getChild1(); 5276 rchild = p.getChild2(); 5277 label(lchild); 5278 label(rchild); 5279 int c; 5280 if ( // stm: FLOAT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 5281 rchild.getOpcode() == OTHER_OPERAND_opcode && 5282 rchild.getChild2().getOpcode() == INT_CONSTANT_opcode 5283 ) { 5284 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + 11; 5285 if(BURS.DEBUG) trace(p, 226, c + 0, p.getCost(1) /* stm */); 5286 if (c < p.getCost(1) /* stm */) { 5287 p.setCost(1 /* stm */, (char)(c)); 5288 p.writePacked(0, 0xFFFFFF80, 0x29); // p.stm = 41 5289 } 5290 } 5291 if ( // stm: FLOAT_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 5292 rchild.getOpcode() == OTHER_OPERAND_opcode && 5293 rchild.getChild2().getOpcode() == REF_MOVE_opcode && 5294 rchild.getChild2().getChild1().getOpcode() == ADDRESS_CONSTANT_opcode 5295 ) { 5296 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + FITS(Move.getVal(PRR(p)),32,22); 5297 if(BURS.DEBUG) trace(p, 227, c + 0, p.getCost(1) /* stm */); 5298 if (c < p.getCost(1) /* stm */) { 5299 p.setCost(1 /* stm */, (char)(c)); 5300 p.writePacked(0, 0xFFFFFF80, 0x2A); // p.stm = 42 5301 } 5302 } 5303 if ( // stm: FLOAT_STORE(r,OTHER_OPERAND(r,r)) 5304 rchild.getOpcode() == OTHER_OPERAND_opcode 5305 ) { 5306 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild2()).getCost(2 /* r */) + 11; 5307 if(BURS.DEBUG) trace(p, 255, c + 0, p.getCost(1) /* stm */); 5308 if (c < p.getCost(1) /* stm */) { 5309 p.setCost(1 /* stm */, (char)(c)); 5310 p.writePacked(0, 0xFFFFFF80, 0x2B); // p.stm = 43 5311 } 5312 } 5313 } 5314 5315 /** 5316 * Labels DOUBLE_STORE tree node 5317 * @param p node to label 5318 */ 5319 private static void label_DOUBLE_STORE(AbstractBURS_TreeNode p) { 5320 p.initCost(); 5321 AbstractBURS_TreeNode lchild, rchild; 5322 lchild = p.getChild1(); 5323 rchild = p.getChild2(); 5324 label(lchild); 5325 label(rchild); 5326 int c; 5327 if ( // stm: DOUBLE_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 5328 rchild.getOpcode() == OTHER_OPERAND_opcode && 5329 rchild.getChild2().getOpcode() == INT_CONSTANT_opcode 5330 ) { 5331 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + 11; 5332 if(BURS.DEBUG) trace(p, 228, c + 0, p.getCost(1) /* stm */); 5333 if (c < p.getCost(1) /* stm */) { 5334 p.setCost(1 /* stm */, (char)(c)); 5335 p.writePacked(0, 0xFFFFFF80, 0x2C); // p.stm = 44 5336 } 5337 } 5338 if ( // stm: DOUBLE_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 5339 rchild.getOpcode() == OTHER_OPERAND_opcode && 5340 rchild.getChild2().getOpcode() == REF_MOVE_opcode && 5341 rchild.getChild2().getChild1().getOpcode() == ADDRESS_CONSTANT_opcode 5342 ) { 5343 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + FITS(Move.getVal(PRR(p)),32,22); 5344 if(BURS.DEBUG) trace(p, 229, c + 0, p.getCost(1) /* stm */); 5345 if (c < p.getCost(1) /* stm */) { 5346 p.setCost(1 /* stm */, (char)(c)); 5347 p.writePacked(0, 0xFFFFFF80, 0x2D); // p.stm = 45 5348 } 5349 } 5350 if ( // stm: DOUBLE_STORE(r,OTHER_OPERAND(r,r)) 5351 rchild.getOpcode() == OTHER_OPERAND_opcode 5352 ) { 5353 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild.getChild1()).getCost(2 /* r */) + STATE(rchild.getChild2()).getCost(2 /* r */) + 11; 5354 if(BURS.DEBUG) trace(p, 256, c + 0, p.getCost(1) /* stm */); 5355 if (c < p.getCost(1) /* stm */) { 5356 p.setCost(1 /* stm */, (char)(c)); 5357 p.writePacked(0, 0xFFFFFF80, 0x2E); // p.stm = 46 5358 } 5359 } 5360 } 5361 5362 /** 5363 * Labels PREPARE_INT tree node 5364 * @param p node to label 5365 */ 5366 private static void label_PREPARE_INT(AbstractBURS_TreeNode p) { 5367 p.initCost(); 5368 AbstractBURS_TreeNode lchild, rchild; 5369 lchild = p.getChild1(); 5370 rchild = p.getChild2(); 5371 label(lchild); 5372 label(rchild); 5373 int c; 5374 // r: PREPARE_INT(r,r) 5375 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 11; 5376 if(BURS.DEBUG) trace(p, 83, c + 0, p.getCost(2) /* r */); 5377 if (c < p.getCost(2) /* r */) { 5378 p.setCost(2 /* r */, (char)(c)); 5379 p.writePacked(0, 0xFFFFC07F, 0x2D00); // p.r = 90 5380 closure_r(p, c); 5381 } 5382 } 5383 5384 /** 5385 * Labels PREPARE_ADDR tree node 5386 * @param p node to label 5387 */ 5388 private static void label_PREPARE_ADDR(AbstractBURS_TreeNode p) { 5389 p.initCost(); 5390 AbstractBURS_TreeNode lchild, rchild; 5391 lchild = p.getChild1(); 5392 rchild = p.getChild2(); 5393 label(lchild); 5394 label(rchild); 5395 int c; 5396 // r: PREPARE_ADDR(r,r) 5397 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 11; 5398 if(BURS.DEBUG) trace(p, 99, c + 0, p.getCost(2) /* r */); 5399 if (c < p.getCost(2) /* r */) { 5400 p.setCost(2 /* r */, (char)(c)); 5401 p.writePacked(0, 0xFFFFC07F, 0x3E00); // p.r = 124 5402 closure_r(p, c); 5403 } 5404 } 5405 5406 /** 5407 * Labels PREPARE_LONG tree node 5408 * @param p node to label 5409 */ 5410 private static void label_PREPARE_LONG(AbstractBURS_TreeNode p) { 5411 p.initCost(); 5412 AbstractBURS_TreeNode lchild, rchild; 5413 lchild = p.getChild1(); 5414 rchild = p.getChild2(); 5415 label(lchild); 5416 label(rchild); 5417 int c; 5418 // r: PREPARE_LONG(r,r) 5419 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 11; 5420 if(BURS.DEBUG) trace(p, 84, c + 0, p.getCost(2) /* r */); 5421 if (c < p.getCost(2) /* r */) { 5422 p.setCost(2 /* r */, (char)(c)); 5423 p.writePacked(0, 0xFFFFC07F, 0x2D80); // p.r = 91 5424 closure_r(p, c); 5425 } 5426 } 5427 5428 /** 5429 * Labels ATTEMPT_INT tree node 5430 * @param p node to label 5431 */ 5432 private static void label_ATTEMPT_INT(AbstractBURS_TreeNode p) { 5433 p.initCost(); 5434 AbstractBURS_TreeNode lchild, rchild; 5435 lchild = p.getChild1(); 5436 rchild = p.getChild2(); 5437 label(lchild); 5438 label(rchild); 5439 int c; 5440 // r: ATTEMPT_INT(r,r) 5441 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 11; 5442 if(BURS.DEBUG) trace(p, 85, c + 0, p.getCost(2) /* r */); 5443 if (c < p.getCost(2) /* r */) { 5444 p.setCost(2 /* r */, (char)(c)); 5445 p.writePacked(0, 0xFFFFC07F, 0x2E00); // p.r = 92 5446 closure_r(p, c); 5447 } 5448 } 5449 5450 /** 5451 * Labels ATTEMPT_ADDR tree node 5452 * @param p node to label 5453 */ 5454 private static void label_ATTEMPT_ADDR(AbstractBURS_TreeNode p) { 5455 p.initCost(); 5456 AbstractBURS_TreeNode lchild, rchild; 5457 lchild = p.getChild1(); 5458 rchild = p.getChild2(); 5459 label(lchild); 5460 label(rchild); 5461 int c; 5462 // r: ATTEMPT_ADDR(r,r) 5463 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 11; 5464 if(BURS.DEBUG) trace(p, 100, c + 0, p.getCost(2) /* r */); 5465 if (c < p.getCost(2) /* r */) { 5466 p.setCost(2 /* r */, (char)(c)); 5467 p.writePacked(0, 0xFFFFC07F, 0x3E80); // p.r = 125 5468 closure_r(p, c); 5469 } 5470 } 5471 5472 /** 5473 * Labels ATTEMPT_LONG tree node 5474 * @param p node to label 5475 */ 5476 private static void label_ATTEMPT_LONG(AbstractBURS_TreeNode p) { 5477 p.initCost(); 5478 AbstractBURS_TreeNode lchild, rchild; 5479 lchild = p.getChild1(); 5480 rchild = p.getChild2(); 5481 label(lchild); 5482 label(rchild); 5483 int c; 5484 // r: ATTEMPT_LONG(r,r) 5485 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 11; 5486 if(BURS.DEBUG) trace(p, 86, c + 0, p.getCost(2) /* r */); 5487 if (c < p.getCost(2) /* r */) { 5488 p.setCost(2 /* r */, (char)(c)); 5489 p.writePacked(0, 0xFFFFC07F, 0x2E80); // p.r = 93 5490 closure_r(p, c); 5491 } 5492 } 5493 5494 /** 5495 * Labels CALL tree node 5496 * @param p node to label 5497 */ 5498 private static void label_CALL(AbstractBURS_TreeNode p) { 5499 p.initCost(); 5500 AbstractBURS_TreeNode lchild, rchild; 5501 lchild = p.getChild1(); 5502 rchild = p.getChild2(); 5503 label(lchild); 5504 label(rchild); 5505 int c; 5506 // r: CALL(r,any) 5507 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(7 /* any */) + 10; 5508 if(BURS.DEBUG) trace(p, 79, c + 0, p.getCost(2) /* r */); 5509 if (c < p.getCost(2) /* r */) { 5510 p.setCost(2 /* r */, (char)(c)); 5511 p.writePacked(0, 0xFFFFC07F, 0x2A00); // p.r = 84 5512 closure_r(p, c); 5513 } 5514 if ( // r: CALL(BRANCH_TARGET,any) 5515 lchild.getOpcode() == BRANCH_TARGET_opcode 5516 ) { 5517 c = STATE(rchild).getCost(7 /* any */) + 10; 5518 if(BURS.DEBUG) trace(p, 194, c + 0, p.getCost(2) /* r */); 5519 if (c < p.getCost(2) /* r */) { 5520 p.setCost(2 /* r */, (char)(c)); 5521 p.writePacked(0, 0xFFFFC07F, 0x2A80); // p.r = 85 5522 closure_r(p, c); 5523 } 5524 } 5525 } 5526 5527 /** 5528 * Labels SYSCALL tree node 5529 * @param p node to label 5530 */ 5531 private static void label_SYSCALL(AbstractBURS_TreeNode p) { 5532 p.initCost(); 5533 AbstractBURS_TreeNode lchild, rchild; 5534 lchild = p.getChild1(); 5535 rchild = p.getChild2(); 5536 label(lchild); 5537 label(rchild); 5538 int c; 5539 // r: SYSCALL(r,any) 5540 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(7 /* any */) + 10; 5541 if(BURS.DEBUG) trace(p, 80, c + 0, p.getCost(2) /* r */); 5542 if (c < p.getCost(2) /* r */) { 5543 p.setCost(2 /* r */, (char)(c)); 5544 p.writePacked(0, 0xFFFFC07F, 0x2B00); // p.r = 86 5545 closure_r(p, c); 5546 } 5547 } 5548 5549 /** 5550 * Labels YIELDPOINT_PROLOGUE tree node 5551 * @param p node to label 5552 */ 5553 private static void label_YIELDPOINT_PROLOGUE(AbstractBURS_TreeNode p) { 5554 p.initCost(); 5555 // stm: YIELDPOINT_PROLOGUE 5556 if(BURS.DEBUG) trace(p, 17, 10 + 0, p.getCost(1) /* stm */); 5557 if (10 < p.getCost(1) /* stm */) { 5558 p.setCost(1 /* stm */, (char)(10)); 5559 p.writePacked(0, 0xFFFFFF80, 0x6); // p.stm = 6 5560 } 5561 } 5562 5563 /** 5564 * Labels YIELDPOINT_EPILOGUE tree node 5565 * @param p node to label 5566 */ 5567 private static void label_YIELDPOINT_EPILOGUE(AbstractBURS_TreeNode p) { 5568 p.initCost(); 5569 // stm: YIELDPOINT_EPILOGUE 5570 if(BURS.DEBUG) trace(p, 18, 10 + 0, p.getCost(1) /* stm */); 5571 if (10 < p.getCost(1) /* stm */) { 5572 p.setCost(1 /* stm */, (char)(10)); 5573 p.writePacked(0, 0xFFFFFF80, 0x7); // p.stm = 7 5574 } 5575 } 5576 5577 /** 5578 * Labels YIELDPOINT_BACKEDGE tree node 5579 * @param p node to label 5580 */ 5581 private static void label_YIELDPOINT_BACKEDGE(AbstractBURS_TreeNode p) { 5582 p.initCost(); 5583 // stm: YIELDPOINT_BACKEDGE 5584 if(BURS.DEBUG) trace(p, 19, 10 + 0, p.getCost(1) /* stm */); 5585 if (10 < p.getCost(1) /* stm */) { 5586 p.setCost(1 /* stm */, (char)(10)); 5587 p.writePacked(0, 0xFFFFFF80, 0x8); // p.stm = 8 5588 } 5589 } 5590 5591 /** 5592 * Labels YIELDPOINT_OSR tree node 5593 * @param p node to label 5594 */ 5595 private static void label_YIELDPOINT_OSR(AbstractBURS_TreeNode p) { 5596 p.initCost(); 5597 AbstractBURS_TreeNode lchild, rchild; 5598 lchild = p.getChild1(); 5599 rchild = p.getChild2(); 5600 label(lchild); 5601 label(rchild); 5602 int c; 5603 // r: YIELDPOINT_OSR(any,any) 5604 c = STATE(lchild).getCost(7 /* any */) + STATE(rchild).getCost(7 /* any */) + 11; 5605 if(BURS.DEBUG) trace(p, 82, c + 0, p.getCost(2) /* r */); 5606 if (c < p.getCost(2) /* r */) { 5607 p.setCost(2 /* r */, (char)(c)); 5608 p.writePacked(0, 0xFFFFC07F, 0x2C80); // p.r = 89 5609 closure_r(p, c); 5610 } 5611 } 5612 5613 /** 5614 * Labels IR_PROLOGUE tree node 5615 * @param p node to label 5616 */ 5617 private static void label_IR_PROLOGUE(AbstractBURS_TreeNode p) { 5618 p.initCost(); 5619 // stm: IR_PROLOGUE 5620 if(BURS.DEBUG) trace(p, 34, 11 + 0, p.getCost(1) /* stm */); 5621 if (11 < p.getCost(1) /* stm */) { 5622 p.setCost(1 /* stm */, (char)(11)); 5623 p.writePacked(0, 0xFFFFFF80, 0x49); // p.stm = 73 5624 } 5625 } 5626 5627 /** 5628 * Labels RESOLVE tree node 5629 * @param p node to label 5630 */ 5631 private static void label_RESOLVE(AbstractBURS_TreeNode p) { 5632 p.initCost(); 5633 // stm: RESOLVE 5634 if(BURS.DEBUG) trace(p, 13, 10 + 0, p.getCost(1) /* stm */); 5635 if (10 < p.getCost(1) /* stm */) { 5636 p.setCost(1 /* stm */, (char)(10)); 5637 p.writePacked(0, 0xFFFFFF80, 0x2); // p.stm = 2 5638 } 5639 } 5640 5641 /** 5642 * Labels GET_TIME_BASE tree node 5643 * @param p node to label 5644 */ 5645 private static void label_GET_TIME_BASE(AbstractBURS_TreeNode p) { 5646 p.initCost(); 5647 // r: GET_TIME_BASE 5648 if(BURS.DEBUG) trace(p, 33, 11 + 0, p.getCost(2) /* r */); 5649 if (11 < p.getCost(2) /* r */) { 5650 p.setCost(2 /* r */, (char)(11)); 5651 p.writePacked(0, 0xFFFFC07F, 0x2B80); // p.r = 87 5652 closure_r(p, 11); 5653 } 5654 } 5655 5656 /** 5657 * Labels TRAP_IF tree node 5658 * @param p node to label 5659 */ 5660 private static void label_TRAP_IF(AbstractBURS_TreeNode p) { 5661 p.initCost(); 5662 AbstractBURS_TreeNode lchild, rchild; 5663 lchild = p.getChild1(); 5664 rchild = p.getChild2(); 5665 label(lchild); 5666 label(rchild); 5667 int c; 5668 // stm: TRAP_IF(r,r) 5669 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 10; 5670 if(BURS.DEBUG) trace(p, 40, c + 0, p.getCost(1) /* stm */); 5671 if (c < p.getCost(1) /* stm */) { 5672 p.setCost(1 /* stm */, (char)(c)); 5673 p.writePacked(0, 0xFFFFFF80, 0x18); // p.stm = 24 5674 } 5675 if ( // stm: TRAP_IF(r,INT_CONSTANT) 5676 rchild.getOpcode() == INT_CONSTANT_opcode 5677 ) { 5678 c = STATE(lchild).getCost(2 /* r */) + 10; 5679 if(BURS.DEBUG) trace(p, 111, c + 0, p.getCost(1) /* stm */); 5680 if (c < p.getCost(1) /* stm */) { 5681 p.setCost(1 /* stm */, (char)(c)); 5682 p.writePacked(0, 0xFFFFFF80, 0x19); // p.stm = 25 5683 } 5684 } 5685 if ( // stm: TRAP_IF(r,LONG_CONSTANT) 5686 rchild.getOpcode() == LONG_CONSTANT_opcode 5687 ) { 5688 c = STATE(lchild).getCost(2 /* r */) + 10; 5689 if(BURS.DEBUG) trace(p, 112, c + 0, p.getCost(1) /* stm */); 5690 if (c < p.getCost(1) /* stm */) { 5691 p.setCost(1 /* stm */, (char)(c)); 5692 p.writePacked(0, 0xFFFFFF80, 0x1A); // p.stm = 26 5693 } 5694 } 5695 } 5696 5697 /** 5698 * Labels TRAP tree node 5699 * @param p node to label 5700 */ 5701 private static void label_TRAP(AbstractBURS_TreeNode p) { 5702 p.initCost(); 5703 // stm: TRAP 5704 if(BURS.DEBUG) trace(p, 27, 10 + 0, p.getCost(1) /* stm */); 5705 if (10 < p.getCost(1) /* stm */) { 5706 p.setCost(1 /* stm */, (char)(10)); 5707 p.writePacked(0, 0xFFFFFF80, 0x17); // p.stm = 23 5708 } 5709 } 5710 5711 /** 5712 * Labels FLOAT_AS_INT_BITS tree node 5713 * @param p node to label 5714 */ 5715 private static void label_FLOAT_AS_INT_BITS(AbstractBURS_TreeNode p) { 5716 p.initCost(); 5717 AbstractBURS_TreeNode lchild; 5718 lchild = p.getChild1(); 5719 label(lchild); 5720 int c; 5721 // r: FLOAT_AS_INT_BITS(r) 5722 c = STATE(lchild).getCost(2 /* r */) + 20; 5723 if(BURS.DEBUG) trace(p, 154, c + 0, p.getCost(2) /* r */); 5724 if (c < p.getCost(2) /* r */) { 5725 p.setCost(2 /* r */, (char)(c)); 5726 p.writePacked(0, 0xFFFFC07F, 0x2480); // p.r = 73 5727 closure_r(p, c); 5728 } 5729 } 5730 5731 /** 5732 * Labels INT_BITS_AS_FLOAT tree node 5733 * @param p node to label 5734 */ 5735 private static void label_INT_BITS_AS_FLOAT(AbstractBURS_TreeNode p) { 5736 p.initCost(); 5737 AbstractBURS_TreeNode lchild; 5738 lchild = p.getChild1(); 5739 label(lchild); 5740 int c; 5741 // r: INT_BITS_AS_FLOAT(r) 5742 c = STATE(lchild).getCost(2 /* r */) + 20; 5743 if(BURS.DEBUG) trace(p, 155, c + 0, p.getCost(2) /* r */); 5744 if (c < p.getCost(2) /* r */) { 5745 p.setCost(2 /* r */, (char)(c)); 5746 p.writePacked(0, 0xFFFFC07F, 0x2500); // p.r = 74 5747 closure_r(p, c); 5748 } 5749 } 5750 5751 /** 5752 * Labels DOUBLE_AS_LONG_BITS tree node 5753 * @param p node to label 5754 */ 5755 private static void label_DOUBLE_AS_LONG_BITS(AbstractBURS_TreeNode p) { 5756 p.initCost(); 5757 AbstractBURS_TreeNode lchild; 5758 lchild = p.getChild1(); 5759 label(lchild); 5760 int c; 5761 // r: DOUBLE_AS_LONG_BITS(r) 5762 c = STATE(lchild).getCost(2 /* r */) + 40; 5763 if(BURS.DEBUG) trace(p, 183, c + 0, p.getCost(2) /* r */); 5764 if (c < p.getCost(2) /* r */) { 5765 p.setCost(2 /* r */, (char)(c)); 5766 p.writePacked(0, 0xFFFFC07F, 0x3700); // p.r = 110 5767 closure_r(p, c); 5768 } 5769 } 5770 5771 /** 5772 * Labels LONG_BITS_AS_DOUBLE tree node 5773 * @param p node to label 5774 */ 5775 private static void label_LONG_BITS_AS_DOUBLE(AbstractBURS_TreeNode p) { 5776 p.initCost(); 5777 AbstractBURS_TreeNode lchild; 5778 lchild = p.getChild1(); 5779 label(lchild); 5780 int c; 5781 // r: LONG_BITS_AS_DOUBLE(r) 5782 c = STATE(lchild).getCost(2 /* r */) + 40; 5783 if(BURS.DEBUG) trace(p, 184, c + 0, p.getCost(2) /* r */); 5784 if (c < p.getCost(2) /* r */) { 5785 p.setCost(2 /* r */, (char)(c)); 5786 p.writePacked(0, 0xFFFFC07F, 0x3780); // p.r = 111 5787 closure_r(p, c); 5788 } 5789 } 5790 5791 /** 5792 * Labels LOWTABLESWITCH tree node 5793 * @param p node to label 5794 */ 5795 private static void label_LOWTABLESWITCH(AbstractBURS_TreeNode p) { 5796 p.initCost(); 5797 AbstractBURS_TreeNode lchild; 5798 lchild = p.getChild1(); 5799 label(lchild); 5800 int c; 5801 // stm: LOWTABLESWITCH(r) 5802 c = STATE(lchild).getCost(2 /* r */) + 10; 5803 if(BURS.DEBUG) trace(p, 101, c + 0, p.getCost(1) /* stm */); 5804 if (c < p.getCost(1) /* stm */) { 5805 p.setCost(1 /* stm */, (char)(c)); 5806 p.writePacked(0, 0xFFFFFF80, 0x9); // p.stm = 9 5807 } 5808 } 5809 5810 /** 5811 * Labels ADDRESS_CONSTANT tree node 5812 * @param p node to label 5813 */ 5814 private static void label_ADDRESS_CONSTANT(AbstractBURS_TreeNode p) { 5815 p.initCost(); 5816 // any: ADDRESS_CONSTANT 5817 if(BURS.DEBUG) trace(p, 10, 0 + 0, p.getCost(7) /* any */); 5818 if (0 < p.getCost(7) /* any */) { 5819 p.setCost(7 /* any */, (char)(0)); 5820 p.writePacked(0, 0x8FFFFFFF, 0x30000000); // p.any = 3 5821 } 5822 } 5823 5824 /** 5825 * Labels INT_CONSTANT tree node 5826 * @param p node to label 5827 */ 5828 private static void label_INT_CONSTANT(AbstractBURS_TreeNode p) { 5829 p.initCost(); 5830 // any: INT_CONSTANT 5831 if(BURS.DEBUG) trace(p, 11, 0 + 0, p.getCost(7) /* any */); 5832 if (0 < p.getCost(7) /* any */) { 5833 p.setCost(7 /* any */, (char)(0)); 5834 p.writePacked(0, 0x8FFFFFFF, 0x40000000); // p.any = 4 5835 } 5836 } 5837 5838 /** 5839 * Labels LONG_CONSTANT tree node 5840 * @param p node to label 5841 */ 5842 private static void label_LONG_CONSTANT(AbstractBURS_TreeNode p) { 5843 p.initCost(); 5844 // any: LONG_CONSTANT 5845 if(BURS.DEBUG) trace(p, 12, 0 + 0, p.getCost(7) /* any */); 5846 if (0 < p.getCost(7) /* any */) { 5847 p.setCost(7 /* any */, (char)(0)); 5848 p.writePacked(0, 0x8FFFFFFF, 0x50000000); // p.any = 5 5849 } 5850 } 5851 5852 /** 5853 * Labels REGISTER tree node 5854 * @param p node to label 5855 */ 5856 private static void label_REGISTER(AbstractBURS_TreeNode p) { 5857 p.initCost(); 5858 // r: REGISTER 5859 if(BURS.DEBUG) trace(p, 8, 0 + 0, p.getCost(2) /* r */); 5860 if (0 < p.getCost(2) /* r */) { 5861 p.setCost(2 /* r */, (char)(0)); 5862 p.writePacked(0, 0xFFFFC07F, 0x80); // p.r = 1 5863 closure_r(p, 0); 5864 } 5865 } 5866 5867 /** 5868 * Labels OTHER_OPERAND tree node 5869 * @param p node to label 5870 */ 5871 private static void label_OTHER_OPERAND(AbstractBURS_TreeNode p) { 5872 p.initCost(); 5873 AbstractBURS_TreeNode lchild, rchild; 5874 lchild = p.getChild1(); 5875 rchild = p.getChild2(); 5876 label(lchild); 5877 label(rchild); 5878 int c; 5879 // any: OTHER_OPERAND(any,any) 5880 c = STATE(lchild).getCost(7 /* any */) + STATE(rchild).getCost(7 /* any */) + 0; 5881 if(BURS.DEBUG) trace(p, 39, c + 0, p.getCost(7) /* any */); 5882 if (c < p.getCost(7) /* any */) { 5883 p.setCost(7 /* any */, (char)(c)); 5884 p.writePacked(0, 0x8FFFFFFF, 0x60000000); // p.any = 6 5885 } 5886 // r: OTHER_OPERAND(r,r) 5887 c = STATE(lchild).getCost(2 /* r */) + STATE(rchild).getCost(2 /* r */) + 0; 5888 if(BURS.DEBUG) trace(p, 81, c + 0, p.getCost(2) /* r */); 5889 if (c < p.getCost(2) /* r */) { 5890 p.setCost(2 /* r */, (char)(c)); 5891 p.writePacked(0, 0xFFFFC07F, 0x2C00); // p.r = 88 5892 closure_r(p, c); 5893 } 5894 } 5895 5896 /** 5897 * Labels NULL tree node 5898 * @param p node to label 5899 */ 5900 private static void label_NULL(AbstractBURS_TreeNode p) { 5901 p.initCost(); 5902 // any: NULL 5903 if(BURS.DEBUG) trace(p, 9, 0 + 0, p.getCost(7) /* any */); 5904 if (0 < p.getCost(7) /* any */) { 5905 p.setCost(7 /* any */, (char)(0)); 5906 p.writePacked(0, 0x8FFFFFFF, 0x10000000); // p.any = 1 5907 } 5908 } 5909 5910 /** 5911 * Labels BRANCH_TARGET tree node 5912 * @param p node to label 5913 */ 5914 private static void label_BRANCH_TARGET(AbstractBURS_TreeNode p) { 5915 p.initCost(); 5916 } 5917 5918 /** 5919 * Labels DCBF tree node 5920 * @param p node to label 5921 */ 5922 private static void label_DCBF(AbstractBURS_TreeNode p) { 5923 p.initCost(); 5924 AbstractBURS_TreeNode lchild; 5925 lchild = p.getChild1(); 5926 label(lchild); 5927 int c; 5928 // stm: DCBF(r) 5929 c = STATE(lchild).getCost(2 /* r */) + 11; 5930 if(BURS.DEBUG) trace(p, 104, c + 0, p.getCost(1) /* stm */); 5931 if (c < p.getCost(1) /* stm */) { 5932 p.setCost(1 /* stm */, (char)(c)); 5933 p.writePacked(0, 0xFFFFFF80, 0x10); // p.stm = 16 5934 } 5935 } 5936 5937 /** 5938 * Labels DCBST tree node 5939 * @param p node to label 5940 */ 5941 private static void label_DCBST(AbstractBURS_TreeNode p) { 5942 p.initCost(); 5943 AbstractBURS_TreeNode lchild; 5944 lchild = p.getChild1(); 5945 label(lchild); 5946 int c; 5947 // stm: DCBST(r) 5948 c = STATE(lchild).getCost(2 /* r */) + 11; 5949 if(BURS.DEBUG) trace(p, 105, c + 0, p.getCost(1) /* stm */); 5950 if (c < p.getCost(1) /* stm */) { 5951 p.setCost(1 /* stm */, (char)(c)); 5952 p.writePacked(0, 0xFFFFFF80, 0x11); // p.stm = 17 5953 } 5954 } 5955 5956 /** 5957 * Labels DCBT tree node 5958 * @param p node to label 5959 */ 5960 private static void label_DCBT(AbstractBURS_TreeNode p) { 5961 p.initCost(); 5962 AbstractBURS_TreeNode lchild; 5963 lchild = p.getChild1(); 5964 label(lchild); 5965 int c; 5966 // stm: DCBT(r) 5967 c = STATE(lchild).getCost(2 /* r */) + 11; 5968 if(BURS.DEBUG) trace(p, 106, c + 0, p.getCost(1) /* stm */); 5969 if (c < p.getCost(1) /* stm */) { 5970 p.setCost(1 /* stm */, (char)(c)); 5971 p.writePacked(0, 0xFFFFFF80, 0x12); // p.stm = 18 5972 } 5973 } 5974 5975 /** 5976 * Labels DCBTST tree node 5977 * @param p node to label 5978 */ 5979 private static void label_DCBTST(AbstractBURS_TreeNode p) { 5980 p.initCost(); 5981 AbstractBURS_TreeNode lchild; 5982 lchild = p.getChild1(); 5983 label(lchild); 5984 int c; 5985 // stm: DCBTST(r) 5986 c = STATE(lchild).getCost(2 /* r */) + 11; 5987 if(BURS.DEBUG) trace(p, 107, c + 0, p.getCost(1) /* stm */); 5988 if (c < p.getCost(1) /* stm */) { 5989 p.setCost(1 /* stm */, (char)(c)); 5990 p.writePacked(0, 0xFFFFFF80, 0x13); // p.stm = 19 5991 } 5992 } 5993 5994 /** 5995 * Labels DCBZ tree node 5996 * @param p node to label 5997 */ 5998 private static void label_DCBZ(AbstractBURS_TreeNode p) { 5999 p.initCost(); 6000 AbstractBURS_TreeNode lchild; 6001 lchild = p.getChild1(); 6002 label(lchild); 6003 int c; 6004 // stm: DCBZ(r) 6005 c = STATE(lchild).getCost(2 /* r */) + 11; 6006 if(BURS.DEBUG) trace(p, 108, c + 0, p.getCost(1) /* stm */); 6007 if (c < p.getCost(1) /* stm */) { 6008 p.setCost(1 /* stm */, (char)(c)); 6009 p.writePacked(0, 0xFFFFFF80, 0x14); // p.stm = 20 6010 } 6011 } 6012 6013 /** 6014 * Labels DCBZL tree node 6015 * @param p node to label 6016 */ 6017 private static void label_DCBZL(AbstractBURS_TreeNode p) { 6018 p.initCost(); 6019 AbstractBURS_TreeNode lchild; 6020 lchild = p.getChild1(); 6021 label(lchild); 6022 int c; 6023 // stm: DCBZL(r) 6024 c = STATE(lchild).getCost(2 /* r */) + 11; 6025 if(BURS.DEBUG) trace(p, 109, c + 0, p.getCost(1) /* stm */); 6026 if (c < p.getCost(1) /* stm */) { 6027 p.setCost(1 /* stm */, (char)(c)); 6028 p.writePacked(0, 0xFFFFFF80, 0x15); // p.stm = 21 6029 } 6030 } 6031 6032 /** 6033 * Labels ICBI tree node 6034 * @param p node to label 6035 */ 6036 private static void label_ICBI(AbstractBURS_TreeNode p) { 6037 p.initCost(); 6038 AbstractBURS_TreeNode lchild; 6039 lchild = p.getChild1(); 6040 label(lchild); 6041 int c; 6042 // stm: ICBI(r) 6043 c = STATE(lchild).getCost(2 /* r */) + 11; 6044 if(BURS.DEBUG) trace(p, 110, c + 0, p.getCost(1) /* stm */); 6045 if (c < p.getCost(1) /* stm */) { 6046 p.setCost(1 /* stm */, (char)(c)); 6047 p.writePacked(0, 0xFFFFFF80, 0x16); // p.stm = 22 6048 } 6049 } 6050 6051 /** 6052 * Give leaf child corresponding to external rule and child number. 6053 * e.g. . 6054 * 6055 * @param p tree node to get child for 6056 * @param eruleno external rule number 6057 * @param kidnumber the child to return 6058 * @return the requested child 6059 */ 6060 private static AbstractBURS_TreeNode kids(AbstractBURS_TreeNode p, int eruleno, int kidnumber) { 6061 if (BURS.DEBUG) { 6062 switch (eruleno) { 6063 case 7: // any: r 6064 case 6: // rz: rp 6065 case 5: // rs: rp 6066 case 4: // r: rz 6067 case 3: // r: rs 6068 case 2: // r: czr 6069 case 1: // stm: r 6070 if (kidnumber == 0) { 6071 return p; 6072 } 6073 break; 6074 case 38: // r: REF_MOVE(ADDRESS_CONSTANT) 6075 case 37: // r: REF_MOVE(ADDRESS_CONSTANT) 6076 case 36: // r: REF_MOVE(ADDRESS_CONSTANT) 6077 case 35: // r: LONG_MOVE(LONG_CONSTANT) 6078 case 34: // stm: IR_PROLOGUE 6079 case 33: // r: GET_TIME_BASE 6080 case 32: // stm: RETURN(NULL) 6081 case 31: // stm: GOTO 6082 case 30: // rs: REF_MOVE(INT_CONSTANT) 6083 case 29: // rs: REF_MOVE(INT_CONSTANT) 6084 case 28: // rs: REF_MOVE(INT_CONSTANT) 6085 case 27: // stm: TRAP 6086 case 26: // stm: READ_CEILING 6087 case 25: // stm: WRITE_FLOOR 6088 case 24: // stm: FENCE 6089 case 23: // r: GET_CAUGHT_EXCEPTION 6090 case 22: // r: GUARD_COMBINE 6091 case 21: // r: GUARD_MOVE 6092 case 20: // stm: NOP 6093 case 19: // stm: YIELDPOINT_BACKEDGE 6094 case 18: // stm: YIELDPOINT_EPILOGUE 6095 case 17: // stm: YIELDPOINT_PROLOGUE 6096 case 16: // stm: UNINT_END 6097 case 15: // stm: UNINT_BEGIN 6098 case 14: // stm: IG_PATCH_POINT 6099 case 13: // stm: RESOLVE 6100 case 12: // any: LONG_CONSTANT 6101 case 11: // any: INT_CONSTANT 6102 case 10: // any: ADDRESS_CONSTANT 6103 case 9: // any: NULL 6104 case 8: // r: REGISTER 6105 break; 6106 case 100: // r: ATTEMPT_ADDR(r,r) 6107 case 99: // r: PREPARE_ADDR(r,r) 6108 case 98: // r: LONG_LOAD(r,r) 6109 case 97: // stm: LONG_IFCMP(r,r) 6110 case 96: // stm: LONG_CMP(r,r) 6111 case 95: // r: LONG_XOR(r,r) 6112 case 94: // r: LONG_OR(r,r) 6113 case 93: // r: LONG_AND(r,r) 6114 case 92: // r: LONG_USHR(r,r) 6115 case 91: // r: LONG_SHR(r,r) 6116 case 90: // r: LONG_SHL(r,r) 6117 case 89: // r: LONG_MUL(r,r) 6118 case 88: // r: LONG_SUB(r,r) 6119 case 87: // r: LONG_ADD(r,r) 6120 case 86: // r: ATTEMPT_LONG(r,r) 6121 case 85: // r: ATTEMPT_INT(r,r) 6122 case 84: // r: PREPARE_LONG(r,r) 6123 case 83: // r: PREPARE_INT(r,r) 6124 case 82: // r: YIELDPOINT_OSR(any,any) 6125 case 81: // r: OTHER_OPERAND(r,r) 6126 case 80: // r: SYSCALL(r,any) 6127 case 79: // r: CALL(r,any) 6128 case 78: // stm: DOUBLE_CMPG(r,r) 6129 case 77: // stm: DOUBLE_CMPL(r,r) 6130 case 76: // stm: FLOAT_CMPG(r,r) 6131 case 75: // stm: FLOAT_CMPL(r,r) 6132 case 74: // stm: DOUBLE_IFCMP(r,r) 6133 case 73: // stm: FLOAT_IFCMP(r,r) 6134 case 72: // stm: INT_IFCMP2(r,r) 6135 case 71: // stm: INT_IFCMP(r,r) 6136 case 70: // rs: INT_LOAD(r,r) 6137 case 69: // r: DOUBLE_LOAD(r,r) 6138 case 68: // r: FLOAT_LOAD(r,r) 6139 case 67: // rp: USHORT_LOAD(r,r) 6140 case 66: // rs: SHORT_LOAD(r,r) 6141 case 65: // rp: UBYTE_LOAD(r,r) 6142 case 64: // rs: BYTE_LOAD(r,r) 6143 case 63: // r: DOUBLE_DIV(r,r) 6144 case 62: // r: FLOAT_DIV(r,r) 6145 case 61: // r: DOUBLE_SUB(r,r) 6146 case 60: // r: FLOAT_SUB(r,r) 6147 case 59: // r: DOUBLE_MUL(r,r) 6148 case 58: // r: FLOAT_MUL(r,r) 6149 case 57: // r: DOUBLE_ADD(r,r) 6150 case 56: // r: FLOAT_ADD(r,r) 6151 case 55: // r: REF_XOR(r,r) 6152 case 54: // r: REF_OR(r,r) 6153 case 53: // r: REF_AND(r,r) 6154 case 52: // rz: INT_USHR(r,r) 6155 case 51: // rs: INT_SHR(r,r) 6156 case 50: // rz: INT_SHL(r,r) 6157 case 49: // r: INT_REM(r,r) 6158 case 48: // r: INT_DIV(r,r) 6159 case 47: // r: INT_MUL(r,r) 6160 case 46: // r: REF_SUB(r,r) 6161 case 45: // r: REF_ADD(r,r) 6162 case 44: // boolcmp: BOOLEAN_CMP_ADDR(r,r) 6163 case 43: // r: BOOLEAN_CMP_ADDR(r,r) 6164 case 42: // boolcmp: BOOLEAN_CMP_INT(r,r) 6165 case 41: // r: BOOLEAN_CMP_INT(r,r) 6166 case 40: // stm: TRAP_IF(r,r) 6167 case 39: // any: OTHER_OPERAND(any,any) 6168 if (kidnumber == 0) { 6169 return p.getChild1(); 6170 } 6171 if (kidnumber == 1) { 6172 return p.getChild2(); 6173 } 6174 break; 6175 case 192: // r: LONG_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 6176 case 191: // r: LONG_LOAD(r,INT_CONSTANT) 6177 case 190: // r: REF_XOR(r,REF_MOVE(INT_CONSTANT)) 6178 case 189: // r: REF_OR(r,REF_MOVE(INT_CONSTANT)) 6179 case 188: // r: REF_OR(r,REF_MOVE(INT_CONSTANT)) 6180 case 187: // r: REF_AND(r,REF_MOVE(INT_CONSTANT)) 6181 case 186: // czr: REF_AND(r,REF_MOVE(INT_CONSTANT)) 6182 case 185: // r: LONG_MOVE(r) 6183 case 184: // r: LONG_BITS_AS_DOUBLE(r) 6184 case 183: // r: DOUBLE_AS_LONG_BITS(r) 6185 case 182: // r: LONG_2INT(r) 6186 case 181: // r: INT_2LONG(r) 6187 case 180: // r: LONG_NOT(r) 6188 case 179: // r: LONG_USHR(r,INT_CONSTANT) 6189 case 178: // r: LONG_SHR(r,INT_CONSTANT) 6190 case 177: // r: LONG_SHL(r,INT_CONSTANT) 6191 case 176: // r: LONG_NEG(r) 6192 case 175: // stm: RETURN(r) 6193 case 174: // stm: INT_IFCMP2(r,INT_CONSTANT) 6194 case 173: // stm: INT_IFCMP(boolcmp,INT_CONSTANT) 6195 case 172: // stm: INT_IFCMP(boolcmp,INT_CONSTANT) 6196 case 171: // stm: INT_IFCMP(boolcmp,INT_CONSTANT) 6197 case 170: // stm: INT_IFCMP(boolcmp,INT_CONSTANT) 6198 case 169: // stm: INT_IFCMP(r,INT_CONSTANT) 6199 case 168: // rs: INT_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 6200 case 167: // rs: INT_LOAD(r,INT_CONSTANT) 6201 case 166: // r: DOUBLE_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 6202 case 165: // r: DOUBLE_LOAD(r,INT_CONSTANT) 6203 case 164: // r: FLOAT_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 6204 case 163: // r: FLOAT_LOAD(r,INT_CONSTANT) 6205 case 162: // rp: USHORT_LOAD(r,INT_CONSTANT) 6206 case 161: // rs: SHORT_LOAD(r,INT_CONSTANT) 6207 case 160: // rp: UBYTE_LOAD(r,INT_CONSTANT) 6208 case 159: // rs: BYTE_LOAD(r,INT_CONSTANT) 6209 case 158: // r: DOUBLE_MOVE(r) 6210 case 157: // r: FLOAT_MOVE(r) 6211 case 156: // r: REF_MOVE(r) 6212 case 155: // r: INT_BITS_AS_FLOAT(r) 6213 case 154: // r: FLOAT_AS_INT_BITS(r) 6214 case 153: // r: DOUBLE_2FLOAT(r) 6215 case 152: // r: DOUBLE_2INT(r) 6216 case 151: // r: FLOAT_2DOUBLE(r) 6217 case 150: // r: FLOAT_2INT(r) 6218 case 149: // r: INT_2DOUBLE(r) 6219 case 148: // r: INT_2FLOAT(r) 6220 case 147: // rs: INT_2SHORT(r) 6221 case 146: // rp: INT_2USHORT(r) 6222 case 145: // rs: INT_2BYTE(r) 6223 case 144: // r: DOUBLE_SQRT(r) 6224 case 143: // r: FLOAT_SQRT(r) 6225 case 142: // r: DOUBLE_NEG(r) 6226 case 141: // r: FLOAT_NEG(r) 6227 case 140: // r: REF_NOT(r) 6228 case 139: // r: REF_XOR(r,INT_CONSTANT) 6229 case 138: // r: REF_OR(r,INT_CONSTANT) 6230 case 137: // rp: REF_AND(r,INT_CONSTANT) 6231 case 136: // czr: REF_AND(r,INT_CONSTANT) 6232 case 135: // rp: INT_USHR(r,INT_CONSTANT) 6233 case 134: // rs: INT_SHR(r,INT_CONSTANT) 6234 case 133: // rz: INT_SHL(r,INT_CONSTANT) 6235 case 132: // r: REF_NEG(r) 6236 case 131: // r: INT_REM(r,REF_MOVE(INT_CONSTANT)) 6237 case 130: // r: INT_DIV(r,REF_MOVE(INT_CONSTANT)) 6238 case 129: // r: INT_MUL(r,INT_CONSTANT) 6239 case 128: // r: REF_ADD(r,REF_MOVE(INT_CONSTANT)) 6240 case 127: // r: REF_ADD(r,REF_MOVE(INT_CONSTANT)) 6241 case 126: // r: REF_ADD(r,INT_CONSTANT) 6242 case 125: // r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 6243 case 124: // r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 6244 case 123: // r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 6245 case 122: // r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 6246 case 121: // boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 6247 case 120: // boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 6248 case 119: // boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 6249 case 118: // boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 6250 case 117: // boolcmp: BOOLEAN_CMP_ADDR(r,INT_CONSTANT) 6251 case 116: // r: BOOLEAN_CMP_ADDR(r,INT_CONSTANT) 6252 case 115: // boolcmp: BOOLEAN_CMP_INT(r,INT_CONSTANT) 6253 case 114: // r: BOOLEAN_CMP_INT(r,INT_CONSTANT) 6254 case 113: // r: BOOLEAN_NOT(r) 6255 case 112: // stm: TRAP_IF(r,LONG_CONSTANT) 6256 case 111: // stm: TRAP_IF(r,INT_CONSTANT) 6257 case 110: // stm: ICBI(r) 6258 case 109: // stm: DCBZL(r) 6259 case 108: // stm: DCBZ(r) 6260 case 107: // stm: DCBTST(r) 6261 case 106: // stm: DCBT(r) 6262 case 105: // stm: DCBST(r) 6263 case 104: // stm: DCBF(r) 6264 case 103: // stm: SET_CAUGHT_EXCEPTION(r) 6265 case 102: // stm: NULL_CHECK(r) 6266 case 101: // stm: LOWTABLESWITCH(r) 6267 if (kidnumber == 0) { 6268 return p.getChild1(); 6269 } 6270 break; 6271 case 194: // r: CALL(BRANCH_TARGET,any) 6272 case 193: // r: REF_SUB(INT_CONSTANT,r) 6273 if (kidnumber == 0) { 6274 return p.getChild2(); 6275 } 6276 break; 6277 case 214: // stm: INT_IFCMP(REF_ADD(r,INT_CONSTANT),INT_CONSTANT) 6278 case 213: // stm: INT_IFCMP(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 6279 case 212: // stm: INT_IFCMP(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 6280 case 211: // stm: INT_IFCMP(REF_NOT(r),INT_CONSTANT) 6281 case 210: // stm: INT_IFCMP(REF_NEG(r),INT_CONSTANT) 6282 case 209: // stm: INT_IFCMP(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 6283 case 208: // stm: INT_IFCMP(INT_SHR(r,INT_CONSTANT),INT_CONSTANT) 6284 case 207: // stm: INT_IFCMP(INT_SHL(r,INT_CONSTANT),INT_CONSTANT) 6285 case 206: // stm: INT_IFCMP(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 6286 case 205: // stm: INT_IFCMP(INT_2SHORT(r),INT_CONSTANT) 6287 case 204: // stm: INT_IFCMP(INT_2BYTE(r),INT_CONSTANT) 6288 case 203: // rs: INT_LOAD(REF_ADD(r,INT_CONSTANT),INT_CONSTANT) 6289 case 202: // rp: REF_AND(BYTE_LOAD(r,INT_CONSTANT),INT_CONSTANT) 6290 case 201: // rp: REF_AND(INT_USHR(r,INT_CONSTANT),REF_MOVE(INT_CONSTANT)) 6291 case 200: // rp: REF_AND(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 6292 case 199: // rp: INT_USHR(INT_SHL(r,INT_CONSTANT),INT_CONSTANT) 6293 case 198: // rp: INT_USHR(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 6294 case 197: // rp: INT_USHR(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 6295 case 196: // rp: INT_SHR(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 6296 case 195: // rz: INT_SHL(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 6297 if (kidnumber == 0) { 6298 return p.getChild1().getChild1(); 6299 } 6300 break; 6301 case 219: // stm: SHORT_STORE(INT_2USHORT(r),OTHER_OPERAND(r,INT_CONSTANT)) 6302 case 218: // stm: SHORT_STORE(INT_2SHORT(r),OTHER_OPERAND(r,INT_CONSTANT)) 6303 case 217: // stm: BYTE_STORE(INT_2BYTE(r),OTHER_OPERAND(r,INT_CONSTANT)) 6304 case 216: // r: REF_OR(REF_NOT(r),REF_NOT(r)) 6305 case 215: // r: REF_AND(REF_NOT(r),REF_NOT(r)) 6306 if (kidnumber == 0) { 6307 return p.getChild1().getChild1(); 6308 } 6309 if (kidnumber == 1) { 6310 return p.getChild2().getChild1(); 6311 } 6312 break; 6313 case 231: // stm: LONG_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 6314 case 230: // stm: LONG_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 6315 case 229: // stm: DOUBLE_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 6316 case 228: // stm: DOUBLE_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 6317 case 227: // stm: FLOAT_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 6318 case 226: // stm: FLOAT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 6319 case 225: // stm: INT_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 6320 case 224: // stm: INT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 6321 case 223: // stm: SHORT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 6322 case 222: // stm: BYTE_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 6323 case 221: // r: REF_OR(r,REF_NOT(r)) 6324 case 220: // r: REF_AND(r,REF_NOT(r)) 6325 if (kidnumber == 0) { 6326 return p.getChild1(); 6327 } 6328 if (kidnumber == 1) { 6329 return p.getChild2().getChild1(); 6330 } 6331 break; 6332 case 245: // stm: INT_IFCMP(REF_XOR(r,r),INT_CONSTANT) 6333 case 244: // stm: INT_IFCMP(REF_OR(r,r),INT_CONSTANT) 6334 case 243: // stm: INT_IFCMP(REF_AND(r,r),INT_CONSTANT) 6335 case 242: // stm: INT_IFCMP(REF_ADD(r,r),INT_CONSTANT) 6336 case 241: // stm: INT_IFCMP(ATTEMPT_ADDR(r,r),INT_CONSTANT) 6337 case 240: // stm: INT_IFCMP(ATTEMPT_INT(r,r),INT_CONSTANT) 6338 case 239: // stm: INT_IFCMP(INT_SHR(r,r),INT_CONSTANT) 6339 case 238: // stm: INT_IFCMP(INT_SHL(r,r),INT_CONSTANT) 6340 case 237: // stm: INT_IFCMP(INT_USHR(r,r),INT_CONSTANT) 6341 case 236: // rs: INT_LOAD(REF_ADD(r,r),INT_CONSTANT) 6342 case 235: // rp: REF_AND(BYTE_LOAD(r,r),INT_CONSTANT) 6343 case 234: // r: REF_NOT(REF_XOR(r,r)) 6344 case 233: // r: REF_NOT(REF_AND(r,r)) 6345 case 232: // r: REF_NOT(REF_OR(r,r)) 6346 if (kidnumber == 0) { 6347 return p.getChild1().getChild1(); 6348 } 6349 if (kidnumber == 1) { 6350 return p.getChild1().getChild2(); 6351 } 6352 break; 6353 case 249: // r: DOUBLE_SUB(DOUBLE_MUL(r,r),r) 6354 case 248: // r: FLOAT_SUB(FLOAT_MUL(r,r),r) 6355 case 247: // r: DOUBLE_ADD(DOUBLE_MUL(r,r),r) 6356 case 246: // r: FLOAT_ADD(FLOAT_MUL(r,r),r) 6357 if (kidnumber == 0) { 6358 return p.getChild1().getChild1(); 6359 } 6360 if (kidnumber == 1) { 6361 return p.getChild1().getChild2(); 6362 } 6363 if (kidnumber == 2) { 6364 return p.getChild2(); 6365 } 6366 break; 6367 case 257: // stm: LONG_STORE(r,OTHER_OPERAND(r,r)) 6368 case 256: // stm: DOUBLE_STORE(r,OTHER_OPERAND(r,r)) 6369 case 255: // stm: FLOAT_STORE(r,OTHER_OPERAND(r,r)) 6370 case 254: // stm: INT_STORE(r,OTHER_OPERAND(r,r)) 6371 case 253: // stm: SHORT_STORE(r,OTHER_OPERAND(r,r)) 6372 case 252: // stm: BYTE_STORE(r,OTHER_OPERAND(r,r)) 6373 case 251: // r: DOUBLE_ADD(r,DOUBLE_MUL(r,r)) 6374 case 250: // r: FLOAT_ADD(r,FLOAT_MUL(r,r)) 6375 if (kidnumber == 0) { 6376 return p.getChild1(); 6377 } 6378 if (kidnumber == 1) { 6379 return p.getChild2().getChild1(); 6380 } 6381 if (kidnumber == 2) { 6382 return p.getChild2().getChild2(); 6383 } 6384 break; 6385 case 261: // r: DOUBLE_NEG(DOUBLE_SUB(DOUBLE_MUL(r,r),r)) 6386 case 260: // r: FLOAT_NEG(FLOAT_SUB(FLOAT_MUL(r,r),r)) 6387 case 259: // r: DOUBLE_NEG(DOUBLE_ADD(DOUBLE_MUL(r,r),r)) 6388 case 258: // r: FLOAT_NEG(FLOAT_ADD(FLOAT_MUL(r,r),r)) 6389 if (kidnumber == 0) { 6390 return p.getChild1().getChild1().getChild1(); 6391 } 6392 if (kidnumber == 1) { 6393 return p.getChild1().getChild1().getChild2(); 6394 } 6395 if (kidnumber == 2) { 6396 return p.getChild1().getChild2(); 6397 } 6398 break; 6399 case 263: // r: DOUBLE_NEG(DOUBLE_ADD(r,DOUBLE_MUL(r,r))) 6400 case 262: // r: FLOAT_NEG(FLOAT_ADD(r,FLOAT_MUL(r,r))) 6401 if (kidnumber == 0) { 6402 return p.getChild1().getChild1(); 6403 } 6404 if (kidnumber == 1) { 6405 return p.getChild1().getChild2().getChild1(); 6406 } 6407 if (kidnumber == 2) { 6408 return p.getChild1().getChild2().getChild2(); 6409 } 6410 break; 6411 case 266: // stm: SHORT_STORE(INT_2USHORT(r),OTHER_OPERAND(r,r)) 6412 case 265: // stm: SHORT_STORE(INT_2SHORT(r),OTHER_OPERAND(r,r)) 6413 case 264: // stm: BYTE_STORE(INT_2BYTE(r),OTHER_OPERAND(r,r)) 6414 if (kidnumber == 0) { 6415 return p.getChild1().getChild1(); 6416 } 6417 if (kidnumber == 1) { 6418 return p.getChild2().getChild1(); 6419 } 6420 if (kidnumber == 2) { 6421 return p.getChild2().getChild2(); 6422 } 6423 break; 6424 case 267: // stm: INT_STORE(r,OTHER_OPERAND(REF_ADD(r,INT_CONSTANT),INT_CONSTANT)) 6425 if (kidnumber == 0) { 6426 return p.getChild1(); 6427 } 6428 if (kidnumber == 1) { 6429 return p.getChild2().getChild1().getChild1(); 6430 } 6431 break; 6432 case 269: // stm: INT_IFCMP(REF_OR(r,REF_NOT(r)),INT_CONSTANT) 6433 case 268: // stm: INT_IFCMP(REF_AND(r,REF_NOT(r)),INT_CONSTANT) 6434 if (kidnumber == 0) { 6435 return p.getChild1().getChild1(); 6436 } 6437 if (kidnumber == 1) { 6438 return p.getChild1().getChild2().getChild1(); 6439 } 6440 break; 6441 } 6442 throw new OptimizingCompilerException("BURS","Bad rule number ", 6443 Integer.toString(eruleno)); 6444 } else { 6445 return null; 6446 } 6447 } 6448 6449 /** 6450 * @param p node whose kids will be marked 6451 * @param eruleno rule number 6452 */ 6453 private static void mark_kids(AbstractBURS_TreeNode p, int eruleno) 6454 { 6455 byte[] ntsrule = nts[eruleno]; 6456 // 7: any: r 6457 // 6: rz: rp 6458 // 5: rs: rp 6459 // 4: r: rz 6460 // 3: r: rs 6461 // 2: r: czr 6462 // 1: stm: r 6463 if (eruleno <= 7) { 6464 if (VM.VerifyAssertions) VM._assert(eruleno > 0); 6465 mark(p, ntsrule[0]); 6466 } 6467 // 38: r: REF_MOVE(ADDRESS_CONSTANT) 6468 // 37: r: REF_MOVE(ADDRESS_CONSTANT) 6469 // 36: r: REF_MOVE(ADDRESS_CONSTANT) 6470 // 35: r: LONG_MOVE(LONG_CONSTANT) 6471 // 34: stm: IR_PROLOGUE 6472 // 33: r: GET_TIME_BASE 6473 // 32: stm: RETURN(NULL) 6474 // 31: stm: GOTO 6475 // 30: rs: REF_MOVE(INT_CONSTANT) 6476 // 29: rs: REF_MOVE(INT_CONSTANT) 6477 // 28: rs: REF_MOVE(INT_CONSTANT) 6478 // 27: stm: TRAP 6479 // 26: stm: READ_CEILING 6480 // 25: stm: WRITE_FLOOR 6481 // 24: stm: FENCE 6482 // 23: r: GET_CAUGHT_EXCEPTION 6483 // 22: r: GUARD_COMBINE 6484 // 21: r: GUARD_MOVE 6485 // 20: stm: NOP 6486 // 19: stm: YIELDPOINT_BACKEDGE 6487 // 18: stm: YIELDPOINT_EPILOGUE 6488 // 17: stm: YIELDPOINT_PROLOGUE 6489 // 16: stm: UNINT_END 6490 // 15: stm: UNINT_BEGIN 6491 // 14: stm: IG_PATCH_POINT 6492 // 13: stm: RESOLVE 6493 // 12: any: LONG_CONSTANT 6494 // 11: any: INT_CONSTANT 6495 // 10: any: ADDRESS_CONSTANT 6496 // 9: any: NULL 6497 // 8: r: REGISTER 6498 else if (eruleno <= 38) { 6499 } 6500 // 100: r: ATTEMPT_ADDR(r,r) 6501 // 99: r: PREPARE_ADDR(r,r) 6502 // 98: r: LONG_LOAD(r,r) 6503 // 97: stm: LONG_IFCMP(r,r) 6504 // 96: stm: LONG_CMP(r,r) 6505 // 95: r: LONG_XOR(r,r) 6506 // 94: r: LONG_OR(r,r) 6507 // 93: r: LONG_AND(r,r) 6508 // 92: r: LONG_USHR(r,r) 6509 // 91: r: LONG_SHR(r,r) 6510 // 90: r: LONG_SHL(r,r) 6511 // 89: r: LONG_MUL(r,r) 6512 // 88: r: LONG_SUB(r,r) 6513 // 87: r: LONG_ADD(r,r) 6514 // 86: r: ATTEMPT_LONG(r,r) 6515 // 85: r: ATTEMPT_INT(r,r) 6516 // 84: r: PREPARE_LONG(r,r) 6517 // 83: r: PREPARE_INT(r,r) 6518 // 82: r: YIELDPOINT_OSR(any,any) 6519 // 81: r: OTHER_OPERAND(r,r) 6520 // 80: r: SYSCALL(r,any) 6521 // 79: r: CALL(r,any) 6522 // 78: stm: DOUBLE_CMPG(r,r) 6523 // 77: stm: DOUBLE_CMPL(r,r) 6524 // 76: stm: FLOAT_CMPG(r,r) 6525 // 75: stm: FLOAT_CMPL(r,r) 6526 // 74: stm: DOUBLE_IFCMP(r,r) 6527 // 73: stm: FLOAT_IFCMP(r,r) 6528 // 72: stm: INT_IFCMP2(r,r) 6529 // 71: stm: INT_IFCMP(r,r) 6530 // 70: rs: INT_LOAD(r,r) 6531 // 69: r: DOUBLE_LOAD(r,r) 6532 // 68: r: FLOAT_LOAD(r,r) 6533 // 67: rp: USHORT_LOAD(r,r) 6534 // 66: rs: SHORT_LOAD(r,r) 6535 // 65: rp: UBYTE_LOAD(r,r) 6536 // 64: rs: BYTE_LOAD(r,r) 6537 // 63: r: DOUBLE_DIV(r,r) 6538 // 62: r: FLOAT_DIV(r,r) 6539 // 61: r: DOUBLE_SUB(r,r) 6540 // 60: r: FLOAT_SUB(r,r) 6541 // 59: r: DOUBLE_MUL(r,r) 6542 // 58: r: FLOAT_MUL(r,r) 6543 // 57: r: DOUBLE_ADD(r,r) 6544 // 56: r: FLOAT_ADD(r,r) 6545 // 55: r: REF_XOR(r,r) 6546 // 54: r: REF_OR(r,r) 6547 // 53: r: REF_AND(r,r) 6548 // 52: rz: INT_USHR(r,r) 6549 // 51: rs: INT_SHR(r,r) 6550 // 50: rz: INT_SHL(r,r) 6551 // 49: r: INT_REM(r,r) 6552 // 48: r: INT_DIV(r,r) 6553 // 47: r: INT_MUL(r,r) 6554 // 46: r: REF_SUB(r,r) 6555 // 45: r: REF_ADD(r,r) 6556 // 44: boolcmp: BOOLEAN_CMP_ADDR(r,r) 6557 // 43: r: BOOLEAN_CMP_ADDR(r,r) 6558 // 42: boolcmp: BOOLEAN_CMP_INT(r,r) 6559 // 41: r: BOOLEAN_CMP_INT(r,r) 6560 // 40: stm: TRAP_IF(r,r) 6561 // 39: any: OTHER_OPERAND(any,any) 6562 else if (eruleno <= 100) { 6563 mark(p.getChild1(), ntsrule[0]); 6564 mark(p.getChild2(), ntsrule[1]); 6565 } 6566 // 192: r: LONG_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 6567 // 191: r: LONG_LOAD(r,INT_CONSTANT) 6568 // 190: r: REF_XOR(r,REF_MOVE(INT_CONSTANT)) 6569 // 189: r: REF_OR(r,REF_MOVE(INT_CONSTANT)) 6570 // 188: r: REF_OR(r,REF_MOVE(INT_CONSTANT)) 6571 // 187: r: REF_AND(r,REF_MOVE(INT_CONSTANT)) 6572 // 186: czr: REF_AND(r,REF_MOVE(INT_CONSTANT)) 6573 // 185: r: LONG_MOVE(r) 6574 // 184: r: LONG_BITS_AS_DOUBLE(r) 6575 // 183: r: DOUBLE_AS_LONG_BITS(r) 6576 // 182: r: LONG_2INT(r) 6577 // 181: r: INT_2LONG(r) 6578 // 180: r: LONG_NOT(r) 6579 // 179: r: LONG_USHR(r,INT_CONSTANT) 6580 // 178: r: LONG_SHR(r,INT_CONSTANT) 6581 // 177: r: LONG_SHL(r,INT_CONSTANT) 6582 // 176: r: LONG_NEG(r) 6583 // 175: stm: RETURN(r) 6584 // 174: stm: INT_IFCMP2(r,INT_CONSTANT) 6585 // 173: stm: INT_IFCMP(boolcmp,INT_CONSTANT) 6586 // 172: stm: INT_IFCMP(boolcmp,INT_CONSTANT) 6587 // 171: stm: INT_IFCMP(boolcmp,INT_CONSTANT) 6588 // 170: stm: INT_IFCMP(boolcmp,INT_CONSTANT) 6589 // 169: stm: INT_IFCMP(r,INT_CONSTANT) 6590 // 168: rs: INT_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 6591 // 167: rs: INT_LOAD(r,INT_CONSTANT) 6592 // 166: r: DOUBLE_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 6593 // 165: r: DOUBLE_LOAD(r,INT_CONSTANT) 6594 // 164: r: FLOAT_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 6595 // 163: r: FLOAT_LOAD(r,INT_CONSTANT) 6596 // 162: rp: USHORT_LOAD(r,INT_CONSTANT) 6597 // 161: rs: SHORT_LOAD(r,INT_CONSTANT) 6598 // 160: rp: UBYTE_LOAD(r,INT_CONSTANT) 6599 // 159: rs: BYTE_LOAD(r,INT_CONSTANT) 6600 // 158: r: DOUBLE_MOVE(r) 6601 // 157: r: FLOAT_MOVE(r) 6602 // 156: r: REF_MOVE(r) 6603 // 155: r: INT_BITS_AS_FLOAT(r) 6604 // 154: r: FLOAT_AS_INT_BITS(r) 6605 // 153: r: DOUBLE_2FLOAT(r) 6606 // 152: r: DOUBLE_2INT(r) 6607 // 151: r: FLOAT_2DOUBLE(r) 6608 // 150: r: FLOAT_2INT(r) 6609 // 149: r: INT_2DOUBLE(r) 6610 // 148: r: INT_2FLOAT(r) 6611 // 147: rs: INT_2SHORT(r) 6612 // 146: rp: INT_2USHORT(r) 6613 // 145: rs: INT_2BYTE(r) 6614 // 144: r: DOUBLE_SQRT(r) 6615 // 143: r: FLOAT_SQRT(r) 6616 // 142: r: DOUBLE_NEG(r) 6617 // 141: r: FLOAT_NEG(r) 6618 // 140: r: REF_NOT(r) 6619 // 139: r: REF_XOR(r,INT_CONSTANT) 6620 // 138: r: REF_OR(r,INT_CONSTANT) 6621 // 137: rp: REF_AND(r,INT_CONSTANT) 6622 // 136: czr: REF_AND(r,INT_CONSTANT) 6623 // 135: rp: INT_USHR(r,INT_CONSTANT) 6624 // 134: rs: INT_SHR(r,INT_CONSTANT) 6625 // 133: rz: INT_SHL(r,INT_CONSTANT) 6626 // 132: r: REF_NEG(r) 6627 // 131: r: INT_REM(r,REF_MOVE(INT_CONSTANT)) 6628 // 130: r: INT_DIV(r,REF_MOVE(INT_CONSTANT)) 6629 // 129: r: INT_MUL(r,INT_CONSTANT) 6630 // 128: r: REF_ADD(r,REF_MOVE(INT_CONSTANT)) 6631 // 127: r: REF_ADD(r,REF_MOVE(INT_CONSTANT)) 6632 // 126: r: REF_ADD(r,INT_CONSTANT) 6633 // 125: r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 6634 // 124: r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 6635 // 123: r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 6636 // 122: r: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 6637 // 121: boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 6638 // 120: boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 6639 // 119: boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 6640 // 118: boolcmp: BOOLEAN_CMP_INT(boolcmp,INT_CONSTANT) 6641 // 117: boolcmp: BOOLEAN_CMP_ADDR(r,INT_CONSTANT) 6642 // 116: r: BOOLEAN_CMP_ADDR(r,INT_CONSTANT) 6643 // 115: boolcmp: BOOLEAN_CMP_INT(r,INT_CONSTANT) 6644 // 114: r: BOOLEAN_CMP_INT(r,INT_CONSTANT) 6645 // 113: r: BOOLEAN_NOT(r) 6646 // 112: stm: TRAP_IF(r,LONG_CONSTANT) 6647 // 111: stm: TRAP_IF(r,INT_CONSTANT) 6648 // 110: stm: ICBI(r) 6649 // 109: stm: DCBZL(r) 6650 // 108: stm: DCBZ(r) 6651 // 107: stm: DCBTST(r) 6652 // 106: stm: DCBT(r) 6653 // 105: stm: DCBST(r) 6654 // 104: stm: DCBF(r) 6655 // 103: stm: SET_CAUGHT_EXCEPTION(r) 6656 // 102: stm: NULL_CHECK(r) 6657 // 101: stm: LOWTABLESWITCH(r) 6658 else if (eruleno <= 192) { 6659 mark(p.getChild1(), ntsrule[0]); 6660 } 6661 // 194: r: CALL(BRANCH_TARGET,any) 6662 // 193: r: REF_SUB(INT_CONSTANT,r) 6663 else if (eruleno <= 194) { 6664 mark(p.getChild2(), ntsrule[0]); 6665 } 6666 // 214: stm: INT_IFCMP(REF_ADD(r,INT_CONSTANT),INT_CONSTANT) 6667 // 213: stm: INT_IFCMP(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 6668 // 212: stm: INT_IFCMP(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 6669 // 211: stm: INT_IFCMP(REF_NOT(r),INT_CONSTANT) 6670 // 210: stm: INT_IFCMP(REF_NEG(r),INT_CONSTANT) 6671 // 209: stm: INT_IFCMP(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 6672 // 208: stm: INT_IFCMP(INT_SHR(r,INT_CONSTANT),INT_CONSTANT) 6673 // 207: stm: INT_IFCMP(INT_SHL(r,INT_CONSTANT),INT_CONSTANT) 6674 // 206: stm: INT_IFCMP(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 6675 // 205: stm: INT_IFCMP(INT_2SHORT(r),INT_CONSTANT) 6676 // 204: stm: INT_IFCMP(INT_2BYTE(r),INT_CONSTANT) 6677 // 203: rs: INT_LOAD(REF_ADD(r,INT_CONSTANT),INT_CONSTANT) 6678 // 202: rp: REF_AND(BYTE_LOAD(r,INT_CONSTANT),INT_CONSTANT) 6679 // 201: rp: REF_AND(INT_USHR(r,INT_CONSTANT),REF_MOVE(INT_CONSTANT)) 6680 // 200: rp: REF_AND(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 6681 // 199: rp: INT_USHR(INT_SHL(r,INT_CONSTANT),INT_CONSTANT) 6682 // 198: rp: INT_USHR(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 6683 // 197: rp: INT_USHR(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 6684 // 196: rp: INT_SHR(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 6685 // 195: rz: INT_SHL(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 6686 else if (eruleno <= 214) { 6687 mark(p.getChild1().getChild1(), ntsrule[0]); 6688 } 6689 // 219: stm: SHORT_STORE(INT_2USHORT(r),OTHER_OPERAND(r,INT_CONSTANT)) 6690 // 218: stm: SHORT_STORE(INT_2SHORT(r),OTHER_OPERAND(r,INT_CONSTANT)) 6691 // 217: stm: BYTE_STORE(INT_2BYTE(r),OTHER_OPERAND(r,INT_CONSTANT)) 6692 // 216: r: REF_OR(REF_NOT(r),REF_NOT(r)) 6693 // 215: r: REF_AND(REF_NOT(r),REF_NOT(r)) 6694 else if (eruleno <= 219) { 6695 mark(p.getChild1().getChild1(), ntsrule[0]); 6696 mark(p.getChild2().getChild1(), ntsrule[1]); 6697 } 6698 // 231: stm: LONG_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 6699 // 230: stm: LONG_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 6700 // 229: stm: DOUBLE_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 6701 // 228: stm: DOUBLE_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 6702 // 227: stm: FLOAT_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 6703 // 226: stm: FLOAT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 6704 // 225: stm: INT_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 6705 // 224: stm: INT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 6706 // 223: stm: SHORT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 6707 // 222: stm: BYTE_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 6708 // 221: r: REF_OR(r,REF_NOT(r)) 6709 // 220: r: REF_AND(r,REF_NOT(r)) 6710 else if (eruleno <= 231) { 6711 mark(p.getChild1(), ntsrule[0]); 6712 mark(p.getChild2().getChild1(), ntsrule[1]); 6713 } 6714 // 245: stm: INT_IFCMP(REF_XOR(r,r),INT_CONSTANT) 6715 // 244: stm: INT_IFCMP(REF_OR(r,r),INT_CONSTANT) 6716 // 243: stm: INT_IFCMP(REF_AND(r,r),INT_CONSTANT) 6717 // 242: stm: INT_IFCMP(REF_ADD(r,r),INT_CONSTANT) 6718 // 241: stm: INT_IFCMP(ATTEMPT_ADDR(r,r),INT_CONSTANT) 6719 // 240: stm: INT_IFCMP(ATTEMPT_INT(r,r),INT_CONSTANT) 6720 // 239: stm: INT_IFCMP(INT_SHR(r,r),INT_CONSTANT) 6721 // 238: stm: INT_IFCMP(INT_SHL(r,r),INT_CONSTANT) 6722 // 237: stm: INT_IFCMP(INT_USHR(r,r),INT_CONSTANT) 6723 // 236: rs: INT_LOAD(REF_ADD(r,r),INT_CONSTANT) 6724 // 235: rp: REF_AND(BYTE_LOAD(r,r),INT_CONSTANT) 6725 // 234: r: REF_NOT(REF_XOR(r,r)) 6726 // 233: r: REF_NOT(REF_AND(r,r)) 6727 // 232: r: REF_NOT(REF_OR(r,r)) 6728 else if (eruleno <= 245) { 6729 mark(p.getChild1().getChild1(), ntsrule[0]); 6730 mark(p.getChild1().getChild2(), ntsrule[1]); 6731 } 6732 // 249: r: DOUBLE_SUB(DOUBLE_MUL(r,r),r) 6733 // 248: r: FLOAT_SUB(FLOAT_MUL(r,r),r) 6734 // 247: r: DOUBLE_ADD(DOUBLE_MUL(r,r),r) 6735 // 246: r: FLOAT_ADD(FLOAT_MUL(r,r),r) 6736 else if (eruleno <= 249) { 6737 mark(p.getChild1().getChild1(), ntsrule[0]); 6738 mark(p.getChild1().getChild2(), ntsrule[1]); 6739 mark(p.getChild2(), ntsrule[2]); 6740 } 6741 // 257: stm: LONG_STORE(r,OTHER_OPERAND(r,r)) 6742 // 256: stm: DOUBLE_STORE(r,OTHER_OPERAND(r,r)) 6743 // 255: stm: FLOAT_STORE(r,OTHER_OPERAND(r,r)) 6744 // 254: stm: INT_STORE(r,OTHER_OPERAND(r,r)) 6745 // 253: stm: SHORT_STORE(r,OTHER_OPERAND(r,r)) 6746 // 252: stm: BYTE_STORE(r,OTHER_OPERAND(r,r)) 6747 // 251: r: DOUBLE_ADD(r,DOUBLE_MUL(r,r)) 6748 // 250: r: FLOAT_ADD(r,FLOAT_MUL(r,r)) 6749 else if (eruleno <= 257) { 6750 mark(p.getChild1(), ntsrule[0]); 6751 mark(p.getChild2().getChild1(), ntsrule[1]); 6752 mark(p.getChild2().getChild2(), ntsrule[2]); 6753 } 6754 // 261: r: DOUBLE_NEG(DOUBLE_SUB(DOUBLE_MUL(r,r),r)) 6755 // 260: r: FLOAT_NEG(FLOAT_SUB(FLOAT_MUL(r,r),r)) 6756 // 259: r: DOUBLE_NEG(DOUBLE_ADD(DOUBLE_MUL(r,r),r)) 6757 // 258: r: FLOAT_NEG(FLOAT_ADD(FLOAT_MUL(r,r),r)) 6758 else if (eruleno <= 261) { 6759 mark(p.getChild1().getChild1().getChild1(), ntsrule[0]); 6760 mark(p.getChild1().getChild1().getChild2(), ntsrule[1]); 6761 mark(p.getChild1().getChild2(), ntsrule[2]); 6762 } 6763 // 263: r: DOUBLE_NEG(DOUBLE_ADD(r,DOUBLE_MUL(r,r))) 6764 // 262: r: FLOAT_NEG(FLOAT_ADD(r,FLOAT_MUL(r,r))) 6765 else if (eruleno <= 263) { 6766 mark(p.getChild1().getChild1(), ntsrule[0]); 6767 mark(p.getChild1().getChild2().getChild1(), ntsrule[1]); 6768 mark(p.getChild1().getChild2().getChild2(), ntsrule[2]); 6769 } 6770 // 266: stm: SHORT_STORE(INT_2USHORT(r),OTHER_OPERAND(r,r)) 6771 // 265: stm: SHORT_STORE(INT_2SHORT(r),OTHER_OPERAND(r,r)) 6772 // 264: stm: BYTE_STORE(INT_2BYTE(r),OTHER_OPERAND(r,r)) 6773 else if (eruleno <= 266) { 6774 mark(p.getChild1().getChild1(), ntsrule[0]); 6775 mark(p.getChild2().getChild1(), ntsrule[1]); 6776 mark(p.getChild2().getChild2(), ntsrule[2]); 6777 } 6778 // 267: stm: INT_STORE(r,OTHER_OPERAND(REF_ADD(r,INT_CONSTANT),INT_CONSTANT)) 6779 else if (eruleno <= 267) { 6780 mark(p.getChild1(), ntsrule[0]); 6781 mark(p.getChild2().getChild1().getChild1(), ntsrule[1]); 6782 } 6783 // 269: stm: INT_IFCMP(REF_OR(r,REF_NOT(r)),INT_CONSTANT) 6784 // 268: stm: INT_IFCMP(REF_AND(r,REF_NOT(r)),INT_CONSTANT) 6785 else { 6786 if (VM.VerifyAssertions) VM._assert(eruleno <= 269); 6787 mark(p.getChild1().getChild1(), ntsrule[0]); 6788 mark(p.getChild1().getChild2().getChild1(), ntsrule[1]); 6789 } 6790 } 6791 6792 /** 6793 * For each BURS rule (the number of which provides the index) give its flags byte 6794 */ 6795 private static final byte[] action={ 6796 0, 6797 NOFLAGS, // 1 - stm: r 6798 NOFLAGS, // 2 - r: REGISTER 6799 NOFLAGS, // 3 - r: czr 6800 NOFLAGS, // 4 - r: rs 6801 NOFLAGS, // 5 - r: rz 6802 NOFLAGS, // 6 - rs: rp 6803 NOFLAGS, // 7 - rz: rp 6804 NOFLAGS, // 8 - any: NULL 6805 NOFLAGS, // 9 - any: r 6806 NOFLAGS, // 10 - any: ADDRESS_CONSTANT 6807 NOFLAGS, // 11 - any: INT_CONSTANT 6808 NOFLAGS, // 12 - any: LONG_CONSTANT 6809 NOFLAGS, // 13 - any: OTHER_OPERAND(any, any) 6810 EMIT_INSTRUCTION, // 14 - stm: RESOLVE 6811 EMIT_INSTRUCTION, // 15 - stm: IG_PATCH_POINT 6812 EMIT_INSTRUCTION, // 16 - stm: UNINT_BEGIN 6813 EMIT_INSTRUCTION, // 17 - stm: UNINT_END 6814 EMIT_INSTRUCTION, // 18 - stm: YIELDPOINT_PROLOGUE 6815 EMIT_INSTRUCTION, // 19 - stm: YIELDPOINT_EPILOGUE 6816 EMIT_INSTRUCTION, // 20 - stm: YIELDPOINT_BACKEDGE 6817 EMIT_INSTRUCTION, // 21 - stm: LOWTABLESWITCH(r) 6818 NOFLAGS, // 22 - stm: NOP 6819 EMIT_INSTRUCTION, // 23 - r: GUARD_MOVE 6820 EMIT_INSTRUCTION, // 24 - r: GUARD_COMBINE 6821 EMIT_INSTRUCTION, // 25 - stm: NULL_CHECK(r) 6822 EMIT_INSTRUCTION, // 26 - r: GET_CAUGHT_EXCEPTION 6823 EMIT_INSTRUCTION, // 27 - stm: SET_CAUGHT_EXCEPTION(r) 6824 EMIT_INSTRUCTION, // 28 - stm: FENCE 6825 EMIT_INSTRUCTION, // 29 - stm: WRITE_FLOOR 6826 EMIT_INSTRUCTION, // 30 - stm: READ_CEILING 6827 EMIT_INSTRUCTION, // 31 - stm: DCBF(r) 6828 EMIT_INSTRUCTION, // 32 - stm: DCBST(r) 6829 EMIT_INSTRUCTION, // 33 - stm: DCBT(r) 6830 EMIT_INSTRUCTION, // 34 - stm: DCBTST(r) 6831 EMIT_INSTRUCTION, // 35 - stm: DCBZ(r) 6832 EMIT_INSTRUCTION, // 36 - stm: DCBZL(r) 6833 EMIT_INSTRUCTION, // 37 - stm: ICBI(r) 6834 EMIT_INSTRUCTION, // 38 - stm: TRAP 6835 EMIT_INSTRUCTION, // 39 - stm: TRAP_IF(r,r) 6836 EMIT_INSTRUCTION, // 40 - stm: TRAP_IF(r,INT_CONSTANT) 6837 EMIT_INSTRUCTION, // 41 - stm: TRAP_IF(r,LONG_CONSTANT) 6838 EMIT_INSTRUCTION, // 42 - r: BOOLEAN_NOT(r) 6839 EMIT_INSTRUCTION, // 43 - r: BOOLEAN_CMP_INT(r,INT_CONSTANT) 6840 EMIT_INSTRUCTION, // 44 - r: BOOLEAN_CMP_INT(r,r) 6841 EMIT_INSTRUCTION, // 45 - boolcmp: BOOLEAN_CMP_INT(r,INT_CONSTANT) 6842 EMIT_INSTRUCTION, // 46 - boolcmp: BOOLEAN_CMP_INT(r,r) 6843 EMIT_INSTRUCTION, // 47 - r: BOOLEAN_CMP_ADDR(r,INT_CONSTANT) 6844 EMIT_INSTRUCTION, // 48 - r: BOOLEAN_CMP_ADDR(r,r) 6845 EMIT_INSTRUCTION, // 49 - boolcmp: BOOLEAN_CMP_ADDR(r,INT_CONSTANT) 6846 EMIT_INSTRUCTION, // 50 - boolcmp: BOOLEAN_CMP_ADDR(r,r) 6847 NOFLAGS, // 51 - boolcmp: BOOLEAN_CMP_INT(boolcmp, INT_CONSTANT) 6848 EMIT_INSTRUCTION, // 52 - boolcmp: BOOLEAN_CMP_INT(boolcmp, INT_CONSTANT) 6849 NOFLAGS, // 53 - boolcmp: BOOLEAN_CMP_INT(boolcmp, INT_CONSTANT) 6850 EMIT_INSTRUCTION, // 54 - boolcmp: BOOLEAN_CMP_INT(boolcmp, INT_CONSTANT) 6851 EMIT_INSTRUCTION, // 55 - r: BOOLEAN_CMP_INT(boolcmp, INT_CONSTANT) 6852 EMIT_INSTRUCTION, // 56 - r: BOOLEAN_CMP_INT(boolcmp, INT_CONSTANT) 6853 EMIT_INSTRUCTION, // 57 - r: BOOLEAN_CMP_INT(boolcmp, INT_CONSTANT) 6854 EMIT_INSTRUCTION, // 58 - r: BOOLEAN_CMP_INT(boolcmp, INT_CONSTANT) 6855 EMIT_INSTRUCTION, // 59 - r: REF_ADD(r,INT_CONSTANT) 6856 EMIT_INSTRUCTION, // 60 - r: REF_ADD(r,r) 6857 EMIT_INSTRUCTION, // 61 - r: REF_ADD(r,REF_MOVE(INT_CONSTANT)) 6858 EMIT_INSTRUCTION, // 62 - r: REF_ADD(r,REF_MOVE(INT_CONSTANT)) 6859 EMIT_INSTRUCTION, // 63 - r: REF_SUB(r,r) 6860 EMIT_INSTRUCTION, // 64 - r: REF_SUB(INT_CONSTANT,r) 6861 EMIT_INSTRUCTION, // 65 - r: INT_MUL(r,INT_CONSTANT) 6862 EMIT_INSTRUCTION, // 66 - r: INT_MUL(r,r) 6863 EMIT_INSTRUCTION, // 67 - r: INT_DIV(r,r) 6864 EMIT_INSTRUCTION, // 68 - r: INT_DIV(r,REF_MOVE(INT_CONSTANT)) 6865 EMIT_INSTRUCTION, // 69 - r: INT_REM(r,r) 6866 EMIT_INSTRUCTION, // 70 - r: INT_REM(r,REF_MOVE(INT_CONSTANT)) 6867 EMIT_INSTRUCTION, // 71 - r: REF_NEG(r) 6868 EMIT_INSTRUCTION, // 72 - rz: INT_SHL(r,INT_CONSTANT) 6869 EMIT_INSTRUCTION, // 73 - rz: INT_SHL(r,r) 6870 EMIT_INSTRUCTION, // 74 - rz: INT_SHL(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 6871 EMIT_INSTRUCTION, // 75 - rs: INT_SHR(r,INT_CONSTANT) 6872 EMIT_INSTRUCTION, // 76 - rs: INT_SHR(r,r) 6873 EMIT_INSTRUCTION, // 77 - rp: INT_SHR(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 6874 EMIT_INSTRUCTION, // 78 - rp: INT_USHR(r,INT_CONSTANT) 6875 EMIT_INSTRUCTION, // 79 - rz: INT_USHR(r,r) 6876 EMIT_INSTRUCTION, // 80 - rp: INT_USHR(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 6877 EMIT_INSTRUCTION, // 81 - rp: INT_USHR(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 6878 EMIT_INSTRUCTION, // 82 - rp: INT_USHR(INT_SHL(r,INT_CONSTANT),INT_CONSTANT) 6879 EMIT_INSTRUCTION, // 83 - r: REF_AND(r,r) 6880 EMIT_INSTRUCTION, // 84 - czr: REF_AND(r,INT_CONSTANT) 6881 EMIT_INSTRUCTION, // 85 - rp: REF_AND(r,INT_CONSTANT) 6882 EMIT_INSTRUCTION, // 86 - r: REF_AND(REF_NOT(r),REF_NOT(r)) 6883 EMIT_INSTRUCTION, // 87 - r: REF_AND(r,REF_NOT(r)) 6884 EMIT_INSTRUCTION, // 88 - rp: REF_AND(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 6885 EMIT_INSTRUCTION, // 89 - rp: REF_AND(INT_USHR(r,INT_CONSTANT),REF_MOVE(INT_CONSTANT)) 6886 EMIT_INSTRUCTION, // 90 - r: REF_OR(r,r) 6887 EMIT_INSTRUCTION, // 91 - r: REF_OR(r,INT_CONSTANT) 6888 EMIT_INSTRUCTION, // 92 - r: REF_OR(REF_NOT(r),REF_NOT(r)) 6889 EMIT_INSTRUCTION, // 93 - r: REF_OR(r,REF_NOT(r)) 6890 EMIT_INSTRUCTION, // 94 - r: REF_XOR(r,r) 6891 EMIT_INSTRUCTION, // 95 - r: REF_XOR(r,INT_CONSTANT) 6892 EMIT_INSTRUCTION, // 96 - r: REF_NOT(r) 6893 EMIT_INSTRUCTION, // 97 - r: REF_NOT(REF_OR(r,r)) 6894 EMIT_INSTRUCTION, // 98 - r: REF_NOT(REF_AND(r,r)) 6895 EMIT_INSTRUCTION, // 99 - r: REF_NOT(REF_XOR(r,r)) 6896 EMIT_INSTRUCTION, // 100 - r: FLOAT_ADD(r,r) 6897 EMIT_INSTRUCTION, // 101 - r: DOUBLE_ADD(r,r) 6898 EMIT_INSTRUCTION, // 102 - r: FLOAT_MUL(r,r) 6899 EMIT_INSTRUCTION, // 103 - r: DOUBLE_MUL(r,r) 6900 EMIT_INSTRUCTION, // 104 - r: FLOAT_SUB(r,r) 6901 EMIT_INSTRUCTION, // 105 - r: DOUBLE_SUB(r,r) 6902 EMIT_INSTRUCTION, // 106 - r: FLOAT_DIV(r,r) 6903 EMIT_INSTRUCTION, // 107 - r: DOUBLE_DIV(r,r) 6904 EMIT_INSTRUCTION, // 108 - r: FLOAT_NEG(r) 6905 EMIT_INSTRUCTION, // 109 - r: DOUBLE_NEG(r) 6906 EMIT_INSTRUCTION, // 110 - r: FLOAT_SQRT(r) 6907 EMIT_INSTRUCTION, // 111 - r: DOUBLE_SQRT(r) 6908 EMIT_INSTRUCTION, // 112 - r: FLOAT_ADD(FLOAT_MUL(r, r), r) 6909 EMIT_INSTRUCTION, // 113 - r: DOUBLE_ADD(DOUBLE_MUL(r, r), r) 6910 EMIT_INSTRUCTION, // 114 - r: FLOAT_ADD(r, FLOAT_MUL(r,r)) 6911 EMIT_INSTRUCTION, // 115 - r: DOUBLE_ADD(r, DOUBLE_MUL(r,r)) 6912 EMIT_INSTRUCTION, // 116 - r: FLOAT_SUB(FLOAT_MUL(r, r), r) 6913 EMIT_INSTRUCTION, // 117 - r: DOUBLE_SUB(DOUBLE_MUL(r, r), r) 6914 EMIT_INSTRUCTION, // 118 - r: FLOAT_NEG(FLOAT_ADD(FLOAT_MUL(r, r), r)) 6915 EMIT_INSTRUCTION, // 119 - r: DOUBLE_NEG(DOUBLE_ADD(DOUBLE_MUL(r, r), r)) 6916 EMIT_INSTRUCTION, // 120 - r: FLOAT_NEG(FLOAT_ADD(r, FLOAT_MUL(r,r))) 6917 EMIT_INSTRUCTION, // 121 - r: DOUBLE_NEG(DOUBLE_ADD(r, DOUBLE_MUL(r,r))) 6918 EMIT_INSTRUCTION, // 122 - r: FLOAT_NEG(FLOAT_SUB(FLOAT_MUL(r, r), r)) 6919 EMIT_INSTRUCTION, // 123 - r: DOUBLE_NEG(DOUBLE_SUB(DOUBLE_MUL(r, r), r)) 6920 EMIT_INSTRUCTION, // 124 - rs: INT_2BYTE(r) 6921 EMIT_INSTRUCTION, // 125 - rp: INT_2USHORT(r) 6922 EMIT_INSTRUCTION, // 126 - rs: INT_2SHORT(r) 6923 EMIT_INSTRUCTION, // 127 - r: INT_2FLOAT(r) 6924 EMIT_INSTRUCTION, // 128 - r: INT_2DOUBLE(r) 6925 EMIT_INSTRUCTION, // 129 - r: FLOAT_2INT(r) 6926 EMIT_INSTRUCTION, // 130 - r: FLOAT_2DOUBLE(r) 6927 EMIT_INSTRUCTION, // 131 - r: DOUBLE_2INT(r) 6928 EMIT_INSTRUCTION, // 132 - r: DOUBLE_2FLOAT(r) 6929 EMIT_INSTRUCTION, // 133 - r: FLOAT_AS_INT_BITS(r) 6930 EMIT_INSTRUCTION, // 134 - r: INT_BITS_AS_FLOAT(r) 6931 EMIT_INSTRUCTION, // 135 - r: REF_MOVE(r) 6932 EMIT_INSTRUCTION, // 136 - rs: REF_MOVE(INT_CONSTANT) 6933 EMIT_INSTRUCTION, // 137 - rs: REF_MOVE(INT_CONSTANT) 6934 EMIT_INSTRUCTION, // 138 - rs: REF_MOVE(INT_CONSTANT) 6935 EMIT_INSTRUCTION, // 139 - r: FLOAT_MOVE(r) 6936 EMIT_INSTRUCTION, // 140 - r: DOUBLE_MOVE(r) 6937 EMIT_INSTRUCTION, // 141 - rs: BYTE_LOAD(r,INT_CONSTANT) 6938 EMIT_INSTRUCTION, // 142 - rs: BYTE_LOAD(r,r) 6939 EMIT_INSTRUCTION, // 143 - rp: REF_AND(BYTE_LOAD(r,r),INT_CONSTANT) 6940 EMIT_INSTRUCTION, // 144 - rp: REF_AND(BYTE_LOAD(r,INT_CONSTANT),INT_CONSTANT) 6941 EMIT_INSTRUCTION, // 145 - rp: UBYTE_LOAD(r,INT_CONSTANT) 6942 EMIT_INSTRUCTION, // 146 - rp: UBYTE_LOAD(r,r) 6943 EMIT_INSTRUCTION, // 147 - rs: SHORT_LOAD(r,INT_CONSTANT) 6944 EMIT_INSTRUCTION, // 148 - rs: SHORT_LOAD(r,r) 6945 EMIT_INSTRUCTION, // 149 - rp: USHORT_LOAD(r,INT_CONSTANT) 6946 EMIT_INSTRUCTION, // 150 - rp: USHORT_LOAD(r,r) 6947 EMIT_INSTRUCTION, // 151 - r: FLOAT_LOAD(r,INT_CONSTANT) 6948 EMIT_INSTRUCTION, // 152 - r: FLOAT_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 6949 EMIT_INSTRUCTION, // 153 - r: FLOAT_LOAD(r,r) 6950 EMIT_INSTRUCTION, // 154 - r: DOUBLE_LOAD(r,INT_CONSTANT) 6951 EMIT_INSTRUCTION, // 155 - r: DOUBLE_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 6952 EMIT_INSTRUCTION, // 156 - r: DOUBLE_LOAD(r,r) 6953 EMIT_INSTRUCTION, // 157 - rs: INT_LOAD(r,INT_CONSTANT) 6954 EMIT_INSTRUCTION, // 158 - rs: INT_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 6955 EMIT_INSTRUCTION, // 159 - rs: INT_LOAD(r,r) 6956 EMIT_INSTRUCTION, // 160 - rs: INT_LOAD(REF_ADD(r,r),INT_CONSTANT) 6957 EMIT_INSTRUCTION, // 161 - rs: INT_LOAD(REF_ADD(r,INT_CONSTANT),INT_CONSTANT) 6958 EMIT_INSTRUCTION, // 162 - stm: BYTE_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 6959 EMIT_INSTRUCTION, // 163 - stm: BYTE_STORE(r,OTHER_OPERAND(r,r)) 6960 EMIT_INSTRUCTION, // 164 - stm: BYTE_STORE(INT_2BYTE(r),OTHER_OPERAND(r,INT_CONSTANT)) 6961 EMIT_INSTRUCTION, // 165 - stm: BYTE_STORE(INT_2BYTE(r),OTHER_OPERAND(r,r)) 6962 EMIT_INSTRUCTION, // 166 - stm: SHORT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 6963 EMIT_INSTRUCTION, // 167 - stm: SHORT_STORE(r,OTHER_OPERAND(r,r)) 6964 EMIT_INSTRUCTION, // 168 - stm: SHORT_STORE(INT_2SHORT(r),OTHER_OPERAND(r,INT_CONSTANT)) 6965 EMIT_INSTRUCTION, // 169 - stm: SHORT_STORE(INT_2SHORT(r),OTHER_OPERAND(r,r)) 6966 EMIT_INSTRUCTION, // 170 - stm: SHORT_STORE(INT_2USHORT(r),OTHER_OPERAND(r,INT_CONSTANT)) 6967 EMIT_INSTRUCTION, // 171 - stm: SHORT_STORE(INT_2USHORT(r),OTHER_OPERAND(r,r)) 6968 EMIT_INSTRUCTION, // 172 - stm: INT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 6969 EMIT_INSTRUCTION, // 173 - stm: INT_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 6970 EMIT_INSTRUCTION, // 174 - stm: INT_STORE(r,OTHER_OPERAND(r,r)) 6971 EMIT_INSTRUCTION, // 175 - stm: INT_STORE(r,OTHER_OPERAND(REF_ADD(r,INT_CONSTANT),INT_CONSTANT)) 6972 EMIT_INSTRUCTION, // 176 - stm: FLOAT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 6973 EMIT_INSTRUCTION, // 177 - stm: FLOAT_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 6974 EMIT_INSTRUCTION, // 178 - stm: FLOAT_STORE(r,OTHER_OPERAND(r,r)) 6975 EMIT_INSTRUCTION, // 179 - stm: DOUBLE_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 6976 EMIT_INSTRUCTION, // 180 - stm: DOUBLE_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 6977 EMIT_INSTRUCTION, // 181 - stm: DOUBLE_STORE(r,OTHER_OPERAND(r,r)) 6978 EMIT_INSTRUCTION, // 182 - stm: INT_IFCMP(r,r) 6979 EMIT_INSTRUCTION, // 183 - stm: INT_IFCMP(r,INT_CONSTANT) 6980 EMIT_INSTRUCTION, // 184 - stm: INT_IFCMP(INT_2BYTE(r),INT_CONSTANT) 6981 EMIT_INSTRUCTION, // 185 - stm: INT_IFCMP(INT_2SHORT(r),INT_CONSTANT) 6982 EMIT_INSTRUCTION, // 186 - stm: INT_IFCMP(INT_USHR(r,r),INT_CONSTANT) 6983 EMIT_INSTRUCTION, // 187 - stm: INT_IFCMP(INT_SHL(r,r),INT_CONSTANT) 6984 EMIT_INSTRUCTION, // 188 - stm: INT_IFCMP(INT_SHR(r,r),INT_CONSTANT) 6985 EMIT_INSTRUCTION, // 189 - stm: INT_IFCMP(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 6986 EMIT_INSTRUCTION, // 190 - stm: INT_IFCMP(INT_SHL(r,INT_CONSTANT),INT_CONSTANT) 6987 EMIT_INSTRUCTION, // 191 - stm: INT_IFCMP(INT_SHR(r,INT_CONSTANT),INT_CONSTANT) 6988 EMIT_INSTRUCTION, // 192 - stm: INT_IFCMP(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 6989 EMIT_INSTRUCTION, // 193 - stm: INT_IFCMP(boolcmp, INT_CONSTANT) 6990 EMIT_INSTRUCTION, // 194 - stm: INT_IFCMP(boolcmp, INT_CONSTANT) 6991 EMIT_INSTRUCTION, // 195 - stm: INT_IFCMP(boolcmp, INT_CONSTANT) 6992 EMIT_INSTRUCTION, // 196 - stm: INT_IFCMP(boolcmp, INT_CONSTANT) 6993 EMIT_INSTRUCTION, // 197 - stm: INT_IFCMP2(r,r) 6994 EMIT_INSTRUCTION, // 198 - stm: INT_IFCMP2(r,INT_CONSTANT) 6995 EMIT_INSTRUCTION, // 199 - stm: FLOAT_IFCMP(r,r) 6996 EMIT_INSTRUCTION, // 200 - stm: DOUBLE_IFCMP(r,r) 6997 EMIT_INSTRUCTION, // 201 - stm: FLOAT_CMPL(r,r) 6998 EMIT_INSTRUCTION, // 202 - stm: FLOAT_CMPG(r,r) 6999 EMIT_INSTRUCTION, // 203 - stm: DOUBLE_CMPL(r,r) 7000 EMIT_INSTRUCTION, // 204 - stm: DOUBLE_CMPG(r,r) 7001 EMIT_INSTRUCTION, // 205 - stm: GOTO 7002 EMIT_INSTRUCTION, // 206 - stm: RETURN(NULL) 7003 EMIT_INSTRUCTION, // 207 - stm: RETURN(r) 7004 EMIT_INSTRUCTION, // 208 - r: CALL(r,any) 7005 EMIT_INSTRUCTION, // 209 - r: CALL(BRANCH_TARGET,any) 7006 EMIT_INSTRUCTION, // 210 - r: SYSCALL(r,any) 7007 EMIT_INSTRUCTION, // 211 - r: GET_TIME_BASE 7008 NOFLAGS, // 212 - r: OTHER_OPERAND(r,r) 7009 EMIT_INSTRUCTION, // 213 - r: YIELDPOINT_OSR(any, any) 7010 EMIT_INSTRUCTION, // 214 - r: PREPARE_INT(r, r) 7011 EMIT_INSTRUCTION, // 215 - r: PREPARE_LONG(r, r) 7012 EMIT_INSTRUCTION, // 216 - r: ATTEMPT_INT(r, r) 7013 EMIT_INSTRUCTION, // 217 - r: ATTEMPT_LONG(r, r) 7014 EMIT_INSTRUCTION, // 218 - stm: IR_PROLOGUE 7015 EMIT_INSTRUCTION, // 219 - r: LONG_ADD(r,r) 7016 EMIT_INSTRUCTION, // 220 - r: LONG_SUB(r,r) 7017 EMIT_INSTRUCTION, // 221 - r: LONG_MUL(r,r) 7018 EMIT_INSTRUCTION, // 222 - r: LONG_NEG(r) 7019 EMIT_INSTRUCTION, // 223 - r: LONG_SHL(r,r) 7020 EMIT_INSTRUCTION, // 224 - r: LONG_SHL(r,INT_CONSTANT) 7021 EMIT_INSTRUCTION, // 225 - r: LONG_SHR(r,r) 7022 EMIT_INSTRUCTION, // 226 - r: LONG_SHR(r,INT_CONSTANT) 7023 EMIT_INSTRUCTION, // 227 - r: LONG_USHR(r,r) 7024 EMIT_INSTRUCTION, // 228 - r: LONG_USHR(r,INT_CONSTANT) 7025 EMIT_INSTRUCTION, // 229 - r: LONG_AND(r,r) 7026 EMIT_INSTRUCTION, // 230 - r: LONG_OR(r,r) 7027 EMIT_INSTRUCTION, // 231 - r: LONG_XOR(r,r) 7028 EMIT_INSTRUCTION, // 232 - r: LONG_NOT(r) 7029 EMIT_INSTRUCTION, // 233 - r: INT_2LONG(r) 7030 EMIT_INSTRUCTION, // 234 - r: LONG_2INT(r) 7031 EMIT_INSTRUCTION, // 235 - r: DOUBLE_AS_LONG_BITS(r) 7032 EMIT_INSTRUCTION, // 236 - r: LONG_BITS_AS_DOUBLE(r) 7033 EMIT_INSTRUCTION, // 237 - r: LONG_MOVE(LONG_CONSTANT) 7034 EMIT_INSTRUCTION, // 238 - r: LONG_MOVE(r) 7035 EMIT_INSTRUCTION, // 239 - stm: LONG_CMP(r,r) 7036 EMIT_INSTRUCTION, // 240 - stm: LONG_IFCMP(r,r) 7037 EMIT_INSTRUCTION, // 241 - stm: INT_IFCMP(ATTEMPT_INT(r,r),INT_CONSTANT) 7038 EMIT_INSTRUCTION, // 242 - stm: INT_IFCMP(ATTEMPT_ADDR(r,r),INT_CONSTANT) 7039 EMIT_INSTRUCTION, // 243 - stm: INT_IFCMP(REF_NEG(r),INT_CONSTANT) 7040 EMIT_INSTRUCTION, // 244 - stm: INT_IFCMP(REF_NOT(r),INT_CONSTANT) 7041 EMIT_INSTRUCTION, // 245 - stm: INT_IFCMP(REF_ADD(r,r),INT_CONSTANT) 7042 EMIT_INSTRUCTION, // 246 - stm: INT_IFCMP(REF_AND(r,r),INT_CONSTANT) 7043 EMIT_INSTRUCTION, // 247 - stm: INT_IFCMP(REF_OR(r,r),INT_CONSTANT) 7044 EMIT_INSTRUCTION, // 248 - stm: INT_IFCMP(REF_XOR(r,r),INT_CONSTANT) 7045 EMIT_INSTRUCTION, // 249 - stm: INT_IFCMP(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 7046 EMIT_INSTRUCTION, // 250 - stm: INT_IFCMP(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 7047 EMIT_INSTRUCTION, // 251 - stm: INT_IFCMP(REF_ADD(r,INT_CONSTANT),INT_CONSTANT) 7048 EMIT_INSTRUCTION, // 252 - stm: INT_IFCMP(REF_AND(r,REF_NOT(r)),INT_CONSTANT) 7049 EMIT_INSTRUCTION, // 253 - stm: INT_IFCMP(REF_OR(r,REF_NOT(r)),INT_CONSTANT) 7050 EMIT_INSTRUCTION, // 254 - czr: REF_AND(r,REF_MOVE(INT_CONSTANT)) 7051 EMIT_INSTRUCTION, // 255 - r: REF_AND(r,REF_MOVE(INT_CONSTANT)) 7052 EMIT_INSTRUCTION, // 256 - r: REF_OR(r,REF_MOVE(INT_CONSTANT)) 7053 EMIT_INSTRUCTION, // 257 - r: REF_OR(r,REF_MOVE(INT_CONSTANT)) 7054 EMIT_INSTRUCTION, // 258 - r: REF_XOR(r,REF_MOVE(INT_CONSTANT)) 7055 EMIT_INSTRUCTION, // 259 - r: REF_MOVE(ADDRESS_CONSTANT) 7056 EMIT_INSTRUCTION, // 260 - r: REF_MOVE(ADDRESS_CONSTANT) 7057 EMIT_INSTRUCTION, // 261 - r: REF_MOVE(ADDRESS_CONSTANT) 7058 EMIT_INSTRUCTION, // 262 - r: LONG_LOAD(r,INT_CONSTANT) 7059 EMIT_INSTRUCTION, // 263 - r: LONG_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 7060 EMIT_INSTRUCTION, // 264 - r: LONG_LOAD(r,r) 7061 EMIT_INSTRUCTION, // 265 - stm: LONG_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 7062 EMIT_INSTRUCTION, // 266 - stm: LONG_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 7063 EMIT_INSTRUCTION, // 267 - stm: LONG_STORE(r,OTHER_OPERAND(r,r)) 7064 EMIT_INSTRUCTION, // 268 - r: PREPARE_ADDR(r, r) 7065 EMIT_INSTRUCTION, // 269 - r: ATTEMPT_ADDR(r, r) 7066 }; 7067 7068 /** 7069 * Gets the action flags (such as EMIT_INSTRUCTION) associated with the given 7070 * rule number. 7071 * 7072 * @param ruleno the rule number we want the action flags for 7073 * @return the action byte for the rule 7074 */ 7075 @Pure 7076 public static byte action(int ruleno) { 7077 return action[unsortedErnMap[ruleno]]; 7078 } 7079 7080 /** 7081 * Decode the target non-terminal and minimal cost covering statement 7082 * into the rule that produces the non-terminal 7083 * 7084 * @param goalnt the non-terminal that we wish to produce. 7085 * @param stateNT the state encoding the non-terminals associated associated 7086 * with covering a tree with minimal cost (computed by at compile time 7087 * by jburg). 7088 * @return the rule number 7089 */ 7090 @Pure 7091 public static char decode(int goalnt, int stateNT) { 7092 return decode[goalnt][stateNT]; 7093 } 7094 7095 7096 /** 7097 * Emit code for rule number 14: 7098 * stm: RESOLVE 7099 * @param p BURS node to apply the rule to 7100 */ 7101 private void code14(AbstractBURS_TreeNode p) { 7102 EMIT(P(p)); 7103 } 7104 7105 /** 7106 * Emit code for rule number 15: 7107 * stm: IG_PATCH_POINT 7108 * @param p BURS node to apply the rule to 7109 */ 7110 private void code15(AbstractBURS_TreeNode p) { 7111 EMIT(InlineGuard.mutate(P(p), IG_PATCH_POINT, null, null, null, InlineGuard.getTarget(P(p)), InlineGuard.getBranchProfile(P(p)))); 7112 } 7113 7114 /** 7115 * Emit code for rule number 16: 7116 * stm: UNINT_BEGIN 7117 * @param p BURS node to apply the rule to 7118 */ 7119 private void code16(AbstractBURS_TreeNode p) { 7120 EMIT(P(p)); 7121 } 7122 7123 /** 7124 * Emit code for rule number 17: 7125 * stm: UNINT_END 7126 * @param p BURS node to apply the rule to 7127 */ 7128 private void code17(AbstractBURS_TreeNode p) { 7129 EMIT(P(p)); 7130 } 7131 7132 /** 7133 * Emit code for rule number 18: 7134 * stm: YIELDPOINT_PROLOGUE 7135 * @param p BURS node to apply the rule to 7136 */ 7137 private void code18(AbstractBURS_TreeNode p) { 7138 EMIT(P(p)); 7139 } 7140 7141 /** 7142 * Emit code for rule number 19: 7143 * stm: YIELDPOINT_EPILOGUE 7144 * @param p BURS node to apply the rule to 7145 */ 7146 private void code19(AbstractBURS_TreeNode p) { 7147 EMIT(P(p)); 7148 } 7149 7150 /** 7151 * Emit code for rule number 20: 7152 * stm: YIELDPOINT_BACKEDGE 7153 * @param p BURS node to apply the rule to 7154 */ 7155 private void code20(AbstractBURS_TreeNode p) { 7156 EMIT(P(p)); 7157 } 7158 7159 /** 7160 * Emit code for rule number 21: 7161 * stm: LOWTABLESWITCH(r) 7162 * @param p BURS node to apply the rule to 7163 */ 7164 private void code21(AbstractBURS_TreeNode p) { 7165 LOWTABLESWITCH(P(p)); 7166 } 7167 7168 /** 7169 * Emit code for rule number 23: 7170 * r: GUARD_MOVE 7171 * @param p BURS node to apply the rule to 7172 */ 7173 private void code23(AbstractBURS_TreeNode p) { 7174 EMIT(P(p)); 7175 } 7176 7177 /** 7178 * Emit code for rule number 24: 7179 * r: GUARD_COMBINE 7180 * @param p BURS node to apply the rule to 7181 */ 7182 private void code24(AbstractBURS_TreeNode p) { 7183 EMIT(P(p)); 7184 } 7185 7186 /** 7187 * Emit code for rule number 25: 7188 * stm: NULL_CHECK(r) 7189 * @param p BURS node to apply the rule to 7190 */ 7191 private void code25(AbstractBURS_TreeNode p) { 7192 EMIT(P(p)); 7193 } 7194 7195 /** 7196 * Emit code for rule number 26: 7197 * r: GET_CAUGHT_EXCEPTION 7198 * @param p BURS node to apply the rule to 7199 */ 7200 private void code26(AbstractBURS_TreeNode p) { 7201 GET_EXCEPTION_OBJECT(P(p)); 7202 } 7203 7204 /** 7205 * Emit code for rule number 27: 7206 * stm: SET_CAUGHT_EXCEPTION(r) 7207 * @param p BURS node to apply the rule to 7208 */ 7209 private void code27(AbstractBURS_TreeNode p) { 7210 SET_EXCEPTION_OBJECT(P(p)); 7211 } 7212 7213 /** 7214 * Emit code for rule number 28: 7215 * stm: FENCE 7216 * @param p BURS node to apply the rule to 7217 */ 7218 private void code28(AbstractBURS_TreeNode p) { 7219 EMIT(MIR_Empty.mutate(P(p), PPC_HWSYNC)); 7220 } 7221 7222 /** 7223 * Emit code for rule number 29: 7224 * stm: WRITE_FLOOR 7225 * @param p BURS node to apply the rule to 7226 */ 7227 private void code29(AbstractBURS_TreeNode p) { 7228 EMIT(MIR_Empty.mutate(P(p), PPC_SYNC)); 7229 } 7230 7231 /** 7232 * Emit code for rule number 30: 7233 * stm: READ_CEILING 7234 * @param p BURS node to apply the rule to 7235 */ 7236 private void code30(AbstractBURS_TreeNode p) { 7237 EMIT(MIR_Empty.mutate(P(p), PPC_ISYNC)); 7238 } 7239 7240 /** 7241 * Emit code for rule number 31: 7242 * stm: DCBF(r) 7243 * @param p BURS node to apply the rule to 7244 */ 7245 private void code31(AbstractBURS_TreeNode p) { 7246 EMIT(MIR_CacheOp.mutate(P(p), PPC_DCBF, I(0), R(CacheOp.getRef(P(p))))); 7247 } 7248 7249 /** 7250 * Emit code for rule number 32: 7251 * stm: DCBST(r) 7252 * @param p BURS node to apply the rule to 7253 */ 7254 private void code32(AbstractBURS_TreeNode p) { 7255 EMIT(MIR_CacheOp.mutate(P(p), PPC_DCBST, I(0), R(CacheOp.getRef(P(p))))); 7256 } 7257 7258 /** 7259 * Emit code for rule number 33: 7260 * stm: DCBT(r) 7261 * @param p BURS node to apply the rule to 7262 */ 7263 private void code33(AbstractBURS_TreeNode p) { 7264 EMIT(MIR_CacheOp.mutate(P(p), PPC_DCBT, I(0), R(CacheOp.getRef(P(p))))); 7265 } 7266 7267 /** 7268 * Emit code for rule number 34: 7269 * stm: DCBTST(r) 7270 * @param p BURS node to apply the rule to 7271 */ 7272 private void code34(AbstractBURS_TreeNode p) { 7273 EMIT(MIR_CacheOp.mutate(P(p), PPC_DCBTST, I(0), R(CacheOp.getRef(P(p))))); 7274 } 7275 7276 /** 7277 * Emit code for rule number 35: 7278 * stm: DCBZ(r) 7279 * @param p BURS node to apply the rule to 7280 */ 7281 private void code35(AbstractBURS_TreeNode p) { 7282 EMIT(MIR_CacheOp.mutate(P(p), PPC_DCBZ, I(0), R(CacheOp.getRef(P(p))))); 7283 } 7284 7285 /** 7286 * Emit code for rule number 36: 7287 * stm: DCBZL(r) 7288 * @param p BURS node to apply the rule to 7289 */ 7290 private void code36(AbstractBURS_TreeNode p) { 7291 EMIT(MIR_CacheOp.mutate(P(p), PPC_DCBZL, I(0), R(CacheOp.getRef(P(p))))); 7292 } 7293 7294 /** 7295 * Emit code for rule number 37: 7296 * stm: ICBI(r) 7297 * @param p BURS node to apply the rule to 7298 */ 7299 private void code37(AbstractBURS_TreeNode p) { 7300 EMIT(MIR_CacheOp.mutate(P(p), PPC_ICBI, I(0), R(CacheOp.getRef(P(p))))); 7301 } 7302 7303 /** 7304 * Emit code for rule number 38: 7305 * stm: TRAP 7306 * @param p BURS node to apply the rule to 7307 */ 7308 private void code38(AbstractBURS_TreeNode p) { 7309 TRAP(P(p)); 7310 } 7311 7312 /** 7313 * Emit code for rule number 39: 7314 * stm: TRAP_IF(r,r) 7315 * @param p BURS node to apply the rule to 7316 */ 7317 private void code39(AbstractBURS_TreeNode p) { 7318 TRAP_IF(P(p)); 7319 } 7320 7321 /** 7322 * Emit code for rule number 40: 7323 * stm: TRAP_IF(r,INT_CONSTANT) 7324 * @param p BURS node to apply the rule to 7325 */ 7326 private void code40(AbstractBURS_TreeNode p) { 7327 TRAP_IF_IMM(P(p), false); 7328 } 7329 7330 /** 7331 * Emit code for rule number 41: 7332 * stm: TRAP_IF(r,LONG_CONSTANT) 7333 * @param p BURS node to apply the rule to 7334 */ 7335 private void code41(AbstractBURS_TreeNode p) { 7336 TRAP_IF_IMM(P(p), true); 7337 } 7338 7339 /** 7340 * Emit code for rule number 42: 7341 * r: BOOLEAN_NOT(r) 7342 * @param p BURS node to apply the rule to 7343 */ 7344 private void code42(AbstractBURS_TreeNode p) { 7345 EMIT(MIR_Binary.mutate(P(p), PPC_XORI, Unary.getResult(P(p)), R(Unary.getVal(P(p))), IC(1))); 7346 } 7347 7348 /** 7349 * Emit code for rule number 43: 7350 * r: BOOLEAN_CMP_INT(r,INT_CONSTANT) 7351 * @param p BURS node to apply the rule to 7352 */ 7353 private void code43(AbstractBURS_TreeNode p) { 7354 BOOLEAN_CMP_INT_IMM(BooleanCmp.getResult(P(p)), BooleanCmp.getCond(P(p)), R(BooleanCmp.getVal1(P(p))), IC(BooleanCmp.getVal2(P(p)))); 7355 } 7356 7357 /** 7358 * Emit code for rule number 44: 7359 * r: BOOLEAN_CMP_INT(r,r) 7360 * @param p BURS node to apply the rule to 7361 */ 7362 private void code44(AbstractBURS_TreeNode p) { 7363 BOOLEAN_CMP_INT(BooleanCmp.getResult(P(p)), BooleanCmp.getCond(P(p)), R(BooleanCmp.getVal1(P(p))), R(BooleanCmp.getVal2(P(p)))); 7364 } 7365 7366 /** 7367 * Emit code for rule number 45: 7368 * boolcmp: BOOLEAN_CMP_INT(r,INT_CONSTANT) 7369 * @param p BURS node to apply the rule to 7370 */ 7371 private void code45(AbstractBURS_TreeNode p) { 7372 PUSH_BOOLCMP(BooleanCmp.getCond(P(p)), BooleanCmp.getVal1(P(p)), BooleanCmp.getVal2(P(p)), false); 7373 } 7374 7375 /** 7376 * Emit code for rule number 46: 7377 * boolcmp: BOOLEAN_CMP_INT(r,r) 7378 * @param p BURS node to apply the rule to 7379 */ 7380 private void code46(AbstractBURS_TreeNode p) { 7381 PUSH_BOOLCMP(BooleanCmp.getCond(P(p)), BooleanCmp.getVal1(P(p)), BooleanCmp.getVal2(P(p)), false); 7382 } 7383 7384 /** 7385 * Emit code for rule number 47: 7386 * r: BOOLEAN_CMP_ADDR(r,INT_CONSTANT) 7387 * @param p BURS node to apply the rule to 7388 */ 7389 private void code47(AbstractBURS_TreeNode p) { 7390 BOOLEAN_CMP_ADDR_IMM(BooleanCmp.getResult(P(p)), BooleanCmp.getCond(P(p)), R(BooleanCmp.getVal1(P(p))), IC(BooleanCmp.getVal2(P(p)))); 7391 } 7392 7393 /** 7394 * Emit code for rule number 48: 7395 * r: BOOLEAN_CMP_ADDR(r,r) 7396 * @param p BURS node to apply the rule to 7397 */ 7398 private void code48(AbstractBURS_TreeNode p) { 7399 BOOLEAN_CMP_ADDR(BooleanCmp.getResult(P(p)), BooleanCmp.getCond(P(p)), R(BooleanCmp.getVal1(P(p))), R(BooleanCmp.getVal2(P(p)))); 7400 } 7401 7402 /** 7403 * Emit code for rule number 49: 7404 * boolcmp: BOOLEAN_CMP_ADDR(r,INT_CONSTANT) 7405 * @param p BURS node to apply the rule to 7406 */ 7407 private void code49(AbstractBURS_TreeNode p) { 7408 PUSH_BOOLCMP(BooleanCmp.getCond(P(p)), BooleanCmp.getVal1(P(p)), BooleanCmp.getVal2(P(p)), true); 7409 } 7410 7411 /** 7412 * Emit code for rule number 50: 7413 * boolcmp: BOOLEAN_CMP_ADDR(r,r) 7414 * @param p BURS node to apply the rule to 7415 */ 7416 private void code50(AbstractBURS_TreeNode p) { 7417 PUSH_BOOLCMP(BooleanCmp.getCond(P(p)), BooleanCmp.getVal1(P(p)), BooleanCmp.getVal2(P(p)), true); 7418 } 7419 7420 /** 7421 * Emit code for rule number 52: 7422 * boolcmp: BOOLEAN_CMP_INT(boolcmp, INT_CONSTANT) 7423 * @param p BURS node to apply the rule to 7424 */ 7425 private void code52(AbstractBURS_TreeNode p) { 7426 FLIP_BOOLCMP(); // invert condition 7427 } 7428 7429 /** 7430 * Emit code for rule number 54: 7431 * boolcmp: BOOLEAN_CMP_INT(boolcmp, INT_CONSTANT) 7432 * @param p BURS node to apply the rule to 7433 */ 7434 private void code54(AbstractBURS_TreeNode p) { 7435 FLIP_BOOLCMP(); // invert condition 7436 } 7437 7438 /** 7439 * Emit code for rule number 55: 7440 * r: BOOLEAN_CMP_INT(boolcmp, INT_CONSTANT) 7441 * @param p BURS node to apply the rule to 7442 */ 7443 private void code55(AbstractBURS_TreeNode p) { 7444 EMIT_PUSHED_BOOLCMP(BooleanCmp.getResult(P(p))); 7445 } 7446 7447 /** 7448 * Emit code for rule number 56: 7449 * r: BOOLEAN_CMP_INT(boolcmp, INT_CONSTANT) 7450 * @param p BURS node to apply the rule to 7451 */ 7452 private void code56(AbstractBURS_TreeNode p) { 7453 FLIP_BOOLCMP(); EMIT_PUSHED_BOOLCMP(BooleanCmp.getResult(P(p))); 7454 } 7455 7456 /** 7457 * Emit code for rule number 57: 7458 * r: BOOLEAN_CMP_INT(boolcmp, INT_CONSTANT) 7459 * @param p BURS node to apply the rule to 7460 */ 7461 private void code57(AbstractBURS_TreeNode p) { 7462 EMIT_PUSHED_BOOLCMP(BooleanCmp.getResult(P(p))); 7463 } 7464 7465 /** 7466 * Emit code for rule number 58: 7467 * r: BOOLEAN_CMP_INT(boolcmp, INT_CONSTANT) 7468 * @param p BURS node to apply the rule to 7469 */ 7470 private void code58(AbstractBURS_TreeNode p) { 7471 FLIP_BOOLCMP(); EMIT_PUSHED_BOOLCMP(BooleanCmp.getResult(P(p))); 7472 } 7473 7474 /** 7475 * Emit code for rule number 59: 7476 * r: REF_ADD(r,INT_CONSTANT) 7477 * @param p BURS node to apply the rule to 7478 */ 7479 private void code59(AbstractBURS_TreeNode p) { 7480 EMIT(MIR_Binary.mutate(P(p), PPC_ADDI, Binary.getResult(P(p)), 7481 R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7482 } 7483 7484 /** 7485 * Emit code for rule number 60: 7486 * r: REF_ADD(r,r) 7487 * @param p BURS node to apply the rule to 7488 */ 7489 private void code60(AbstractBURS_TreeNode p) { 7490 EMIT(MIR_Binary.mutate(P(p), PPC_ADD, Binary.getResult(P(p)), 7491 R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7492 } 7493 7494 /** 7495 * Emit code for rule number 61: 7496 * r: REF_ADD(r,REF_MOVE(INT_CONSTANT)) 7497 * @param p BURS node to apply the rule to 7498 */ 7499 private void code61(AbstractBURS_TreeNode p) { 7500 { 7501 int val = IV(Move.getVal(PR(p))); 7502 EMIT(MIR_Binary.create(PPC_ADDI, Move.getResult(PR(p)), 7503 R(Binary.getVal1(P(p))), CAL16(val))); 7504 EMIT(MIR_Binary.mutate(P(p), PPC_ADDIS, Binary.getResult(P(p)), 7505 Move.getResult(PR(p)).copyRO(), CAU16(val))); 7506} 7507 } 7508 7509 /** 7510 * Emit code for rule number 62: 7511 * r: REF_ADD(r,REF_MOVE(INT_CONSTANT)) 7512 * @param p BURS node to apply the rule to 7513 */ 7514 private void code62(AbstractBURS_TreeNode p) { 7515 EMIT(MIR_Binary.mutate(P(p), PPC_ADDIS, Binary.getResult(P(p)), 7516 R(Binary.getVal1(P(p))), CAU16(IV(Move.getVal(PR(p)))))); 7517 } 7518 7519 /** 7520 * Emit code for rule number 63: 7521 * r: REF_SUB(r,r) 7522 * @param p BURS node to apply the rule to 7523 */ 7524 private void code63(AbstractBURS_TreeNode p) { 7525 EMIT(MIR_Binary.mutate(P(p), PPC_SUBF, Binary.getResult(P(p)), 7526 R(Binary.getVal2(P(p))), Binary.getVal1(P(p)))); 7527 } 7528 7529 /** 7530 * Emit code for rule number 64: 7531 * r: REF_SUB(INT_CONSTANT,r) 7532 * @param p BURS node to apply the rule to 7533 */ 7534 private void code64(AbstractBURS_TreeNode p) { 7535 EMIT(MIR_Binary.mutate(P(p), PPC_SUBFIC, Binary.getResult(P(p)), 7536 R(Binary.getVal2(P(p))), Binary.getVal1(P(p)))); 7537 } 7538 7539 /** 7540 * Emit code for rule number 65: 7541 * r: INT_MUL(r,INT_CONSTANT) 7542 * @param p BURS node to apply the rule to 7543 */ 7544 private void code65(AbstractBURS_TreeNode p) { 7545 EMIT(MIR_Binary.mutate(P(p), PPC_MULLI, Binary.getResult(P(p)), 7546 R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7547 } 7548 7549 /** 7550 * Emit code for rule number 66: 7551 * r: INT_MUL(r,r) 7552 * @param p BURS node to apply the rule to 7553 */ 7554 private void code66(AbstractBURS_TreeNode p) { 7555 EMIT(MIR_Binary.mutate(P(p), PPC_MULLW, Binary.getResult(P(p)), 7556 R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7557 } 7558 7559 /** 7560 * Emit code for rule number 67: 7561 * r: INT_DIV(r,r) 7562 * @param p BURS node to apply the rule to 7563 */ 7564 private void code67(AbstractBURS_TreeNode p) { 7565 EMIT(MIR_Binary.mutate(P(p), PPC_DIVW, GuardedBinary.getResult(P(p)), 7566 R(GuardedBinary.getVal1(P(p))), GuardedBinary.getVal2(P(p)))); 7567 } 7568 7569 /** 7570 * Emit code for rule number 68: 7571 * r: INT_DIV(r,REF_MOVE(INT_CONSTANT)) 7572 * @param p BURS node to apply the rule to 7573 */ 7574 private void code68(AbstractBURS_TreeNode p) { 7575 INT_DIV_IMM(P(p), GuardedBinary.getResult(P(p)), R(GuardedBinary.getVal1(P(p))), 7576 Move.getResult(PR(p)), IC(Move.getVal(PR(p)))); 7577 } 7578 7579 /** 7580 * Emit code for rule number 69: 7581 * r: INT_REM(r,r) 7582 * @param p BURS node to apply the rule to 7583 */ 7584 private void code69(AbstractBURS_TreeNode p) { 7585 INT_REM(P(p), GuardedBinary.getResult(P(p)), R(GuardedBinary.getVal1(P(p))), R(GuardedBinary.getVal2(P(p)))); 7586 } 7587 7588 /** 7589 * Emit code for rule number 70: 7590 * r: INT_REM(r,REF_MOVE(INT_CONSTANT)) 7591 * @param p BURS node to apply the rule to 7592 */ 7593 private void code70(AbstractBURS_TreeNode p) { 7594 INT_REM_IMM(P(p), GuardedBinary.getResult(P(p)), R(GuardedBinary.getVal1(P(p))), 7595 Move.getResult(PR(p)), IC(Move.getVal(PR(p)))); 7596 } 7597 7598 /** 7599 * Emit code for rule number 71: 7600 * r: REF_NEG(r) 7601 * @param p BURS node to apply the rule to 7602 */ 7603 private void code71(AbstractBURS_TreeNode p) { 7604 EMIT(MIR_Unary.mutate(P(p), PPC_NEG, Unary.getResult(P(p)), Unary.getVal(P(p)))); 7605 } 7606 7607 /** 7608 * Emit code for rule number 72: 7609 * rz: INT_SHL(r,INT_CONSTANT) 7610 * @param p BURS node to apply the rule to 7611 */ 7612 private void code72(AbstractBURS_TreeNode p) { 7613 EMIT(MIR_Binary.mutate(P(p), PPC_SLWI, Binary.getResult(P(p)), 7614 R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7615 } 7616 7617 /** 7618 * Emit code for rule number 73: 7619 * rz: INT_SHL(r,r) 7620 * @param p BURS node to apply the rule to 7621 */ 7622 private void code73(AbstractBURS_TreeNode p) { 7623 EMIT(MIR_Binary.mutate(P(p), PPC_SLW, Binary.getResult(P(p)), 7624 R(Binary.getVal1(P(p))), R(Binary.getVal2(P(p))))); 7625 } 7626 7627 /** 7628 * Emit code for rule number 74: 7629 * rz: INT_SHL(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 7630 * @param p BURS node to apply the rule to 7631 */ 7632 private void code74(AbstractBURS_TreeNode p) { 7633 USHR_SHL(P(p), Binary.getResult(P(p)), R(Binary.getVal1(PL(p))), IC(Binary.getVal2(PL(p))), 7634 IC(Binary.getVal2(P(p)))); 7635 } 7636 7637 /** 7638 * Emit code for rule number 75: 7639 * rs: INT_SHR(r,INT_CONSTANT) 7640 * @param p BURS node to apply the rule to 7641 */ 7642 private void code75(AbstractBURS_TreeNode p) { 7643 EMIT(MIR_Binary.mutate(P(p), PPC_SRAWI, Binary.getResult(P(p)), R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7644 } 7645 7646 /** 7647 * Emit code for rule number 76: 7648 * rs: INT_SHR(r,r) 7649 * @param p BURS node to apply the rule to 7650 */ 7651 private void code76(AbstractBURS_TreeNode p) { 7652 EMIT(MIR_Binary.mutate(P(p), PPC_SRAW, Binary.getResult(P(p)), 7653 R(Binary.getVal1(P(p))), R(Binary.getVal2(P(p))))); 7654 } 7655 7656 /** 7657 * Emit code for rule number 77: 7658 * rp: INT_SHR(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 7659 * @param p BURS node to apply the rule to 7660 */ 7661 private void code77(AbstractBURS_TreeNode p) { 7662 AND_USHR(P(p), Binary.getResult(P(p)), 7663 R(Binary.getVal1(PL(p))), IC(Binary.getVal2(PL(p))), 7664 IC(Binary.getVal2(P(p)))); 7665 } 7666 7667 /** 7668 * Emit code for rule number 78: 7669 * rp: INT_USHR(r,INT_CONSTANT) 7670 * @param p BURS node to apply the rule to 7671 */ 7672 private void code78(AbstractBURS_TreeNode p) { 7673 EMIT(MIR_Binary.mutate(P(p), PPC_SRWI, Binary.getResult(P(p)), 7674 R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7675 } 7676 7677 /** 7678 * Emit code for rule number 79: 7679 * rz: INT_USHR(r,r) 7680 * @param p BURS node to apply the rule to 7681 */ 7682 private void code79(AbstractBURS_TreeNode p) { 7683 EMIT(MIR_Binary.mutate(P(p), PPC_SRW, Binary.getResult(P(p)), 7684 R(Binary.getVal1(P(p))), R(Binary.getVal2(P(p))))); 7685 } 7686 7687 /** 7688 * Emit code for rule number 80: 7689 * rp: INT_USHR(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 7690 * @param p BURS node to apply the rule to 7691 */ 7692 private void code80(AbstractBURS_TreeNode p) { 7693 AND_USHR(P(p), Binary.getResult(P(p)), R(Binary.getVal1(PL(p))), 7694 IC(Binary.getVal2(PL(p))), IC(Binary.getVal2(P(p)))); 7695 } 7696 7697 /** 7698 * Emit code for rule number 81: 7699 * rp: INT_USHR(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 7700 * @param p BURS node to apply the rule to 7701 */ 7702 private void code81(AbstractBURS_TreeNode p) { 7703 AND_USHR(P(p), Binary.getResult(P(p)), R(Binary.getVal1(PL(p))), 7704 IC(Move.getVal(PLR(p))), IC(Binary.getVal2(P(p)))); 7705 } 7706 7707 /** 7708 * Emit code for rule number 82: 7709 * rp: INT_USHR(INT_SHL(r,INT_CONSTANT),INT_CONSTANT) 7710 * @param p BURS node to apply the rule to 7711 */ 7712 private void code82(AbstractBURS_TreeNode p) { 7713 SHL_USHR(P(p), Binary.getResult(P(p)), R(Binary.getVal1(PL(p))), 7714 IC(Binary.getVal2(PL(p))), IC(Binary.getVal2(P(p)))); 7715 } 7716 7717 /** 7718 * Emit code for rule number 83: 7719 * r: REF_AND(r,r) 7720 * @param p BURS node to apply the rule to 7721 */ 7722 private void code83(AbstractBURS_TreeNode p) { 7723 EMIT(MIR_Binary.mutate(P(p), PPC_AND, Binary.getResult(P(p)), R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7724 } 7725 7726 /** 7727 * Emit code for rule number 84: 7728 * czr: REF_AND(r,INT_CONSTANT) 7729 * @param p BURS node to apply the rule to 7730 */ 7731 private void code84(AbstractBURS_TreeNode p) { 7732 EMIT(MIR_Binary.mutate(P(p), PPC_ANDIr, Binary.getResult(P(p)), R(Binary.getVal1(P(p))), IC(Binary.getVal2(P(p))))); 7733 } 7734 7735 /** 7736 * Emit code for rule number 85: 7737 * rp: REF_AND(r,INT_CONSTANT) 7738 * @param p BURS node to apply the rule to 7739 */ 7740 private void code85(AbstractBURS_TreeNode p) { 7741 { 7742 int mask = IV(Binary.getVal2(P(p))); 7743 EMIT(MIR_RotateAndMask.create(PPC_RLWINM, Binary.getResult(P(p)), 7744 R(Binary.getVal1(P(p))), IC(0), 7745 IC(MaskBegin(mask)), IC(MaskEnd(mask)))); 7746} 7747 } 7748 7749 /** 7750 * Emit code for rule number 86: 7751 * r: REF_AND(REF_NOT(r),REF_NOT(r)) 7752 * @param p BURS node to apply the rule to 7753 */ 7754 private void code86(AbstractBURS_TreeNode p) { 7755 EMIT(MIR_Binary.mutate(P(p), PPC_NOR, Binary.getResult(P(p)), 7756 R(Unary.getVal(PL(p))), Unary.getVal(PR(p)))); 7757 } 7758 7759 /** 7760 * Emit code for rule number 87: 7761 * r: REF_AND(r,REF_NOT(r)) 7762 * @param p BURS node to apply the rule to 7763 */ 7764 private void code87(AbstractBURS_TreeNode p) { 7765 EMIT(MIR_Binary.mutate(P(p), PPC_ANDC, Binary.getResult(P(p)), 7766 R(Binary.getVal1(P(p))), Unary.getVal(PR(p)))); 7767 } 7768 7769 /** 7770 * Emit code for rule number 88: 7771 * rp: REF_AND(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 7772 * @param p BURS node to apply the rule to 7773 */ 7774 private void code88(AbstractBURS_TreeNode p) { 7775 USHR_AND(P(p), Binary.getResult(P(p)), R(Binary.getVal1(PL(p))), 7776 IC(Binary.getVal2(P(p))), IC(Binary.getVal2(PL(p)))); 7777 } 7778 7779 /** 7780 * Emit code for rule number 89: 7781 * rp: REF_AND(INT_USHR(r,INT_CONSTANT),REF_MOVE(INT_CONSTANT)) 7782 * @param p BURS node to apply the rule to 7783 */ 7784 private void code89(AbstractBURS_TreeNode p) { 7785 USHR_AND(P(p), Binary.getResult(P(p)), R(Binary.getVal1(PL(p))), 7786 IC(Move.getVal(PR(p))), IC(Binary.getVal2(PL(p)))); 7787 } 7788 7789 /** 7790 * Emit code for rule number 90: 7791 * r: REF_OR(r,r) 7792 * @param p BURS node to apply the rule to 7793 */ 7794 private void code90(AbstractBURS_TreeNode p) { 7795 EMIT(MIR_Binary.mutate(P(p), PPC_OR, Binary.getResult(P(p)), R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7796 } 7797 7798 /** 7799 * Emit code for rule number 91: 7800 * r: REF_OR(r,INT_CONSTANT) 7801 * @param p BURS node to apply the rule to 7802 */ 7803 private void code91(AbstractBURS_TreeNode p) { 7804 EMIT(MIR_Binary.mutate(P(p), PPC_ORI, Binary.getResult(P(p)), R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7805 } 7806 7807 /** 7808 * Emit code for rule number 92: 7809 * r: REF_OR(REF_NOT(r),REF_NOT(r)) 7810 * @param p BURS node to apply the rule to 7811 */ 7812 private void code92(AbstractBURS_TreeNode p) { 7813 EMIT(MIR_Binary.mutate(P(p), PPC_NAND, Binary.getResult(P(p)), R(Unary.getVal(PL(p))), Unary.getVal(PR(p)))); 7814 } 7815 7816 /** 7817 * Emit code for rule number 93: 7818 * r: REF_OR(r,REF_NOT(r)) 7819 * @param p BURS node to apply the rule to 7820 */ 7821 private void code93(AbstractBURS_TreeNode p) { 7822 EMIT(MIR_Binary.mutate(P(p), PPC_ORC, Binary.getResult(P(p)), R(Binary.getVal1(P(p))), Unary.getVal(PR(p)))); 7823 } 7824 7825 /** 7826 * Emit code for rule number 94: 7827 * r: REF_XOR(r,r) 7828 * @param p BURS node to apply the rule to 7829 */ 7830 private void code94(AbstractBURS_TreeNode p) { 7831 EMIT(MIR_Binary.mutate(P(p), PPC_XOR, Binary.getResult(P(p)), R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7832 } 7833 7834 /** 7835 * Emit code for rule number 95: 7836 * r: REF_XOR(r,INT_CONSTANT) 7837 * @param p BURS node to apply the rule to 7838 */ 7839 private void code95(AbstractBURS_TreeNode p) { 7840 EMIT(MIR_Binary.mutate(P(p), PPC_XORI, Binary.getResult(P(p)), R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7841 } 7842 7843 /** 7844 * Emit code for rule number 96: 7845 * r: REF_NOT(r) 7846 * @param p BURS node to apply the rule to 7847 */ 7848 private void code96(AbstractBURS_TreeNode p) { 7849 EMIT(MIR_Binary.mutate(P(p), PPC_NOR, Unary.getResult(P(p)), R(Unary.getVal(P(p))), Unary.getVal(P(p)))); 7850 } 7851 7852 /** 7853 * Emit code for rule number 97: 7854 * r: REF_NOT(REF_OR(r,r)) 7855 * @param p BURS node to apply the rule to 7856 */ 7857 private void code97(AbstractBURS_TreeNode p) { 7858 EMIT(MIR_Binary.mutate(P(p), PPC_NOR, Unary.getResult(P(p)), R(Binary.getVal1(PL(p))), Binary.getVal2(PL(p)))); 7859 } 7860 7861 /** 7862 * Emit code for rule number 98: 7863 * r: REF_NOT(REF_AND(r,r)) 7864 * @param p BURS node to apply the rule to 7865 */ 7866 private void code98(AbstractBURS_TreeNode p) { 7867 EMIT(MIR_Binary.mutate(P(p), PPC_NAND, Unary.getResult(P(p)), R(Binary.getVal1(PL(p))), Binary.getVal2(PL(p)))); 7868 } 7869 7870 /** 7871 * Emit code for rule number 99: 7872 * r: REF_NOT(REF_XOR(r,r)) 7873 * @param p BURS node to apply the rule to 7874 */ 7875 private void code99(AbstractBURS_TreeNode p) { 7876 EMIT(MIR_Binary.mutate(P(p), PPC_EQV, Unary.getResult(P(p)), R(Binary.getVal1(PL(p))), Binary.getVal2(PL(p)))); 7877 } 7878 7879 /** 7880 * Emit code for rule number 100: 7881 * r: FLOAT_ADD(r,r) 7882 * @param p BURS node to apply the rule to 7883 */ 7884 private void code100(AbstractBURS_TreeNode p) { 7885 EMIT(MIR_Binary.mutate(P(p), PPC_FADDS, Binary.getResult(P(p)), 7886 R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7887 } 7888 7889 /** 7890 * Emit code for rule number 101: 7891 * r: DOUBLE_ADD(r,r) 7892 * @param p BURS node to apply the rule to 7893 */ 7894 private void code101(AbstractBURS_TreeNode p) { 7895 EMIT(MIR_Binary.mutate(P(p), PPC_FADD, Binary.getResult(P(p)), 7896 R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7897 } 7898 7899 /** 7900 * Emit code for rule number 102: 7901 * r: FLOAT_MUL(r,r) 7902 * @param p BURS node to apply the rule to 7903 */ 7904 private void code102(AbstractBURS_TreeNode p) { 7905 EMIT(MIR_Binary.mutate(P(p), PPC_FMULS, Binary.getResult(P(p)), 7906 R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7907 } 7908 7909 /** 7910 * Emit code for rule number 103: 7911 * r: DOUBLE_MUL(r,r) 7912 * @param p BURS node to apply the rule to 7913 */ 7914 private void code103(AbstractBURS_TreeNode p) { 7915 EMIT(MIR_Binary.mutate(P(p), PPC_FMUL, Binary.getResult(P(p)), 7916 R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7917 } 7918 7919 /** 7920 * Emit code for rule number 104: 7921 * r: FLOAT_SUB(r,r) 7922 * @param p BURS node to apply the rule to 7923 */ 7924 private void code104(AbstractBURS_TreeNode p) { 7925 EMIT(MIR_Binary.mutate(P(p), PPC_FSUBS, Binary.getResult(P(p)), 7926 R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7927 } 7928 7929 /** 7930 * Emit code for rule number 105: 7931 * r: DOUBLE_SUB(r,r) 7932 * @param p BURS node to apply the rule to 7933 */ 7934 private void code105(AbstractBURS_TreeNode p) { 7935 EMIT(MIR_Binary.mutate(P(p), PPC_FSUB, Binary.getResult(P(p)), 7936 R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7937 } 7938 7939 /** 7940 * Emit code for rule number 106: 7941 * r: FLOAT_DIV(r,r) 7942 * @param p BURS node to apply the rule to 7943 */ 7944 private void code106(AbstractBURS_TreeNode p) { 7945 EMIT(MIR_Binary.mutate(P(p), PPC_FDIVS, Binary.getResult(P(p)), 7946 R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7947 } 7948 7949 /** 7950 * Emit code for rule number 107: 7951 * r: DOUBLE_DIV(r,r) 7952 * @param p BURS node to apply the rule to 7953 */ 7954 private void code107(AbstractBURS_TreeNode p) { 7955 EMIT(MIR_Binary.mutate(P(p), PPC_FDIV, Binary.getResult(P(p)), 7956 R(Binary.getVal1(P(p))), Binary.getVal2(P(p)))); 7957 } 7958 7959 /** 7960 * Emit code for rule number 108: 7961 * r: FLOAT_NEG(r) 7962 * @param p BURS node to apply the rule to 7963 */ 7964 private void code108(AbstractBURS_TreeNode p) { 7965 EMIT(MIR_Unary.mutate(P(p), PPC_FNEG, Unary.getResult(P(p)), Unary.getVal(P(p)))); 7966 } 7967 7968 /** 7969 * Emit code for rule number 109: 7970 * r: DOUBLE_NEG(r) 7971 * @param p BURS node to apply the rule to 7972 */ 7973 private void code109(AbstractBURS_TreeNode p) { 7974 EMIT(MIR_Unary.mutate(P(p), PPC_FNEG, Unary.getResult(P(p)), Unary.getVal(P(p)))); 7975 } 7976 7977 /** 7978 * Emit code for rule number 110: 7979 * r: FLOAT_SQRT(r) 7980 * @param p BURS node to apply the rule to 7981 */ 7982 private void code110(AbstractBURS_TreeNode p) { 7983 EMIT(MIR_Unary.mutate(P(p), PPC_FSQRTS, Unary.getResult(P(p)), Unary.getVal(P(p)))); 7984 } 7985 7986 /** 7987 * Emit code for rule number 111: 7988 * r: DOUBLE_SQRT(r) 7989 * @param p BURS node to apply the rule to 7990 */ 7991 private void code111(AbstractBURS_TreeNode p) { 7992 EMIT(MIR_Unary.mutate(P(p), PPC_FSQRT, Unary.getResult(P(p)), Unary.getVal(P(p)))); 7993 } 7994 7995 /** 7996 * Emit code for rule number 112: 7997 * r: FLOAT_ADD(FLOAT_MUL(r, r), r) 7998 * @param p BURS node to apply the rule to 7999 */ 8000 private void code112(AbstractBURS_TreeNode p) { 8001 EMIT(MIR_Ternary.mutate(P(p), PPC_FMADDS, Binary.getResult(P(p)), 8002 R(Binary.getVal1(PL(p))), R(Binary.getVal2(PL(p))), 8003 R(Binary.getVal2(P(p))))); 8004 } 8005 8006 /** 8007 * Emit code for rule number 113: 8008 * r: DOUBLE_ADD(DOUBLE_MUL(r, r), r) 8009 * @param p BURS node to apply the rule to 8010 */ 8011 private void code113(AbstractBURS_TreeNode p) { 8012 EMIT(MIR_Ternary.mutate(P(p), PPC_FMADD, Binary.getResult(P(p)), 8013 R(Binary.getVal1(PL(p))), R(Binary.getVal2(PL(p))), 8014 R(Binary.getVal2(P(p))))); 8015 } 8016 8017 /** 8018 * Emit code for rule number 114: 8019 * r: FLOAT_ADD(r, FLOAT_MUL(r,r)) 8020 * @param p BURS node to apply the rule to 8021 */ 8022 private void code114(AbstractBURS_TreeNode p) { 8023 EMIT(MIR_Ternary.mutate(P(p), PPC_FMADDS, Binary.getResult(P(p)), 8024 R(Binary.getVal1(PR(p))), R(Binary.getVal2(PR(p))), 8025 R(Binary.getVal1(P(p))))); 8026 } 8027 8028 /** 8029 * Emit code for rule number 115: 8030 * r: DOUBLE_ADD(r, DOUBLE_MUL(r,r)) 8031 * @param p BURS node to apply the rule to 8032 */ 8033 private void code115(AbstractBURS_TreeNode p) { 8034 EMIT(MIR_Ternary.mutate(P(p), PPC_FMADD, Binary.getResult(P(p)), 8035 R(Binary.getVal1(PR(p))), R(Binary.getVal2(PR(p))), 8036 R(Binary.getVal1(P(p))))); 8037 } 8038 8039 /** 8040 * Emit code for rule number 116: 8041 * r: FLOAT_SUB(FLOAT_MUL(r, r), r) 8042 * @param p BURS node to apply the rule to 8043 */ 8044 private void code116(AbstractBURS_TreeNode p) { 8045 EMIT(MIR_Ternary.mutate(P(p), PPC_FMSUBS, Binary.getResult(P(p)), 8046 R(Binary.getVal1(PL(p))), R(Binary.getVal2(PL(p))), 8047 R(Binary.getVal2(P(p))))); 8048 } 8049 8050 /** 8051 * Emit code for rule number 117: 8052 * r: DOUBLE_SUB(DOUBLE_MUL(r, r), r) 8053 * @param p BURS node to apply the rule to 8054 */ 8055 private void code117(AbstractBURS_TreeNode p) { 8056 EMIT(MIR_Ternary.mutate(P(p), PPC_FMSUB, Binary.getResult(P(p)), 8057 R(Binary.getVal1(PL(p))), R(Binary.getVal2(PL(p))), 8058 R(Binary.getVal2(P(p))))); 8059 } 8060 8061 /** 8062 * Emit code for rule number 118: 8063 * r: FLOAT_NEG(FLOAT_ADD(FLOAT_MUL(r, r), r)) 8064 * @param p BURS node to apply the rule to 8065 */ 8066 private void code118(AbstractBURS_TreeNode p) { 8067 EMIT(MIR_Ternary.mutate(P(p), PPC_FNMADDS, Unary.getResult(P(p)), 8068 R(Binary.getVal1(PLL(p))), R(Binary.getVal2(PLL(p))), 8069 R(Binary.getVal2(PL(p))))); 8070 } 8071 8072 /** 8073 * Emit code for rule number 119: 8074 * r: DOUBLE_NEG(DOUBLE_ADD(DOUBLE_MUL(r, r), r)) 8075 * @param p BURS node to apply the rule to 8076 */ 8077 private void code119(AbstractBURS_TreeNode p) { 8078 EMIT(MIR_Ternary.mutate(P(p), PPC_FNMADD, Unary.getResult(P(p)), 8079 R(Binary.getVal1(PLL(p))), R(Binary.getVal2(PLL(p))), 8080 R(Binary.getVal2(PL(p))))); 8081 } 8082 8083 /** 8084 * Emit code for rule number 120: 8085 * r: FLOAT_NEG(FLOAT_ADD(r, FLOAT_MUL(r,r))) 8086 * @param p BURS node to apply the rule to 8087 */ 8088 private void code120(AbstractBURS_TreeNode p) { 8089 EMIT(MIR_Ternary.mutate(P(p), PPC_FNMADDS, Unary.getResult(P(p)), 8090 R(Binary.getVal1(PLR(p))), R(Binary.getVal2(PLR(p))), 8091 R(Binary.getVal1(PL(p))))); 8092 } 8093 8094 /** 8095 * Emit code for rule number 121: 8096 * r: DOUBLE_NEG(DOUBLE_ADD(r, DOUBLE_MUL(r,r))) 8097 * @param p BURS node to apply the rule to 8098 */ 8099 private void code121(AbstractBURS_TreeNode p) { 8100 EMIT(MIR_Ternary.mutate(P(p), PPC_FNMADD, Unary.getResult(P(p)), 8101 R(Binary.getVal1(PLR(p))), R(Binary.getVal2(PLR(p))), 8102 R(Binary.getVal1(PL(p))))); 8103 } 8104 8105 /** 8106 * Emit code for rule number 122: 8107 * r: FLOAT_NEG(FLOAT_SUB(FLOAT_MUL(r, r), r)) 8108 * @param p BURS node to apply the rule to 8109 */ 8110 private void code122(AbstractBURS_TreeNode p) { 8111 EMIT(MIR_Ternary.mutate(P(p), PPC_FNMSUBS, Unary.getResult(P(p)), 8112 R(Binary.getVal1(PLL(p))), R(Binary.getVal2(PLL(p))), 8113 R(Binary.getVal2(PL(p))))); 8114 } 8115 8116 /** 8117 * Emit code for rule number 123: 8118 * r: DOUBLE_NEG(DOUBLE_SUB(DOUBLE_MUL(r, r), r)) 8119 * @param p BURS node to apply the rule to 8120 */ 8121 private void code123(AbstractBURS_TreeNode p) { 8122 EMIT(MIR_Ternary.mutate(P(p), PPC_FNMSUB, Unary.getResult(P(p)), 8123 R(Binary.getVal1(PLL(p))), R(Binary.getVal2(PLL(p))), 8124 R(Binary.getVal2(PL(p))))); 8125 } 8126 8127 /** 8128 * Emit code for rule number 124: 8129 * rs: INT_2BYTE(r) 8130 * @param p BURS node to apply the rule to 8131 */ 8132 private void code124(AbstractBURS_TreeNode p) { 8133 EMIT(MIR_Unary.mutate(P(p), PPC_EXTSB, Unary.getResult(P(p)), Unary.getVal(P(p)))); 8134 } 8135 8136 /** 8137 * Emit code for rule number 125: 8138 * rp: INT_2USHORT(r) 8139 * @param p BURS node to apply the rule to 8140 */ 8141 private void code125(AbstractBURS_TreeNode p) { 8142 EMIT(MIR_RotateAndMask.create(PPC_RLWINM, Unary.getResult(P(p)), null, 8143 R(Unary.getVal(P(p))), IC(0), IC(16), IC(31))); 8144 } 8145 8146 /** 8147 * Emit code for rule number 126: 8148 * rs: INT_2SHORT(r) 8149 * @param p BURS node to apply the rule to 8150 */ 8151 private void code126(AbstractBURS_TreeNode p) { 8152 EMIT(MIR_Unary.mutate(P(p), PPC_EXTSH, Unary.getResult(P(p)), Unary.getVal(P(p)))); 8153 } 8154 8155 /** 8156 * Emit code for rule number 127: 8157 * r: INT_2FLOAT(r) 8158 * @param p BURS node to apply the rule to 8159 */ 8160 private void code127(AbstractBURS_TreeNode p) { 8161 INT_2DOUBLE(P(p), Unary.getResult(P(p)), R(Unary.getVal(P(p)))); 8162 } 8163 8164 /** 8165 * Emit code for rule number 128: 8166 * r: INT_2DOUBLE(r) 8167 * @param p BURS node to apply the rule to 8168 */ 8169 private void code128(AbstractBURS_TreeNode p) { 8170 INT_2DOUBLE(P(p), Unary.getResult(P(p)), R(Unary.getVal(P(p)))); 8171 } 8172 8173 /** 8174 * Emit code for rule number 129: 8175 * r: FLOAT_2INT(r) 8176 * @param p BURS node to apply the rule to 8177 */ 8178 private void code129(AbstractBURS_TreeNode p) { 8179 EMIT(P(p)); // Leave for ComplexLIR2MIRExpansion 8180 } 8181 8182 /** 8183 * Emit code for rule number 130: 8184 * r: FLOAT_2DOUBLE(r) 8185 * @param p BURS node to apply the rule to 8186 */ 8187 private void code130(AbstractBURS_TreeNode p) { 8188 EMIT(MIR_Move.mutate(P(p), PPC_FMR, Unary.getResult(P(p)), R(Unary.getVal(P(p))))); 8189 } 8190 8191 /** 8192 * Emit code for rule number 131: 8193 * r: DOUBLE_2INT(r) 8194 * @param p BURS node to apply the rule to 8195 */ 8196 private void code131(AbstractBURS_TreeNode p) { 8197 EMIT(P(p)); // Leave for ComplexLIR2MIRExpansionLeave 8198 } 8199 8200 /** 8201 * Emit code for rule number 132: 8202 * r: DOUBLE_2FLOAT(r) 8203 * @param p BURS node to apply the rule to 8204 */ 8205 private void code132(AbstractBURS_TreeNode p) { 8206 EMIT(MIR_Unary.mutate(P(p), PPC_FRSP, Unary.getResult(P(p)), Unary.getVal(P(p)))); 8207 } 8208 8209 /** 8210 * Emit code for rule number 133: 8211 * r: FLOAT_AS_INT_BITS(r) 8212 * @param p BURS node to apply the rule to 8213 */ 8214 private void code133(AbstractBURS_TreeNode p) { 8215 FPR2GPR_32(P(p)); 8216 } 8217 8218 /** 8219 * Emit code for rule number 134: 8220 * r: INT_BITS_AS_FLOAT(r) 8221 * @param p BURS node to apply the rule to 8222 */ 8223 private void code134(AbstractBURS_TreeNode p) { 8224 GPR2FPR_32(P(p)); 8225 } 8226 8227 /** 8228 * Emit code for rule number 135: 8229 * r: REF_MOVE(r) 8230 * @param p BURS node to apply the rule to 8231 */ 8232 private void code135(AbstractBURS_TreeNode p) { 8233 EMIT(MIR_Move.mutate(P(p), PPC_MOVE, Move.getResult(P(p)), R(Move.getVal(P(p))))); 8234 } 8235 8236 /** 8237 * Emit code for rule number 136: 8238 * rs: REF_MOVE(INT_CONSTANT) 8239 * @param p BURS node to apply the rule to 8240 */ 8241 private void code136(AbstractBURS_TreeNode p) { 8242 EMIT(MIR_Unary.mutate(P(p), PPC_LDI, Move.getResult(P(p)), Move.getVal(P(p)))); 8243 } 8244 8245 /** 8246 * Emit code for rule number 137: 8247 * rs: REF_MOVE(INT_CONSTANT) 8248 * @param p BURS node to apply the rule to 8249 */ 8250 private void code137(AbstractBURS_TreeNode p) { 8251 EMIT(MIR_Unary.mutate(P(p), PPC_LDIS, Move.getResult(P(p)), SRI(IV(Move.getVal(P(p))), 16))); 8252 } 8253 8254 /** 8255 * Emit code for rule number 138: 8256 * rs: REF_MOVE(INT_CONSTANT) 8257 * @param p BURS node to apply the rule to 8258 */ 8259 private void code138(AbstractBURS_TreeNode p) { 8260 { 8261 int one = IV(Move.getVal(P(p))); 8262 EMIT(MIR_Unary.create(PPC_LDIS, Move.getResult(P(p)), CAU16(one))); 8263 EMIT(MIR_Binary.mutate(P(p), PPC_ADDI, Move.getResult(P(p)).copyRO(), 8264 Move.getResult(P(p)).copyRO(), CAL16(one))); 8265} 8266 } 8267 8268 /** 8269 * Emit code for rule number 139: 8270 * r: FLOAT_MOVE(r) 8271 * @param p BURS node to apply the rule to 8272 */ 8273 private void code139(AbstractBURS_TreeNode p) { 8274 EMIT(MIR_Move.mutate(P(p), PPC_FMR, Move.getResult(P(p)), R(Move.getVal(P(p))))); 8275 } 8276 8277 /** 8278 * Emit code for rule number 140: 8279 * r: DOUBLE_MOVE(r) 8280 * @param p BURS node to apply the rule to 8281 */ 8282 private void code140(AbstractBURS_TreeNode p) { 8283 EMIT(MIR_Move.mutate(P(p), PPC_FMR, Move.getResult(P(p)), R(Move.getVal(P(p))))); 8284 } 8285 8286 /** 8287 * Emit code for rule number 141: 8288 * rs: BYTE_LOAD(r,INT_CONSTANT) 8289 * @param p BURS node to apply the rule to 8290 */ 8291 private void code141(AbstractBURS_TreeNode p) { 8292 BYTE_LOAD(P(p), PPC_LBZ, Load.getResult(P(p)), R(Load.getAddress(P(p))), Load.getOffset(P(p)), 8293 Load.getLocation(P(p)), Load.getGuard(P(p))); 8294 } 8295 8296 /** 8297 * Emit code for rule number 142: 8298 * rs: BYTE_LOAD(r,r) 8299 * @param p BURS node to apply the rule to 8300 */ 8301 private void code142(AbstractBURS_TreeNode p) { 8302 BYTE_LOAD(P(p), PPC_LBZX, Load.getResult(P(p)), R(Load.getAddress(P(p))), Load.getOffset(P(p)), 8303 Load.getLocation(P(p)), Load.getGuard(P(p))); 8304 } 8305 8306 /** 8307 * Emit code for rule number 143: 8308 * rp: REF_AND(BYTE_LOAD(r,r),INT_CONSTANT) 8309 * @param p BURS node to apply the rule to 8310 */ 8311 private void code143(AbstractBURS_TreeNode p) { 8312 EMIT(MIR_Load.mutate(PL(p), PPC_LBZX, Binary.getResult(P(p)), R(Load.getAddress(PL(p))), 8313 Load.getOffset(PL(p)), Load.getLocation(PL(p)), 8314 Load.getGuard(PL(p)))); 8315 } 8316 8317 /** 8318 * Emit code for rule number 144: 8319 * rp: REF_AND(BYTE_LOAD(r,INT_CONSTANT),INT_CONSTANT) 8320 * @param p BURS node to apply the rule to 8321 */ 8322 private void code144(AbstractBURS_TreeNode p) { 8323 EMIT(MIR_Load.mutate(PL(p), PPC_LBZ, Binary.getResult(P(p)), R(Load.getAddress(PL(p))), 8324 Load.getOffset(PL(p)), Load.getLocation(PL(p)), 8325 Load.getGuard(PL(p)))); 8326 } 8327 8328 /** 8329 * Emit code for rule number 145: 8330 * rp: UBYTE_LOAD(r,INT_CONSTANT) 8331 * @param p BURS node to apply the rule to 8332 */ 8333 private void code145(AbstractBURS_TreeNode p) { 8334 EMIT(MIR_Load.mutate(P(p), PPC_LBZ, Load.getResult(P(p)), 8335 R(Load.getAddress(P(p))), Load.getOffset(P(p)), 8336 Load.getLocation(P(p)), Load.getGuard(P(p)))); 8337 } 8338 8339 /** 8340 * Emit code for rule number 146: 8341 * rp: UBYTE_LOAD(r,r) 8342 * @param p BURS node to apply the rule to 8343 */ 8344 private void code146(AbstractBURS_TreeNode p) { 8345 EMIT(MIR_Load.mutate(P(p), PPC_LBZX, Load.getResult(P(p)), 8346 R(Load.getAddress(P(p))), Load.getOffset(P(p)), 8347 Load.getLocation(P(p)), Load.getGuard(P(p)))); 8348 } 8349 8350 /** 8351 * Emit code for rule number 147: 8352 * rs: SHORT_LOAD(r,INT_CONSTANT) 8353 * @param p BURS node to apply the rule to 8354 */ 8355 private void code147(AbstractBURS_TreeNode p) { 8356 EMIT(MIR_Load.mutate(P(p), PPC_LHA, Load.getResult(P(p)), 8357 R(Load.getAddress(P(p))), Load.getOffset(P(p)), 8358 Load.getLocation(P(p)), Load.getGuard(P(p)))); 8359 } 8360 8361 /** 8362 * Emit code for rule number 148: 8363 * rs: SHORT_LOAD(r,r) 8364 * @param p BURS node to apply the rule to 8365 */ 8366 private void code148(AbstractBURS_TreeNode p) { 8367 EMIT(MIR_Load.mutate(P(p), PPC_LHAX, Load.getResult(P(p)), 8368 R(Load.getAddress(P(p))), Load.getOffset(P(p)), 8369 Load.getLocation(P(p)), Load.getGuard(P(p)))); 8370 } 8371 8372 /** 8373 * Emit code for rule number 149: 8374 * rp: USHORT_LOAD(r,INT_CONSTANT) 8375 * @param p BURS node to apply the rule to 8376 */ 8377 private void code149(AbstractBURS_TreeNode p) { 8378 EMIT(MIR_Load.mutate(P(p), PPC_LHZ, Load.getResult(P(p)), 8379 R(Load.getAddress(P(p))), Load.getOffset(P(p)), 8380 Load.getLocation(P(p)), Load.getGuard(P(p)))); 8381 } 8382 8383 /** 8384 * Emit code for rule number 150: 8385 * rp: USHORT_LOAD(r,r) 8386 * @param p BURS node to apply the rule to 8387 */ 8388 private void code150(AbstractBURS_TreeNode p) { 8389 EMIT(MIR_Load.mutate(P(p), PPC_LHZX, Load.getResult(P(p)), 8390 R(Load.getAddress(P(p))), Load.getOffset(P(p)), 8391 Load.getLocation(P(p)), Load.getGuard(P(p)))); 8392 } 8393 8394 /** 8395 * Emit code for rule number 151: 8396 * r: FLOAT_LOAD(r,INT_CONSTANT) 8397 * @param p BURS node to apply the rule to 8398 */ 8399 private void code151(AbstractBURS_TreeNode p) { 8400 EMIT(MIR_Load.mutate(P(p), PPC_LFS, Load.getResult(P(p)), 8401 R(Load.getAddress(P(p))), Load.getOffset(P(p)), 8402 Load.getLocation(P(p)), Load.getGuard(P(p)))); 8403 } 8404 8405 /** 8406 * Emit code for rule number 152: 8407 * r: FLOAT_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 8408 * @param p BURS node to apply the rule to 8409 */ 8410 private void code152(AbstractBURS_TreeNode p) { 8411 { 8412 Address val = AV(Move.getVal(PR(p))); 8413 EMIT(MIR_Binary.create(PPC_ADDIS, Move.getResult(PR(p)), 8414 R(Load.getAddress(P(p))), CAU16(val))); 8415 EMIT(MIR_Load.mutate(P(p), PPC_LFS, Load.getResult(P(p)), 8416 Move.getResult(PR(p)).copyRO(), CAL16(val), 8417 Load.getLocation(P(p)), 8418 Load.getGuard(P(p)))); 8419} 8420 } 8421 8422 /** 8423 * Emit code for rule number 153: 8424 * r: FLOAT_LOAD(r,r) 8425 * @param p BURS node to apply the rule to 8426 */ 8427 private void code153(AbstractBURS_TreeNode p) { 8428 EMIT(MIR_Load.mutate(P(p), PPC_LFSX, Load.getResult(P(p)), 8429 R(Load.getAddress(P(p))), Load.getOffset(P(p)), 8430 Load.getLocation(P(p)), Load.getGuard(P(p)))); 8431 } 8432 8433 /** 8434 * Emit code for rule number 154: 8435 * r: DOUBLE_LOAD(r,INT_CONSTANT) 8436 * @param p BURS node to apply the rule to 8437 */ 8438 private void code154(AbstractBURS_TreeNode p) { 8439 EMIT(MIR_Load.mutate(P(p), PPC_LFD, Load.getResult(P(p)), 8440 R(Load.getAddress(P(p))), Load.getOffset(P(p)), 8441 Load.getLocation(P(p)), Load.getGuard(P(p)))); 8442 } 8443 8444 /** 8445 * Emit code for rule number 155: 8446 * r: DOUBLE_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 8447 * @param p BURS node to apply the rule to 8448 */ 8449 private void code155(AbstractBURS_TreeNode p) { 8450 { 8451 Address val = AV(Move.getVal(PR(p))); 8452 EMIT(MIR_Binary.create(PPC_ADDIS, Move.getResult(PR(p)), 8453 R(Load.getAddress(P(p))), CAU16(val))); 8454 EMIT(MIR_Load.mutate(P(p), PPC_LFD, Load.getResult(P(p)), 8455 Move.getResult(PR(p)).copyRO(), CAL16(val), 8456 Load.getLocation(P(p)), 8457 Load.getGuard(P(p)))); 8458} 8459 } 8460 8461 /** 8462 * Emit code for rule number 156: 8463 * r: DOUBLE_LOAD(r,r) 8464 * @param p BURS node to apply the rule to 8465 */ 8466 private void code156(AbstractBURS_TreeNode p) { 8467 EMIT(MIR_Load.mutate(P(p), PPC_LFDX, Load.getResult(P(p)), 8468 R(Load.getAddress(P(p))), Load.getOffset(P(p)), 8469 Load.getLocation(P(p)), Load.getGuard(P(p)))); 8470 } 8471 8472 /** 8473 * Emit code for rule number 157: 8474 * rs: INT_LOAD(r,INT_CONSTANT) 8475 * @param p BURS node to apply the rule to 8476 */ 8477 private void code157(AbstractBURS_TreeNode p) { 8478 EMIT(MIR_Load.mutate(P(p), PPC_LInt, Load.getResult(P(p)), 8479 R(Load.getAddress(P(p))), Load.getOffset(P(p)), 8480 Load.getLocation(P(p)), Load.getGuard(P(p)))); 8481 } 8482 8483 /** 8484 * Emit code for rule number 158: 8485 * rs: INT_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 8486 * @param p BURS node to apply the rule to 8487 */ 8488 private void code158(AbstractBURS_TreeNode p) { 8489 { 8490 Address val = AV(Move.getVal(PR(p))); 8491 EMIT(MIR_Binary.create(PPC_ADDIS, Move.getResult(PR(p)), 8492 R(Load.getAddress(P(p))), CAU16(val))); 8493 EMIT(MIR_Load.mutate(P(p), PPC_LInt, Load.getResult(P(p)), 8494 Move.getResult(PR(p)).copyRO(), CAL16(val), 8495 Load.getLocation(P(p)), 8496 Load.getGuard(P(p)))); 8497} 8498 } 8499 8500 /** 8501 * Emit code for rule number 159: 8502 * rs: INT_LOAD(r,r) 8503 * @param p BURS node to apply the rule to 8504 */ 8505 private void code159(AbstractBURS_TreeNode p) { 8506 EMIT(MIR_Load.mutate(P(p), PPC_LIntX, Load.getResult(P(p)), 8507 R(Load.getAddress(P(p))), Load.getOffset(P(p)), 8508 Load.getLocation(P(p)), Load.getGuard(P(p)))); 8509 } 8510 8511 /** 8512 * Emit code for rule number 160: 8513 * rs: INT_LOAD(REF_ADD(r,r),INT_CONSTANT) 8514 * @param p BURS node to apply the rule to 8515 */ 8516 private void code160(AbstractBURS_TreeNode p) { 8517 EMIT(MIR_Load.mutate(P(p), PPC_LIntX, Load.getResult(P(p)), 8518 R(Binary.getVal1(PL(p))), Binary.getVal2(PL(p)), 8519 Load.getLocation(P(p)), Load.getGuard(P(p)))); 8520 } 8521 8522 /** 8523 * Emit code for rule number 161: 8524 * rs: INT_LOAD(REF_ADD(r,INT_CONSTANT),INT_CONSTANT) 8525 * @param p BURS node to apply the rule to 8526 */ 8527 private void code161(AbstractBURS_TreeNode p) { 8528 EMIT(MIR_Load.mutate(P(p), PPC_LInt, Load.getResult(P(p)), 8529 R(Binary.getVal1(PL(p))), IC(VR(p)+VLR(p)), 8530 Load.getLocation(P(p)), Load.getGuard(P(p)))); 8531 } 8532 8533 /** 8534 * Emit code for rule number 162: 8535 * stm: BYTE_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 8536 * @param p BURS node to apply the rule to 8537 */ 8538 private void code162(AbstractBURS_TreeNode p) { 8539 EMIT(MIR_Store.mutate(P(p), PPC_STB, R(Store.getValue(P(p))), 8540 R(Store.getAddress(P(p))), 8541 Store.getOffset(P(p)), 8542 Store.getLocation(P(p)), 8543 Store.getGuard(P(p)))); 8544 } 8545 8546 /** 8547 * Emit code for rule number 163: 8548 * stm: BYTE_STORE(r,OTHER_OPERAND(r,r)) 8549 * @param p BURS node to apply the rule to 8550 */ 8551 private void code163(AbstractBURS_TreeNode p) { 8552 EMIT(MIR_Store.mutate(P(p), PPC_STBX, R(Store.getValue(P(p))), 8553 R(Store.getAddress(P(p))), 8554 Store.getOffset(P(p)), 8555 Store.getLocation(P(p)), 8556 Store.getGuard(P(p)))); 8557 } 8558 8559 /** 8560 * Emit code for rule number 164: 8561 * stm: BYTE_STORE(INT_2BYTE(r),OTHER_OPERAND(r,INT_CONSTANT)) 8562 * @param p BURS node to apply the rule to 8563 */ 8564 private void code164(AbstractBURS_TreeNode p) { 8565 EMIT(MIR_Store.mutate(P(p), PPC_STB, R(Unary.getVal(PL(p))), 8566 R(Store.getAddress(P(p))), 8567 Store.getOffset(P(p)), 8568 Store.getLocation(P(p)), 8569 Store.getGuard(P(p)))); 8570 } 8571 8572 /** 8573 * Emit code for rule number 165: 8574 * stm: BYTE_STORE(INT_2BYTE(r),OTHER_OPERAND(r,r)) 8575 * @param p BURS node to apply the rule to 8576 */ 8577 private void code165(AbstractBURS_TreeNode p) { 8578 EMIT(MIR_Store.mutate(P(p), PPC_STBX, R(Unary.getVal(PL(p))), 8579 R(Store.getAddress(P(p))), 8580 Store.getOffset(P(p)), 8581 Store.getLocation(P(p)), 8582 Store.getGuard(P(p)))); 8583 } 8584 8585 /** 8586 * Emit code for rule number 166: 8587 * stm: SHORT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 8588 * @param p BURS node to apply the rule to 8589 */ 8590 private void code166(AbstractBURS_TreeNode p) { 8591 EMIT(MIR_Store.mutate(P(p), PPC_STH, R(Store.getValue(P(p))), 8592 R(Store.getAddress(P(p))), 8593 Store.getOffset(P(p)), 8594 Store.getLocation(P(p)), 8595 Store.getGuard(P(p)))); 8596 } 8597 8598 /** 8599 * Emit code for rule number 167: 8600 * stm: SHORT_STORE(r,OTHER_OPERAND(r,r)) 8601 * @param p BURS node to apply the rule to 8602 */ 8603 private void code167(AbstractBURS_TreeNode p) { 8604 EMIT(MIR_Store.mutate(P(p), PPC_STHX, R(Store.getValue(P(p))), 8605 R(Store.getAddress(P(p))), 8606 Store.getOffset(P(p)), 8607 Store.getLocation(P(p)), 8608 Store.getGuard(P(p)))); 8609 } 8610 8611 /** 8612 * Emit code for rule number 168: 8613 * stm: SHORT_STORE(INT_2SHORT(r),OTHER_OPERAND(r,INT_CONSTANT)) 8614 * @param p BURS node to apply the rule to 8615 */ 8616 private void code168(AbstractBURS_TreeNode p) { 8617 EMIT(MIR_Store.mutate(P(p), PPC_STH, R(Unary.getVal(PL(p))), 8618 R(Store.getAddress(P(p))), 8619 Store.getOffset(P(p)), 8620 Store.getLocation(P(p)), 8621 Store.getGuard(P(p)))); 8622 } 8623 8624 /** 8625 * Emit code for rule number 169: 8626 * stm: SHORT_STORE(INT_2SHORT(r),OTHER_OPERAND(r,r)) 8627 * @param p BURS node to apply the rule to 8628 */ 8629 private void code169(AbstractBURS_TreeNode p) { 8630 EMIT(MIR_Store.mutate(P(p), PPC_STHX, R(Unary.getVal(PL(p))), 8631 R(Store.getAddress(P(p))), 8632 Store.getOffset(P(p)), 8633 Store.getLocation(P(p)), 8634 Store.getGuard(P(p)))); 8635 } 8636 8637 /** 8638 * Emit code for rule number 170: 8639 * stm: SHORT_STORE(INT_2USHORT(r),OTHER_OPERAND(r,INT_CONSTANT)) 8640 * @param p BURS node to apply the rule to 8641 */ 8642 private void code170(AbstractBURS_TreeNode p) { 8643 EMIT(MIR_Store.mutate(P(p), PPC_STH, R(Unary.getVal(PL(p))), 8644 R(Store.getAddress(P(p))), 8645 Store.getOffset(P(p)), 8646 Store.getLocation(P(p)), 8647 Store.getGuard(P(p)))); 8648 } 8649 8650 /** 8651 * Emit code for rule number 171: 8652 * stm: SHORT_STORE(INT_2USHORT(r),OTHER_OPERAND(r,r)) 8653 * @param p BURS node to apply the rule to 8654 */ 8655 private void code171(AbstractBURS_TreeNode p) { 8656 EMIT(MIR_Store.mutate(P(p), PPC_STHX, R(Unary.getVal(PL(p))), 8657 R(Store.getAddress(P(p))), 8658 Store.getOffset(P(p)), 8659 Store.getLocation(P(p)), 8660 Store.getGuard(P(p)))); 8661 } 8662 8663 /** 8664 * Emit code for rule number 172: 8665 * stm: INT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 8666 * @param p BURS node to apply the rule to 8667 */ 8668 private void code172(AbstractBURS_TreeNode p) { 8669 EMIT(MIR_Store.mutate(P(p), PPC_STW, R(Store.getValue(P(p))), 8670 R(Store.getAddress(P(p))), 8671 Store.getOffset(P(p)), 8672 Store.getLocation(P(p)), 8673 Store.getGuard(P(p)))); 8674 } 8675 8676 /** 8677 * Emit code for rule number 173: 8678 * stm: INT_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 8679 * @param p BURS node to apply the rule to 8680 */ 8681 private void code173(AbstractBURS_TreeNode p) { 8682 { 8683 Address val = AV(Move.getVal(PRR(p))); 8684 EMIT(MIR_Binary.create(PPC_ADDIS, Move.getResult(PRR(p)), 8685 R(Store.getAddress(P(p))), CAU16(val))); 8686 EMIT(MIR_Store.mutate(P(p), PPC_STW, R(Store.getValue(P(p))), 8687 Move.getResult(PRR(p)).copyRO(), CAL16(val), 8688 Store.getLocation(P(p)), 8689 Store.getGuard(P(p)))); 8690} 8691 } 8692 8693 /** 8694 * Emit code for rule number 174: 8695 * stm: INT_STORE(r,OTHER_OPERAND(r,r)) 8696 * @param p BURS node to apply the rule to 8697 */ 8698 private void code174(AbstractBURS_TreeNode p) { 8699 EMIT(MIR_Store.mutate(P(p), PPC_STWX, R(Store.getValue(P(p))), 8700 R(Store.getAddress(P(p))), 8701 Store.getOffset(P(p)), 8702 Store.getLocation(P(p)), 8703 Store.getGuard(P(p)))); 8704 } 8705 8706 /** 8707 * Emit code for rule number 175: 8708 * stm: INT_STORE(r,OTHER_OPERAND(REF_ADD(r,INT_CONSTANT),INT_CONSTANT)) 8709 * @param p BURS node to apply the rule to 8710 */ 8711 private void code175(AbstractBURS_TreeNode p) { 8712 EMIT(MIR_Store.mutate(P(p), PPC_STW, R(Store.getValue(P(p))), 8713 R(Binary.getVal1(PRL(p))), 8714 IC(VRR(p) + VRLR(p)), 8715 Store.getLocation(P(p)), 8716 Store.getGuard(P(p)))); 8717 } 8718 8719 /** 8720 * Emit code for rule number 176: 8721 * stm: FLOAT_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 8722 * @param p BURS node to apply the rule to 8723 */ 8724 private void code176(AbstractBURS_TreeNode p) { 8725 EMIT(MIR_Store.mutate(P(p), PPC_STFS, R(Store.getValue(P(p))), 8726 R(Store.getAddress(P(p))), 8727 Store.getOffset(P(p)), 8728 Store.getLocation(P(p)), 8729 Store.getGuard(P(p)))); 8730 } 8731 8732 /** 8733 * Emit code for rule number 177: 8734 * stm: FLOAT_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 8735 * @param p BURS node to apply the rule to 8736 */ 8737 private void code177(AbstractBURS_TreeNode p) { 8738 { 8739 Address val = AV(Move.getVal(PRR(p))); 8740 EMIT(MIR_Binary.create(PPC_ADDIS, Move.getResult(PRR(p)), 8741 R(Store.getAddress(P(p))), CAU16(val))); 8742 EMIT(MIR_Store.mutate(P(p), PPC_STFS, R(Store.getValue(P(p))), 8743 Move.getResult(PRR(p)).copyRO(), CAL16(val), 8744 Store.getLocation(P(p)), 8745 Store.getGuard(P(p)))); 8746} 8747 } 8748 8749 /** 8750 * Emit code for rule number 178: 8751 * stm: FLOAT_STORE(r,OTHER_OPERAND(r,r)) 8752 * @param p BURS node to apply the rule to 8753 */ 8754 private void code178(AbstractBURS_TreeNode p) { 8755 EMIT(MIR_Store.mutate(P(p), PPC_STFSX, R(Store.getValue(P(p))), 8756 R(Store.getAddress(P(p))), 8757 Store.getOffset(P(p)), 8758 Store.getLocation(P(p)), 8759 Store.getGuard(P(p)))); 8760 } 8761 8762 /** 8763 * Emit code for rule number 179: 8764 * stm: DOUBLE_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 8765 * @param p BURS node to apply the rule to 8766 */ 8767 private void code179(AbstractBURS_TreeNode p) { 8768 EMIT(MIR_Store.mutate(P(p), PPC_STFD, R(Store.getValue(P(p))), 8769 R(Store.getAddress(P(p))), 8770 Store.getOffset(P(p)), 8771 Store.getLocation(P(p)), 8772 Store.getGuard(P(p)))); 8773 } 8774 8775 /** 8776 * Emit code for rule number 180: 8777 * stm: DOUBLE_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 8778 * @param p BURS node to apply the rule to 8779 */ 8780 private void code180(AbstractBURS_TreeNode p) { 8781 { 8782 Address val = AV(Move.getVal(PRR(p))); 8783 EMIT(MIR_Binary.create(PPC_ADDIS, Move.getResult(PRR(p)), 8784 R(Store.getAddress(P(p))), CAU16(val))); 8785 EMIT(MIR_Store.mutate(P(p), PPC_STFD, R(Store.getValue(P(p))), 8786 Move.getResult(PRR(p)).copyRO(), CAL16(val), 8787 Store.getLocation(P(p)), 8788 Store.getGuard(P(p)))); 8789} 8790 } 8791 8792 /** 8793 * Emit code for rule number 181: 8794 * stm: DOUBLE_STORE(r,OTHER_OPERAND(r,r)) 8795 * @param p BURS node to apply the rule to 8796 */ 8797 private void code181(AbstractBURS_TreeNode p) { 8798 EMIT(MIR_Store.mutate(P(p), PPC_STFDX, R(Store.getValue(P(p))), 8799 R(Store.getAddress(P(p))), 8800 Store.getOffset(P(p)), 8801 Store.getLocation(P(p)), 8802 Store.getGuard(P(p)))); 8803 } 8804 8805 /** 8806 * Emit code for rule number 182: 8807 * stm: INT_IFCMP(r,r) 8808 * @param p BURS node to apply the rule to 8809 */ 8810 private void code182(AbstractBURS_TreeNode p) { 8811 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp.getGuardResult(P(p)), new TrueGuardOperand()))); 8812CMP(P(p), R(IfCmp.getVal1(P(p))), IfCmp.getVal2(P(p)), IfCmp.getCond(P(p)), false); 8813 } 8814 8815 /** 8816 * Emit code for rule number 183: 8817 * stm: INT_IFCMP(r,INT_CONSTANT) 8818 * @param p BURS node to apply the rule to 8819 */ 8820 private void code183(AbstractBURS_TreeNode p) { 8821 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp.getGuardResult(P(p)), new TrueGuardOperand()))); 8822CMP(P(p), R(IfCmp.getVal1(P(p))), IfCmp.getVal2(P(p)), IfCmp.getCond(P(p)), true); 8823 } 8824 8825 /** 8826 * Emit code for rule number 184: 8827 * stm: INT_IFCMP(INT_2BYTE(r),INT_CONSTANT) 8828 * @param p BURS node to apply the rule to 8829 */ 8830 private void code184(AbstractBURS_TreeNode p) { 8831 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp.getGuardResult(P(p)), new TrueGuardOperand()))); 8832CMP_ZERO(P(p), PPC_EXTSBr, Unary.getResult(PL(p)), 8833 Unary.getVal(PL(p)), IfCmp.getCond(P(p))); 8834 } 8835 8836 /** 8837 * Emit code for rule number 185: 8838 * stm: INT_IFCMP(INT_2SHORT(r),INT_CONSTANT) 8839 * @param p BURS node to apply the rule to 8840 */ 8841 private void code185(AbstractBURS_TreeNode p) { 8842 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp.getGuardResult(P(p)), new TrueGuardOperand()))); 8843CMP_ZERO(P(p), PPC_EXTSHr, Unary.getResult(PL(p)), 8844 Unary.getVal(PL(p)), IfCmp.getCond(P(p))); 8845 } 8846 8847 /** 8848 * Emit code for rule number 186: 8849 * stm: INT_IFCMP(INT_USHR(r,r),INT_CONSTANT) 8850 * @param p BURS node to apply the rule to 8851 */ 8852 private void code186(AbstractBURS_TreeNode p) { 8853 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp.getGuardResult(P(p)), new TrueGuardOperand()))); 8854CMP_ZERO(P(p), PPC_SRWr, Binary.getResult(PL(p)), 8855 R(Binary.getVal1(PL(p))), Binary.getVal2(PL(p)), IfCmp.getCond(P(p))); 8856 } 8857 8858 /** 8859 * Emit code for rule number 187: 8860 * stm: INT_IFCMP(INT_SHL(r,r),INT_CONSTANT) 8861 * @param p BURS node to apply the rule to 8862 */ 8863 private void code187(AbstractBURS_TreeNode p) { 8864 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp.getGuardResult(P(p)), new TrueGuardOperand()))); 8865CMP_ZERO(P(p), PPC_SLWr, Binary.getResult(PL(p)), 8866 R(Binary.getVal1(PL(p))), Binary.getVal2(PL(p)), IfCmp.getCond(P(p))); 8867 } 8868 8869 /** 8870 * Emit code for rule number 188: 8871 * stm: INT_IFCMP(INT_SHR(r,r),INT_CONSTANT) 8872 * @param p BURS node to apply the rule to 8873 */ 8874 private void code188(AbstractBURS_TreeNode p) { 8875 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp.getGuardResult(P(p)), new TrueGuardOperand()))); 8876CMP_ZERO(P(p), PPC_SRAWr, Binary.getResult(PL(p)), 8877 R(Binary.getVal1(PL(p))), Binary.getVal2(PL(p)), IfCmp.getCond(P(p))); 8878 } 8879 8880 /** 8881 * Emit code for rule number 189: 8882 * stm: INT_IFCMP(INT_USHR(r,INT_CONSTANT),INT_CONSTANT) 8883 * @param p BURS node to apply the rule to 8884 */ 8885 private void code189(AbstractBURS_TreeNode p) { 8886 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp.getGuardResult(P(p)), new TrueGuardOperand()))); 8887CMP_ZERO(P(p), PPC_SRWIr, Binary.getResult(PL(p)), 8888 R(Binary.getVal1(PL(p))), Binary.getVal2(PL(p)), IfCmp.getCond(P(p))); 8889 } 8890 8891 /** 8892 * Emit code for rule number 190: 8893 * stm: INT_IFCMP(INT_SHL(r,INT_CONSTANT),INT_CONSTANT) 8894 * @param p BURS node to apply the rule to 8895 */ 8896 private void code190(AbstractBURS_TreeNode p) { 8897 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp.getGuardResult(P(p)), new TrueGuardOperand()))); 8898CMP_ZERO(P(p), PPC_SLWIr, Binary.getResult(PL(p)), 8899 R(Binary.getVal1(PL(p))), Binary.getVal2(PL(p)), IfCmp.getCond(P(p))); 8900 } 8901 8902 /** 8903 * Emit code for rule number 191: 8904 * stm: INT_IFCMP(INT_SHR(r,INT_CONSTANT),INT_CONSTANT) 8905 * @param p BURS node to apply the rule to 8906 */ 8907 private void code191(AbstractBURS_TreeNode p) { 8908 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp.getGuardResult(P(p)), new TrueGuardOperand()))); 8909CMP_ZERO(P(p), PPC_SRAWIr, Binary.getResult(PL(p)), 8910 R(Binary.getVal1(PL(p))), Binary.getVal2(PL(p)), IfCmp.getCond(P(p))); 8911 } 8912 8913 /** 8914 * Emit code for rule number 192: 8915 * stm: INT_IFCMP(REF_AND(r,INT_CONSTANT),INT_CONSTANT) 8916 * @param p BURS node to apply the rule to 8917 */ 8918 private void code192(AbstractBURS_TreeNode p) { 8919 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp.getGuardResult(P(p)), new TrueGuardOperand()))); 8920CMP_ZERO(P(p), PPC_ANDIr, Binary.getResult(PL(p)), 8921 R(Binary.getVal1(PL(p))), Binary.getVal2(PL(p)), IfCmp.getCond(P(p))); 8922 } 8923 8924 /** 8925 * Emit code for rule number 193: 8926 * stm: INT_IFCMP(boolcmp, INT_CONSTANT) 8927 * @param p BURS node to apply the rule to 8928 */ 8929 private void code193(AbstractBURS_TreeNode p) { 8930 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp.getGuardResult(P(p)), new TrueGuardOperand()))); 8931EMIT_BOOLCMP_BRANCH(IfCmp.getTarget(P(p)), IfCmp.getBranchProfile(P(p))); 8932 } 8933 8934 /** 8935 * Emit code for rule number 194: 8936 * stm: INT_IFCMP(boolcmp, INT_CONSTANT) 8937 * @param p BURS node to apply the rule to 8938 */ 8939 private void code194(AbstractBURS_TreeNode p) { 8940 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp.getGuardResult(P(p)), new TrueGuardOperand()))); 8941FLIP_BOOLCMP(); EMIT_BOOLCMP_BRANCH(IfCmp.getTarget(P(p)), IfCmp.getBranchProfile(P(p))); 8942 } 8943 8944 /** 8945 * Emit code for rule number 195: 8946 * stm: INT_IFCMP(boolcmp, INT_CONSTANT) 8947 * @param p BURS node to apply the rule to 8948 */ 8949 private void code195(AbstractBURS_TreeNode p) { 8950 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp.getGuardResult(P(p)), new TrueGuardOperand()))); 8951EMIT_BOOLCMP_BRANCH(IfCmp.getTarget(P(p)), IfCmp.getBranchProfile(P(p))); 8952 } 8953 8954 /** 8955 * Emit code for rule number 196: 8956 * stm: INT_IFCMP(boolcmp, INT_CONSTANT) 8957 * @param p BURS node to apply the rule to 8958 */ 8959 private void code196(AbstractBURS_TreeNode p) { 8960 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp.getGuardResult(P(p)), new TrueGuardOperand()))); 8961FLIP_BOOLCMP(); EMIT_BOOLCMP_BRANCH(IfCmp.getTarget(P(p)), IfCmp.getBranchProfile(P(p))); 8962 } 8963 8964 /** 8965 * Emit code for rule number 197: 8966 * stm: INT_IFCMP2(r,r) 8967 * @param p BURS node to apply the rule to 8968 */ 8969 private void code197(AbstractBURS_TreeNode p) { 8970 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp2.getGuardResult(P(p)), new TrueGuardOperand()))); 8971CMP2(P(p), R(IfCmp2.getVal1(P(p))), IfCmp2.getVal2(P(p)), IfCmp2.getCond1(P(p)), IfCmp2.getCond2(P(p)), false); 8972 } 8973 8974 /** 8975 * Emit code for rule number 198: 8976 * stm: INT_IFCMP2(r,INT_CONSTANT) 8977 * @param p BURS node to apply the rule to 8978 */ 8979 private void code198(AbstractBURS_TreeNode p) { 8980 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp2.getGuardResult(P(p)), new TrueGuardOperand()))); 8981CMP2(P(p), R(IfCmp2.getVal1(P(p))), IfCmp2.getVal2(P(p)), IfCmp2.getCond1(P(p)), IfCmp2.getCond2(P(p)), true); 8982 } 8983 8984 /** 8985 * Emit code for rule number 199: 8986 * stm: FLOAT_IFCMP(r,r) 8987 * @param p BURS node to apply the rule to 8988 */ 8989 private void code199(AbstractBURS_TreeNode p) { 8990 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp.getGuardResult(P(p)), new TrueGuardOperand()))); 8991DOUBLE_IFCMP(P(p), R(IfCmp.getVal1(P(p))), IfCmp.getVal2(P(p))); 8992 } 8993 8994 /** 8995 * Emit code for rule number 200: 8996 * stm: DOUBLE_IFCMP(r,r) 8997 * @param p BURS node to apply the rule to 8998 */ 8999 private void code200(AbstractBURS_TreeNode p) { 9000 EMIT(CPOS(P(p), Move.create(GUARD_MOVE, IfCmp.getGuardResult(P(p)), new TrueGuardOperand()))); 9001DOUBLE_IFCMP(P(p), R(IfCmp.getVal1(P(p))), IfCmp.getVal2(P(p))); 9002 } 9003 9004 /** 9005 * Emit code for rule number 201: 9006 * stm: FLOAT_CMPL(r,r) 9007 * @param p BURS node to apply the rule to 9008 */ 9009 private void code201(AbstractBURS_TreeNode p) { 9010 EMIT (P(p)); // Leave for ComplexLIR2MIRExpansion 9011 } 9012 9013 /** 9014 * Emit code for rule number 202: 9015 * stm: FLOAT_CMPG(r,r) 9016 * @param p BURS node to apply the rule to 9017 */ 9018 private void code202(AbstractBURS_TreeNode p) { 9019 EMIT (P(p)); // Leave for ComplexLIR2MIRExpansion 9020 } 9021 9022 /** 9023 * Emit code for rule number 203: 9024 * stm: DOUBLE_CMPL(r,r) 9025 * @param p BURS node to apply the rule to 9026 */ 9027 private void code203(AbstractBURS_TreeNode p) { 9028 EMIT (P(p)); // Leave for ComplexLIR2MIRExpansion 9029 } 9030 9031 /** 9032 * Emit code for rule number 204: 9033 * stm: DOUBLE_CMPG(r,r) 9034 * @param p BURS node to apply the rule to 9035 */ 9036 private void code204(AbstractBURS_TreeNode p) { 9037 EMIT (P(p)); // Leave for ComplexLIR2MIRExpansion 9038 } 9039 9040 /** 9041 * Emit code for rule number 205: 9042 * stm: GOTO 9043 * @param p BURS node to apply the rule to 9044 */ 9045 private void code205(AbstractBURS_TreeNode p) { 9046 EMIT(MIR_Branch.mutate(P(p), PPC_B, Goto.getTarget(P(p)))); 9047 } 9048 9049 /** 9050 * Emit code for rule number 206: 9051 * stm: RETURN(NULL) 9052 * @param p BURS node to apply the rule to 9053 */ 9054 private void code206(AbstractBURS_TreeNode p) { 9055 RETURN(P(p), null); 9056 } 9057 9058 /** 9059 * Emit code for rule number 207: 9060 * stm: RETURN(r) 9061 * @param p BURS node to apply the rule to 9062 */ 9063 private void code207(AbstractBURS_TreeNode p) { 9064 RETURN(P(p), Return.getVal(P(p))); 9065 } 9066 9067 /** 9068 * Emit code for rule number 208: 9069 * r: CALL(r,any) 9070 * @param p BURS node to apply the rule to 9071 */ 9072 private void code208(AbstractBURS_TreeNode p) { 9073 CALL(P(p)); 9074 } 9075 9076 /** 9077 * Emit code for rule number 209: 9078 * r: CALL(BRANCH_TARGET,any) 9079 * @param p BURS node to apply the rule to 9080 */ 9081 private void code209(AbstractBURS_TreeNode p) { 9082 CALL(P(p)); 9083 } 9084 9085 /** 9086 * Emit code for rule number 210: 9087 * r: SYSCALL(r,any) 9088 * @param p BURS node to apply the rule to 9089 */ 9090 private void code210(AbstractBURS_TreeNode p) { 9091 SYSCALL(P(p)); 9092 } 9093 9094 /** 9095 * Emit code for rule number 211: 9096 * r: GET_TIME_BASE 9097 * @param p BURS node to apply the rule to 9098 */ 9099 private void code211(AbstractBURS_TreeNode p) { 9100 EMIT(P(p)); // Leave for ComplexLIR2MIRExpansion 9101 } 9102 9103 /** 9104 * Emit code for rule number 213: 9105 * r: YIELDPOINT_OSR(any, any) 9106 * @param p BURS node to apply the rule to 9107 */ 9108 private void code213(AbstractBURS_TreeNode p) { 9109 OSR(burs, P(p)); 9110 } 9111 9112 /** 9113 * Emit code for rule number 214: 9114 * r: PREPARE_INT(r, r) 9115 * @param p BURS node to apply the rule to 9116 */ 9117 private void code214(AbstractBURS_TreeNode p) { 9118 EMIT(MIR_Load.mutate(P(p), PPC_LWARX, Prepare.getResult(P(p)), 9119 R(Prepare.getAddress(P(p))), Prepare.getOffset(P(p)), 9120 Prepare.getLocation(P(p)), 9121 Prepare.getGuard(P(p)))); 9122 } 9123 9124 /** 9125 * Emit code for rule number 215: 9126 * r: PREPARE_LONG(r, r) 9127 * @param p BURS node to apply the rule to 9128 */ 9129 private void code215(AbstractBURS_TreeNode p) { 9130 EMIT(MIR_Load.mutate(P(p), PPC_LAddrARX, Prepare.getResult(P(p)), 9131 R(Prepare.getAddress(P(p))), Prepare.getOffset(P(p)), 9132 Prepare.getLocation(P(p)), 9133 Prepare.getGuard(P(p)))); 9134 } 9135 9136 /** 9137 * Emit code for rule number 216: 9138 * r: ATTEMPT_INT(r, r) 9139 * @param p BURS node to apply the rule to 9140 */ 9141 private void code216(AbstractBURS_TreeNode p) { 9142 EMIT(P(p)); // Leave for ComplexLIR2MIRExpansion 9143 } 9144 9145 /** 9146 * Emit code for rule number 217: 9147 * r: ATTEMPT_LONG(r, r) 9148 * @param p BURS node to apply the rule to 9149 */ 9150 private void code217(AbstractBURS_TreeNode p) { 9151 EMIT(P(p)); // Leave for ComplexLIR2MIRExpansion 9152 } 9153 9154 /** 9155 * Emit code for rule number 218: 9156 * stm: IR_PROLOGUE 9157 * @param p BURS node to apply the rule to 9158 */ 9159 private void code218(AbstractBURS_TreeNode p) { 9160 PROLOGUE(P(p)); 9161 } 9162 9163 /** 9164 * Emit code for rule number 219: 9165 * r: LONG_ADD(r,r) 9166 * @param p BURS node to apply the rule to 9167 */ 9168 private void code219(AbstractBURS_TreeNode p) { 9169 LONG_ADD(P(p), Binary.getResult(P(p)), R(Binary.getVal1(P(p))), R(Binary.getVal2(P(p)))); 9170 } 9171 9172 /** 9173 * Emit code for rule number 220: 9174 * r: LONG_SUB(r,r) 9175 * @param p BURS node to apply the rule to 9176 */ 9177 private void code220(AbstractBURS_TreeNode p) { 9178 LONG_SUB(P(p), Binary.getResult(P(p)), R(Binary.getVal1(P(p))), R(Binary.getVal2(P(p)))); 9179 } 9180 9181 /** 9182 * Emit code for rule number 221: 9183 * r: LONG_MUL(r,r) 9184 * @param p BURS node to apply the rule to 9185 */ 9186 private void code221(AbstractBURS_TreeNode p) { 9187 LONG_MUL(P(p), Binary.getResult(P(p)), R(Binary.getVal1(P(p))), R(Binary.getVal2(P(p)))); 9188 } 9189 9190 /** 9191 * Emit code for rule number 222: 9192 * r: LONG_NEG(r) 9193 * @param p BURS node to apply the rule to 9194 */ 9195 private void code222(AbstractBURS_TreeNode p) { 9196 LONG_NEG(P(p), Unary.getResult(P(p)), R(Unary.getVal(P(p)))); 9197 } 9198 9199 /** 9200 * Emit code for rule number 223: 9201 * r: LONG_SHL(r,r) 9202 * @param p BURS node to apply the rule to 9203 */ 9204 private void code223(AbstractBURS_TreeNode p) { 9205 LONG_SHL(P(p), Binary.getResult(P(p)), R(Binary.getVal1(P(p))), R(Binary.getVal2(P(p)))); 9206 } 9207 9208 /** 9209 * Emit code for rule number 224: 9210 * r: LONG_SHL(r,INT_CONSTANT) 9211 * @param p BURS node to apply the rule to 9212 */ 9213 private void code224(AbstractBURS_TreeNode p) { 9214 LONG_SHL_IMM(P(p), Binary.getResult(P(p)), R(Binary.getVal1(P(p))), IC(Binary.getVal2(P(p)))); 9215 } 9216 9217 /** 9218 * Emit code for rule number 225: 9219 * r: LONG_SHR(r,r) 9220 * @param p BURS node to apply the rule to 9221 */ 9222 private void code225(AbstractBURS_TreeNode p) { 9223 EMIT(P(p)); // Leave for ComplexLIR2MIRExpansion 9224 } 9225 9226 /** 9227 * Emit code for rule number 226: 9228 * r: LONG_SHR(r,INT_CONSTANT) 9229 * @param p BURS node to apply the rule to 9230 */ 9231 private void code226(AbstractBURS_TreeNode p) { 9232 LONG_SHR_IMM(P(p), Binary.getResult(P(p)), R(Binary.getVal1(P(p))), IC(Binary.getVal2(P(p)))); 9233 } 9234 9235 /** 9236 * Emit code for rule number 227: 9237 * r: LONG_USHR(r,r) 9238 * @param p BURS node to apply the rule to 9239 */ 9240 private void code227(AbstractBURS_TreeNode p) { 9241 LONG_USHR(P(p), Binary.getResult(P(p)), R(Binary.getVal1(P(p))), R(Binary.getVal2(P(p)))); 9242 } 9243 9244 /** 9245 * Emit code for rule number 228: 9246 * r: LONG_USHR(r,INT_CONSTANT) 9247 * @param p BURS node to apply the rule to 9248 */ 9249 private void code228(AbstractBURS_TreeNode p) { 9250 LONG_USHR_IMM(P(p), Binary.getResult(P(p)), R(Binary.getVal1(P(p))), IC(Binary.getVal2(P(p)))); 9251 } 9252 9253 /** 9254 * Emit code for rule number 229: 9255 * r: LONG_AND(r,r) 9256 * @param p BURS node to apply the rule to 9257 */ 9258 private void code229(AbstractBURS_TreeNode p) { 9259 LONG_LOG(P(p), PPC_AND, Binary.getResult(P(p)), R(Binary.getVal1(P(p))), R(Binary.getVal2(P(p)))); 9260 } 9261 9262 /** 9263 * Emit code for rule number 230: 9264 * r: LONG_OR(r,r) 9265 * @param p BURS node to apply the rule to 9266 */ 9267 private void code230(AbstractBURS_TreeNode p) { 9268 LONG_LOG(P(p), PPC_OR, Binary.getResult(P(p)), R(Binary.getVal1(P(p))), R(Binary.getVal2(P(p)))); 9269 } 9270 9271 /** 9272 * Emit code for rule number 231: 9273 * r: LONG_XOR(r,r) 9274 * @param p BURS node to apply the rule to 9275 */ 9276 private void code231(AbstractBURS_TreeNode p) { 9277 LONG_LOG(P(p), PPC_XOR, Binary.getResult(P(p)), R(Binary.getVal1(P(p))), R(Binary.getVal2(P(p)))); 9278 } 9279 9280 /** 9281 * Emit code for rule number 232: 9282 * r: LONG_NOT(r) 9283 * @param p BURS node to apply the rule to 9284 */ 9285 private void code232(AbstractBURS_TreeNode p) { 9286 LONG_NOT(P(p), Unary.getResult(P(p)), R(Unary.getVal(P(p)))); 9287 } 9288 9289 /** 9290 * Emit code for rule number 233: 9291 * r: INT_2LONG(r) 9292 * @param p BURS node to apply the rule to 9293 */ 9294 private void code233(AbstractBURS_TreeNode p) { 9295 INT_2LONG(P(p), Unary.getResult(P(p)), R(Unary.getVal(P(p)))); 9296 } 9297 9298 /** 9299 * Emit code for rule number 234: 9300 * r: LONG_2INT(r) 9301 * @param p BURS node to apply the rule to 9302 */ 9303 private void code234(AbstractBURS_TreeNode p) { 9304 LONG_2INT(P(p), Unary.getResult(P(p)), R(Unary.getVal(P(p)))); 9305 } 9306 9307 /** 9308 * Emit code for rule number 235: 9309 * r: DOUBLE_AS_LONG_BITS(r) 9310 * @param p BURS node to apply the rule to 9311 */ 9312 private void code235(AbstractBURS_TreeNode p) { 9313 FPR2GPR_64(P(p)); 9314 } 9315 9316 /** 9317 * Emit code for rule number 236: 9318 * r: LONG_BITS_AS_DOUBLE(r) 9319 * @param p BURS node to apply the rule to 9320 */ 9321 private void code236(AbstractBURS_TreeNode p) { 9322 GPR2FPR_64(P(p)); 9323 } 9324 9325 /** 9326 * Emit code for rule number 237: 9327 * r: LONG_MOVE(LONG_CONSTANT) 9328 * @param p BURS node to apply the rule to 9329 */ 9330 private void code237(AbstractBURS_TreeNode p) { 9331 LONG_CONSTANT(P(p), Move.getResult(P(p)), LC(Move.getVal(P(p)))); 9332 } 9333 9334 /** 9335 * Emit code for rule number 238: 9336 * r: LONG_MOVE(r) 9337 * @param p BURS node to apply the rule to 9338 */ 9339 private void code238(AbstractBURS_TreeNode p) { 9340 LONG_MOVE(P(p), Move.getResult(P(p)), R(Move.getVal(P(p)))); 9341 } 9342 9343 /** 9344 * Emit code for rule number 239: 9345 * stm: LONG_CMP(r,r) 9346 * @param p BURS node to apply the rule to 9347 */ 9348 private void code239(AbstractBURS_TreeNode p) { 9349 EMIT (P(p)); // Leave for ComplexLIR2MIRExpansion 9350 } 9351 9352 /** 9353 * Emit code for rule number 240: 9354 * stm: LONG_IFCMP(r,r) 9355 * @param p BURS node to apply the rule to 9356 */ 9357 private void code240(AbstractBURS_TreeNode p) { 9358 EMIT(P(p)); // Leave for ComplexLIR2MIRExpansion 9359 } 9360 9361 /** 9362 * Emit code for rule number 241: 9363 * stm: INT_IFCMP(ATTEMPT_INT(r,r),INT_CONSTANT) 9364 * @param p BURS node to apply the rule to 9365 */ 9366 private void code241(AbstractBURS_TreeNode p) { 9367 { 9368 ConditionOperand c = IfCmp.getCond(P(p)).flipCode(); 9369 EMIT(MIR_Store.create(PPC_STWCXr, R(Attempt.getNewValue(PL(p))), 9370 R(Attempt.getAddress(PL(p))), Attempt.getOffset(PL(p)), 9371 Attempt.getLocation(PL(p)), 9372 Attempt.getGuard(PL(p)))); 9373 EMIT(MIR_CondBranch.mutate(P(p), PPC_BCOND, CR(0), 9374 new PowerPCConditionOperand(c), 9375 IfCmp.getTarget(P(p)), 9376 IfCmp.getBranchProfile(P(p)))); 9377} 9378 } 9379 9380 /** 9381 * Emit code for rule number 242: 9382 * stm: INT_IFCMP(ATTEMPT_ADDR(r,r),INT_CONSTANT) 9383 * @param p BURS node to apply the rule to 9384 */ 9385 private void code242(AbstractBURS_TreeNode p) { 9386 { 9387 ConditionOperand c = IfCmp.getCond(P(p)).flipCode(); 9388 EMIT(MIR_Store.create(PPC_STWCXr, R(Attempt.getNewValue(PL(p))), 9389 R(Attempt.getAddress(PL(p))), Attempt.getOffset(PL(p)), 9390 Attempt.getLocation(PL(p)), 9391 Attempt.getGuard(PL(p)))); 9392 EMIT(MIR_CondBranch.mutate(P(p), PPC_BCOND, CR(0), 9393 new PowerPCConditionOperand(c), 9394 IfCmp.getTarget(P(p)), 9395 IfCmp.getBranchProfile(P(p)))); 9396} 9397 } 9398 9399 /** 9400 * Emit code for rule number 243: 9401 * stm: INT_IFCMP(REF_NEG(r),INT_CONSTANT) 9402 * @param p BURS node to apply the rule to 9403 */ 9404 private void code243(AbstractBURS_TreeNode p) { 9405 CMP_ZERO(P(p), PPC_NEGr, Unary.getResult(PL(p)), 9406 Unary.getVal(PL(p)), IfCmp.getCond(P(p))); 9407 } 9408 9409 /** 9410 * Emit code for rule number 244: 9411 * stm: INT_IFCMP(REF_NOT(r),INT_CONSTANT) 9412 * @param p BURS node to apply the rule to 9413 */ 9414 private void code244(AbstractBURS_TreeNode p) { 9415 CMP_ZERO(P(p), PPC_XORr, Unary.getResult(PL(p)), 9416 R(Unary.getVal(PL(p))), Unary.getVal(PL(p)), IfCmp.getCond(P(p))); 9417 } 9418 9419 /** 9420 * Emit code for rule number 245: 9421 * stm: INT_IFCMP(REF_ADD(r,r),INT_CONSTANT) 9422 * @param p BURS node to apply the rule to 9423 */ 9424 private void code245(AbstractBURS_TreeNode p) { 9425 CMP_ZERO(P(p), PPC_ADDr, Binary.getResult(PL(p)), 9426 R(Binary.getVal1(PL(p))), Binary.getVal2(PL(p)), IfCmp.getCond(P(p))); 9427 } 9428 9429 /** 9430 * Emit code for rule number 246: 9431 * stm: INT_IFCMP(REF_AND(r,r),INT_CONSTANT) 9432 * @param p BURS node to apply the rule to 9433 */ 9434 private void code246(AbstractBURS_TreeNode p) { 9435 CMP_ZERO(P(p), PPC_ANDr, Binary.getResult(PL(p)), 9436 R(Binary.getVal1(PL(p))), Binary.getVal2(PL(p)), IfCmp.getCond(P(p))); 9437 } 9438 9439 /** 9440 * Emit code for rule number 247: 9441 * stm: INT_IFCMP(REF_OR(r,r),INT_CONSTANT) 9442 * @param p BURS node to apply the rule to 9443 */ 9444 private void code247(AbstractBURS_TreeNode p) { 9445 CMP_ZERO(P(p), PPC_ORr, Binary.getResult(PL(p)), 9446 R(Binary.getVal1(PL(p))), Binary.getVal2(PL(p)), IfCmp.getCond(P(p))); 9447 } 9448 9449 /** 9450 * Emit code for rule number 248: 9451 * stm: INT_IFCMP(REF_XOR(r,r),INT_CONSTANT) 9452 * @param p BURS node to apply the rule to 9453 */ 9454 private void code248(AbstractBURS_TreeNode p) { 9455 CMP_ZERO(P(p), PPC_XORr, Binary.getResult(PL(p)), 9456 R(Binary.getVal1(PL(p))), Binary.getVal2(PL(p)), IfCmp.getCond(P(p))); 9457 } 9458 9459 /** 9460 * Emit code for rule number 249: 9461 * stm: INT_IFCMP(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 9462 * @param p BURS node to apply the rule to 9463 */ 9464 private void code249(AbstractBURS_TreeNode p) { 9465 CMP_ZERO(P(p), PPC_ANDISr, Binary.getResult(PL(p)), 9466 R(Binary.getVal1(PL(p))), 9467 SRI(IV(Move.getVal(PLR(p))), 16), IfCmp.getCond(P(p))); 9468 } 9469 9470 /** 9471 * Emit code for rule number 250: 9472 * stm: INT_IFCMP(REF_AND(r,REF_MOVE(INT_CONSTANT)),INT_CONSTANT) 9473 * @param p BURS node to apply the rule to 9474 */ 9475 private void code250(AbstractBURS_TreeNode p) { 9476 CMP_ZERO_AND_MASK(P(p), Binary.getResult(PL(p)), 9477 R(Binary.getVal1(PL(p))), 9478 IC(Move.getVal(PLR(p))), IfCmp.getCond(P(p))); 9479 } 9480 9481 /** 9482 * Emit code for rule number 251: 9483 * stm: INT_IFCMP(REF_ADD(r,INT_CONSTANT),INT_CONSTANT) 9484 * @param p BURS node to apply the rule to 9485 */ 9486 private void code251(AbstractBURS_TreeNode p) { 9487 CMP_ZERO(P(p), PPC_ADDICr, Binary.getResult(PL(p)), 9488 R(Binary.getVal1(PL(p))), Binary.getVal2(PL(p)), IfCmp.getCond(P(p))); 9489 } 9490 9491 /** 9492 * Emit code for rule number 252: 9493 * stm: INT_IFCMP(REF_AND(r,REF_NOT(r)),INT_CONSTANT) 9494 * @param p BURS node to apply the rule to 9495 */ 9496 private void code252(AbstractBURS_TreeNode p) { 9497 CMP_ZERO(P(p), PPC_ANDCr, Binary.getResult(PL(p)), 9498 R(Binary.getVal1(PL(p))), Unary.getVal(PLR(p)), IfCmp.getCond(P(p))); 9499 } 9500 9501 /** 9502 * Emit code for rule number 253: 9503 * stm: INT_IFCMP(REF_OR(r,REF_NOT(r)),INT_CONSTANT) 9504 * @param p BURS node to apply the rule to 9505 */ 9506 private void code253(AbstractBURS_TreeNode p) { 9507 CMP_ZERO(P(p), PPC_ORCr, Binary.getResult(PL(p)), 9508 R(Binary.getVal1(PL(p))), Unary.getVal(PLR(p)), IfCmp.getCond(P(p))); 9509 } 9510 9511 /** 9512 * Emit code for rule number 254: 9513 * czr: REF_AND(r,REF_MOVE(INT_CONSTANT)) 9514 * @param p BURS node to apply the rule to 9515 */ 9516 private void code254(AbstractBURS_TreeNode p) { 9517 EMIT(MIR_Binary.mutate(P(p), PPC_ANDISr, Binary.getResult(P(p)), 9518 R(Binary.getVal1(P(p))), IC(Bits.PPCMaskUpper16(VRL(p))))); 9519 } 9520 9521 /** 9522 * Emit code for rule number 255: 9523 * r: REF_AND(r,REF_MOVE(INT_CONSTANT)) 9524 * @param p BURS node to apply the rule to 9525 */ 9526 private void code255(AbstractBURS_TreeNode p) { 9527 AND_MASK(P(p), Binary.getResult(P(p)), R(Binary.getVal1(P(p))), IC(Move.getVal(PR(p)))); 9528 } 9529 9530 /** 9531 * Emit code for rule number 256: 9532 * r: REF_OR(r,REF_MOVE(INT_CONSTANT)) 9533 * @param p BURS node to apply the rule to 9534 */ 9535 private void code256(AbstractBURS_TreeNode p) { 9536 EMIT(MIR_Binary.mutate(P(p), PPC_ORIS, Binary.getResult(P(p)), R(Binary.getVal1(P(p))), SRI(IV(Move.getVal(PR(p))), 16))); 9537 } 9538 9539 /** 9540 * Emit code for rule number 257: 9541 * r: REF_OR(r,REF_MOVE(INT_CONSTANT)) 9542 * @param p BURS node to apply the rule to 9543 */ 9544 private void code257(AbstractBURS_TreeNode p) { 9545 { 9546 int c = IV(Move.getVal(PR(p))); 9547 EMIT(MIR_Binary.create(PPC_ORI, Binary.getResult(P(p)), 9548 R(Binary.getVal1(P(p))), ANDI(c, 0xffff))); 9549 EMIT(MIR_Binary.mutate(P(p), PPC_ORIS, Binary.getResult(P(p)).copyRO(), 9550 Binary.getResult(P(p)).copyRO(), SRI(c, 16))); 9551} 9552 } 9553 9554 /** 9555 * Emit code for rule number 258: 9556 * r: REF_XOR(r,REF_MOVE(INT_CONSTANT)) 9557 * @param p BURS node to apply the rule to 9558 */ 9559 private void code258(AbstractBURS_TreeNode p) { 9560 EMIT(MIR_Binary.mutate(P(p), PPC_XORIS, Binary.getResult(P(p)), 9561 R(Binary.getVal1(P(p))), SRI(IV(Move.getVal(PR(p))), 16))); 9562 } 9563 9564 /** 9565 * Emit code for rule number 259: 9566 * r: REF_MOVE(ADDRESS_CONSTANT) 9567 * @param p BURS node to apply the rule to 9568 */ 9569 private void code259(AbstractBURS_TreeNode p) { 9570 EMIT(MIR_Unary.mutate(P(p), PPC_LDI, Move.getResult(P(p)), CAL16(AV(Move.getVal(P(p)))))); 9571 } 9572 9573 /** 9574 * Emit code for rule number 260: 9575 * r: REF_MOVE(ADDRESS_CONSTANT) 9576 * @param p BURS node to apply the rule to 9577 */ 9578 private void code260(AbstractBURS_TreeNode p) { 9579 EMIT(MIR_Unary.mutate(P(p), PPC_LDIS, Move.getResult(P(p)), CAU16(AV(Move.getVal(P(p)))))); 9580 } 9581 9582 /** 9583 * Emit code for rule number 261: 9584 * r: REF_MOVE(ADDRESS_CONSTANT) 9585 * @param p BURS node to apply the rule to 9586 */ 9587 private void code261(AbstractBURS_TreeNode p) { 9588 { 9589 EMIT(MIR_Unary.create(PPC_LDIS, Move.getResult(P(p)), CAU16(AV(Move.getVal(P(p)))))); 9590 EMIT(MIR_Binary.mutate(P(p), PPC_ADDI, Move.getResult(P(p)).copyRO(), 9591 Move.getResult(P(p)).copyRO(), CAL16(AV(Move.getVal(P(p)))))); 9592} 9593 } 9594 9595 /** 9596 * Emit code for rule number 262: 9597 * r: LONG_LOAD(r,INT_CONSTANT) 9598 * @param p BURS node to apply the rule to 9599 */ 9600 private void code262(AbstractBURS_TreeNode p) { 9601 LONG_LOAD_addi(P(p), Load.getResult(P(p)), 9602 R(Load.getAddress(P(p))), IC(Load.getOffset(P(p))), 9603 Load.getLocation(P(p)), Load.getGuard(P(p))); 9604 } 9605 9606 /** 9607 * Emit code for rule number 263: 9608 * r: LONG_LOAD(r,REF_MOVE(ADDRESS_CONSTANT)) 9609 * @param p BURS node to apply the rule to 9610 */ 9611 private void code263(AbstractBURS_TreeNode p) { 9612 LONG_LOAD_addis(P(p), Load.getResult(P(p)), 9613 R(Load.getAddress(P(p))), 9614 R(Load.getOffset(P(p))), AC(Move.getVal(PR(p))), 9615 Load.getLocation(P(p)), Load.getGuard(P(p))); 9616 } 9617 9618 /** 9619 * Emit code for rule number 264: 9620 * r: LONG_LOAD(r,r) 9621 * @param p BURS node to apply the rule to 9622 */ 9623 private void code264(AbstractBURS_TreeNode p) { 9624 LONG_LOAD_addx(P(p), Load.getResult(P(p)), 9625 R(Load.getAddress(P(p))), R(Load.getOffset(P(p))), 9626 Load.getLocation(P(p)), Load.getGuard(P(p))); 9627 } 9628 9629 /** 9630 * Emit code for rule number 265: 9631 * stm: LONG_STORE(r,OTHER_OPERAND(r,INT_CONSTANT)) 9632 * @param p BURS node to apply the rule to 9633 */ 9634 private void code265(AbstractBURS_TreeNode p) { 9635 LONG_STORE_addi(P(p), R(Store.getValue(P(p))), 9636 R(Store.getAddress(P(p))), 9637 IC(Store.getOffset(P(p))), 9638 Store.getLocation(P(p)), 9639 Store.getGuard(P(p))); 9640 } 9641 9642 /** 9643 * Emit code for rule number 266: 9644 * stm: LONG_STORE(r,OTHER_OPERAND(r,REF_MOVE(ADDRESS_CONSTANT))) 9645 * @param p BURS node to apply the rule to 9646 */ 9647 private void code266(AbstractBURS_TreeNode p) { 9648 LONG_STORE_addis(P(p), R(Store.getValue(P(p))), 9649 R(Store.getAddress(P(p))), 9650 R(Store.getOffset(P(p))), 9651 AC(Move.getVal(PRR(p))), 9652 Store.getLocation(P(p)), 9653 Store.getGuard(P(p))); 9654 } 9655 9656 /** 9657 * Emit code for rule number 267: 9658 * stm: LONG_STORE(r,OTHER_OPERAND(r,r)) 9659 * @param p BURS node to apply the rule to 9660 */ 9661 private void code267(AbstractBURS_TreeNode p) { 9662 LONG_STORE_addx(P(p), R(Store.getValue(P(p))), 9663 R(Store.getAddress(P(p))), 9664 R(Store.getOffset(P(p))), 9665 Store.getLocation(P(p)), 9666 Store.getGuard(P(p))); 9667 } 9668 9669 /** 9670 * Emit code for rule number 268: 9671 * r: PREPARE_ADDR(r, r) 9672 * @param p BURS node to apply the rule to 9673 */ 9674 private void code268(AbstractBURS_TreeNode p) { 9675 EMIT(MIR_Load.mutate(P(p), PPC_LWARX, Prepare.getResult(P(p)), 9676 R(Prepare.getAddress(P(p))), Prepare.getOffset(P(p)), 9677 Prepare.getLocation(P(p)), 9678 Prepare.getGuard(P(p)))); 9679 } 9680 9681 /** 9682 * Emit code for rule number 269: 9683 * r: ATTEMPT_ADDR(r, r) 9684 * @param p BURS node to apply the rule to 9685 */ 9686 private void code269(AbstractBURS_TreeNode p) { 9687 EMIT(P(p)); // Leave for ComplexLIR2MIRExpansion 9688 } 9689 9690 /** 9691 * Emit code using given rule number 9692 * 9693 * @param p the tree that's being emitted 9694 * @param n the non-terminal goal of that tree 9695 * @param ruleno the rule that will generate the tree 9696 */ 9697 @Override 9698 public void code(AbstractBURS_TreeNode p, int n, int ruleno) { 9699 switch(unsortedErnMap[ruleno]) { 9700 case 14: code14(p); break; 9701 case 15: code15(p); break; 9702 case 16: code16(p); break; 9703 case 17: code17(p); break; 9704 case 18: code18(p); break; 9705 case 19: code19(p); break; 9706 case 20: code20(p); break; 9707 case 21: code21(p); break; 9708 case 23: code23(p); break; 9709 case 24: code24(p); break; 9710 case 25: code25(p); break; 9711 case 26: code26(p); break; 9712 case 27: code27(p); break; 9713 case 28: code28(p); break; 9714 case 29: code29(p); break; 9715 case 30: code30(p); break; 9716 case 31: code31(p); break; 9717 case 32: code32(p); break; 9718 case 33: code33(p); break; 9719 case 34: code34(p); break; 9720 case 35: code35(p); break; 9721 case 36: code36(p); break; 9722 case 37: code37(p); break; 9723 case 38: code38(p); break; 9724 case 39: code39(p); break; 9725 case 40: code40(p); break; 9726 case 41: code41(p); break; 9727 case 42: code42(p); break; 9728 case 43: code43(p); break; 9729 case 44: code44(p); break; 9730 case 45: code45(p); break; 9731 case 46: code46(p); break; 9732 case 47: code47(p); break; 9733 case 48: code48(p); break; 9734 case 49: code49(p); break; 9735 case 50: code50(p); break; 9736 case 52: code52(p); break; 9737 case 54: code54(p); break; 9738 case 55: code55(p); break; 9739 case 56: code56(p); break; 9740 case 57: code57(p); break; 9741 case 58: code58(p); break; 9742 case 59: code59(p); break; 9743 case 60: code60(p); break; 9744 case 61: code61(p); break; 9745 case 62: code62(p); break; 9746 case 63: code63(p); break; 9747 case 64: code64(p); break; 9748 case 65: code65(p); break; 9749 case 66: code66(p); break; 9750 case 67: code67(p); break; 9751 case 68: code68(p); break; 9752 case 69: code69(p); break; 9753 case 70: code70(p); break; 9754 case 71: code71(p); break; 9755 case 72: code72(p); break; 9756 case 73: code73(p); break; 9757 case 74: code74(p); break; 9758 case 75: code75(p); break; 9759 case 76: code76(p); break; 9760 case 77: code77(p); break; 9761 case 78: code78(p); break; 9762 case 79: code79(p); break; 9763 case 80: code80(p); break; 9764 case 81: code81(p); break; 9765 case 82: code82(p); break; 9766 case 83: code83(p); break; 9767 case 84: code84(p); break; 9768 case 85: code85(p); break; 9769 case 86: code86(p); break; 9770 case 87: code87(p); break; 9771 case 88: code88(p); break; 9772 case 89: code89(p); break; 9773 case 90: code90(p); break; 9774 case 91: code91(p); break; 9775 case 92: code92(p); break; 9776 case 93: code93(p); break; 9777 case 94: code94(p); break; 9778 case 95: code95(p); break; 9779 case 96: code96(p); break; 9780 case 97: code97(p); break; 9781 case 98: code98(p); break; 9782 case 99: code99(p); break; 9783 case 100: code100(p); break; 9784 case 101: code101(p); break; 9785 case 102: code102(p); break; 9786 case 103: code103(p); break; 9787 case 104: code104(p); break; 9788 case 105: code105(p); break; 9789 case 106: code106(p); break; 9790 case 107: code107(p); break; 9791 case 108: code108(p); break; 9792 case 109: code109(p); break; 9793 case 110: code110(p); break; 9794 case 111: code111(p); break; 9795 case 112: code112(p); break; 9796 case 113: code113(p); break; 9797 case 114: code114(p); break; 9798 case 115: code115(p); break; 9799 case 116: code116(p); break; 9800 case 117: code117(p); break; 9801 case 118: code118(p); break; 9802 case 119: code119(p); break; 9803 case 120: code120(p); break; 9804 case 121: code121(p); break; 9805 case 122: code122(p); break; 9806 case 123: code123(p); break; 9807 case 124: code124(p); break; 9808 case 125: code125(p); break; 9809 case 126: code126(p); break; 9810 case 127: code127(p); break; 9811 case 128: code128(p); break; 9812 case 129: code129(p); break; 9813 case 130: code130(p); break; 9814 case 131: code131(p); break; 9815 case 132: code132(p); break; 9816 case 133: code133(p); break; 9817 case 134: code134(p); break; 9818 case 135: code135(p); break; 9819 case 136: code136(p); break; 9820 case 137: code137(p); break; 9821 case 138: code138(p); break; 9822 case 139: code139(p); break; 9823 case 140: code140(p); break; 9824 case 141: code141(p); break; 9825 case 142: code142(p); break; 9826 case 143: code143(p); break; 9827 case 144: code144(p); break; 9828 case 145: code145(p); break; 9829 case 146: code146(p); break; 9830 case 147: code147(p); break; 9831 case 148: code148(p); break; 9832 case 149: code149(p); break; 9833 case 150: code150(p); break; 9834 case 151: code151(p); break; 9835 case 152: code152(p); break; 9836 case 153: code153(p); break; 9837 case 154: code154(p); break; 9838 case 155: code155(p); break; 9839 case 156: code156(p); break; 9840 case 157: code157(p); break; 9841 case 158: code158(p); break; 9842 case 159: code159(p); break; 9843 case 160: code160(p); break; 9844 case 161: code161(p); break; 9845 case 162: code162(p); break; 9846 case 163: code163(p); break; 9847 case 164: code164(p); break; 9848 case 165: code165(p); break; 9849 case 166: code166(p); break; 9850 case 167: code167(p); break; 9851 case 168: code168(p); break; 9852 case 169: code169(p); break; 9853 case 170: code170(p); break; 9854 case 171: code171(p); break; 9855 case 172: code172(p); break; 9856 case 173: code173(p); break; 9857 case 174: code174(p); break; 9858 case 175: code175(p); break; 9859 case 176: code176(p); break; 9860 case 177: code177(p); break; 9861 case 178: code178(p); break; 9862 case 179: code179(p); break; 9863 case 180: code180(p); break; 9864 case 181: code181(p); break; 9865 case 182: code182(p); break; 9866 case 183: code183(p); break; 9867 case 184: code184(p); break; 9868 case 185: code185(p); break; 9869 case 186: code186(p); break; 9870 case 187: code187(p); break; 9871 case 188: code188(p); break; 9872 case 189: code189(p); break; 9873 case 190: code190(p); break; 9874 case 191: code191(p); break; 9875 case 192: code192(p); break; 9876 case 193: code193(p); break; 9877 case 194: code194(p); break; 9878 case 195: code195(p); break; 9879 case 196: code196(p); break; 9880 case 197: code197(p); break; 9881 case 198: code198(p); break; 9882 case 199: code199(p); break; 9883 case 200: code200(p); break; 9884 case 201: code201(p); break; 9885 case 202: code202(p); break; 9886 case 203: code203(p); break; 9887 case 204: code204(p); break; 9888 case 205: code205(p); break; 9889 case 206: code206(p); break; 9890 case 207: code207(p); break; 9891 case 208: code208(p); break; 9892 case 209: code209(p); break; 9893 case 210: code210(p); break; 9894 case 211: code211(p); break; 9895 case 213: code213(p); break; 9896 case 214: code214(p); break; 9897 case 215: code215(p); break; 9898 case 216: code216(p); break; 9899 case 217: code217(p); break; 9900 case 218: code218(p); break; 9901 case 219: code219(p); break; 9902 case 220: code220(p); break; 9903 case 221: code221(p); break; 9904 case 222: code222(p); break; 9905 case 223: code223(p); break; 9906 case 224: code224(p); break; 9907 case 225: code225(p); break; 9908 case 226: code226(p); break; 9909 case 227: code227(p); break; 9910 case 228: code228(p); break; 9911 case 229: code229(p); break; 9912 case 230: code230(p); break; 9913 case 231: code231(p); break; 9914 case 232: code232(p); break; 9915 case 233: code233(p); break; 9916 case 234: code234(p); break; 9917 case 235: code235(p); break; 9918 case 236: code236(p); break; 9919 case 237: code237(p); break; 9920 case 238: code238(p); break; 9921 case 239: code239(p); break; 9922 case 240: code240(p); break; 9923 case 241: code241(p); break; 9924 case 242: code242(p); break; 9925 case 243: code243(p); break; 9926 case 244: code244(p); break; 9927 case 245: code245(p); break; 9928 case 246: code246(p); break; 9929 case 247: code247(p); break; 9930 case 248: code248(p); break; 9931 case 249: code249(p); break; 9932 case 250: code250(p); break; 9933 case 251: code251(p); break; 9934 case 252: code252(p); break; 9935 case 253: code253(p); break; 9936 case 254: code254(p); break; 9937 case 255: code255(p); break; 9938 case 256: code256(p); break; 9939 case 257: code257(p); break; 9940 case 258: code258(p); break; 9941 case 259: code259(p); break; 9942 case 260: code260(p); break; 9943 case 261: code261(p); break; 9944 case 262: code262(p); break; 9945 case 263: code263(p); break; 9946 case 264: code264(p); break; 9947 case 265: code265(p); break; 9948 case 266: code266(p); break; 9949 case 267: code267(p); break; 9950 case 268: code268(p); break; 9951 case 269: code269(p); break; 9952 default: 9953 throw new OptimizingCompilerException("BURS", "rule " + ruleno + " without emit code:", 9954 BURS_Debug.string[unsortedErnMap[ruleno]]); 9955 } 9956 } 9957}