001 002 /* 003 * THIS FILE IS MACHINE_GENERATED. DO NOT EDIT. 004 * See InstructionFormats.template, InstructionFormatList.dat, 005 * OperatorList.dat, etc. 006 */ 007 008 package org.jikesrvm.compilers.opt.ir; 009 010 import org.jikesrvm.Configuration; 011 import org.jikesrvm.compilers.opt.ir.operand.ia32.IA32ConditionOperand; //NOPMD 012 import org.jikesrvm.compilers.opt.ir.operand.*; 013 014 /** 015 * The Call InstructionFormat class. 016 * 017 * The header comment for {@link Instruction} contains 018 * an explanation of the role of InstructionFormats in the 019 * opt compiler's IR. 020 */ 021 @SuppressWarnings("unused") // Machine generated code is never 100% clean 022 public final class Call extends InstructionFormat { 023 /** 024 * InstructionFormat identification method for Call. 025 * @param i an instruction 026 * @return <code>true</code> if the InstructionFormat of the argument 027 * instruction is Call or <code>false</code> 028 * if it is not. 029 */ 030 public static boolean conforms(Instruction i) { 031 return conforms(i.operator); 032 } 033 /** 034 * InstructionFormat identification method for Call. 035 * @param o an instruction 036 * @return <code>true</code> if the InstructionFormat of the argument 037 * operator is Call or <code>false</code> 038 * if it is not. 039 */ 040 public static boolean conforms(Operator o) { 041 return o.format == Call_format; 042 } 043 044 /** 045 * Get the operand called Result from the 046 * argument instruction. Note that the returned operand 047 * will still point to its containing instruction. 048 * @param i the instruction to fetch the operand from 049 * @return the operand called Result 050 */ 051 public static RegisterOperand getResult(Instruction i) { 052 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 053 return (RegisterOperand) i.getOperand(0); 054 } 055 /** 056 * Get the operand called Result from the argument 057 * instruction clearing its instruction pointer. The returned 058 * operand will not point to any containing instruction. 059 * @param i the instruction to fetch the operand from 060 * @return the operand called Result 061 */ 062 public static RegisterOperand getClearResult(Instruction i) { 063 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 064 return (RegisterOperand) i.getClearOperand(0); 065 } 066 /** 067 * Set the operand called Result in the argument 068 * instruction to the argument operand. The operand will 069 * now point to the argument instruction as its containing 070 * instruction. 071 * @param i the instruction in which to store the operand 072 * @param Result the operand to store 073 */ 074 public static void setResult(Instruction i, RegisterOperand Result) { 075 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 076 i.putOperand(0, Result); 077 } 078 /** 079 * Return the index of the operand called Result 080 * in the argument instruction. 081 * @param i the instruction to access. 082 * @return the index of the operand called Result 083 * in the argument instruction 084 */ 085 public static int indexOfResult(Instruction i) { 086 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 087 return 0; 088 } 089 /** 090 * Does the argument instruction have a non-null 091 * operand named Result? 092 * @param i the instruction to access. 093 * @return <code>true</code> if the instruction has an non-null 094 * operand named Result or <code>false</code> 095 * if it does not. 096 */ 097 public static boolean hasResult(Instruction i) { 098 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 099 return i.getOperand(0) != null; 100 } 101 102 /** 103 * Get the operand called Address from the 104 * argument instruction. Note that the returned operand 105 * will still point to its containing instruction. 106 * @param i the instruction to fetch the operand from 107 * @return the operand called Address 108 */ 109 public static Operand getAddress(Instruction i) { 110 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 111 return (Operand) i.getOperand(1); 112 } 113 /** 114 * Get the operand called Address from the argument 115 * instruction clearing its instruction pointer. The returned 116 * operand will not point to any containing instruction. 117 * @param i the instruction to fetch the operand from 118 * @return the operand called Address 119 */ 120 public static Operand getClearAddress(Instruction i) { 121 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 122 return (Operand) i.getClearOperand(1); 123 } 124 /** 125 * Set the operand called Address in the argument 126 * instruction to the argument operand. The operand will 127 * now point to the argument instruction as its containing 128 * instruction. 129 * @param i the instruction in which to store the operand 130 * @param Address the operand to store 131 */ 132 public static void setAddress(Instruction i, Operand Address) { 133 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 134 i.putOperand(1, Address); 135 } 136 /** 137 * Return the index of the operand called Address 138 * in the argument instruction. 139 * @param i the instruction to access. 140 * @return the index of the operand called Address 141 * in the argument instruction 142 */ 143 public static int indexOfAddress(Instruction i) { 144 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 145 return 1; 146 } 147 /** 148 * Does the argument instruction have a non-null 149 * operand named Address? 150 * @param i the instruction to access. 151 * @return <code>true</code> if the instruction has an non-null 152 * operand named Address or <code>false</code> 153 * if it does not. 154 */ 155 public static boolean hasAddress(Instruction i) { 156 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 157 return i.getOperand(1) != null; 158 } 159 160 /** 161 * Get the operand called Method from the 162 * argument instruction. Note that the returned operand 163 * will still point to its containing instruction. 164 * @param i the instruction to fetch the operand from 165 * @return the operand called Method 166 */ 167 public static MethodOperand getMethod(Instruction i) { 168 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 169 return (MethodOperand) i.getOperand(2); 170 } 171 /** 172 * Get the operand called Method from the argument 173 * instruction clearing its instruction pointer. The returned 174 * operand will not point to any containing instruction. 175 * @param i the instruction to fetch the operand from 176 * @return the operand called Method 177 */ 178 public static MethodOperand getClearMethod(Instruction i) { 179 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 180 return (MethodOperand) i.getClearOperand(2); 181 } 182 /** 183 * Set the operand called Method in the argument 184 * instruction to the argument operand. The operand will 185 * now point to the argument instruction as its containing 186 * instruction. 187 * @param i the instruction in which to store the operand 188 * @param Method the operand to store 189 */ 190 public static void setMethod(Instruction i, MethodOperand Method) { 191 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 192 i.putOperand(2, Method); 193 } 194 /** 195 * Return the index of the operand called Method 196 * in the argument instruction. 197 * @param i the instruction to access. 198 * @return the index of the operand called Method 199 * in the argument instruction 200 */ 201 public static int indexOfMethod(Instruction i) { 202 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 203 return 2; 204 } 205 /** 206 * Does the argument instruction have a non-null 207 * operand named Method? 208 * @param i the instruction to access. 209 * @return <code>true</code> if the instruction has an non-null 210 * operand named Method or <code>false</code> 211 * if it does not. 212 */ 213 public static boolean hasMethod(Instruction i) { 214 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 215 return i.getOperand(2) != null; 216 } 217 218 /** 219 * Get the operand called Guard from the 220 * argument instruction. Note that the returned operand 221 * will still point to its containing instruction. 222 * @param i the instruction to fetch the operand from 223 * @return the operand called Guard 224 */ 225 public static Operand getGuard(Instruction i) { 226 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 227 return (Operand) i.getOperand(3); 228 } 229 /** 230 * Get the operand called Guard from the argument 231 * instruction clearing its instruction pointer. The returned 232 * operand will not point to any containing instruction. 233 * @param i the instruction to fetch the operand from 234 * @return the operand called Guard 235 */ 236 public static Operand getClearGuard(Instruction i) { 237 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 238 return (Operand) i.getClearOperand(3); 239 } 240 /** 241 * Set the operand called Guard in the argument 242 * instruction to the argument operand. The operand will 243 * now point to the argument instruction as its containing 244 * instruction. 245 * @param i the instruction in which to store the operand 246 * @param Guard the operand to store 247 */ 248 public static void setGuard(Instruction i, Operand Guard) { 249 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 250 i.putOperand(3, Guard); 251 } 252 /** 253 * Return the index of the operand called Guard 254 * in the argument instruction. 255 * @param i the instruction to access. 256 * @return the index of the operand called Guard 257 * in the argument instruction 258 */ 259 public static int indexOfGuard(Instruction i) { 260 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 261 return 3; 262 } 263 /** 264 * Does the argument instruction have a non-null 265 * operand named Guard? 266 * @param i the instruction to access. 267 * @return <code>true</code> if the instruction has an non-null 268 * operand named Guard or <code>false</code> 269 * if it does not. 270 */ 271 public static boolean hasGuard(Instruction i) { 272 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 273 return i.getOperand(3) != null; 274 } 275 276 /** 277 * Get the k'th operand called Param from the 278 * argument instruction. Note that the returned operand 279 * will still point to its containing instruction. 280 * @param i the instruction to fetch the operand from 281 * @param k the index of the operand 282 * @return the k'th operand called Param 283 */ 284 public static Operand getParam(Instruction i, int k) { 285 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 286 return (Operand) i.getOperand(4+k); 287 } 288 /** 289 * Get the k'th operand called Param from the argument 290 * instruction clearing its instruction pointer. The returned 291 * operand will not point to any containing instruction. 292 * @param i the instruction to fetch the operand from 293 * @param k the index of the operand 294 * @return the k'th operand called Param 295 */ 296 public static Operand getClearParam(Instruction i, int k) { 297 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 298 return (Operand) i.getClearOperand(4+k); 299 } 300 /** 301 * Set the k'th operand called Param in the argument 302 * instruction to the argument operand. The operand will 303 * now point to the argument instruction as its containing 304 * instruction. 305 * @param i the instruction in which to store the operand 306 * @param k the index of the operand 307 * @param o the operand to store 308 */ 309 public static void setParam(Instruction i, int k, Operand o) { 310 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 311 i.putOperand(4+k, o); 312 } 313 /** 314 * Return the index of the k'th operand called Param 315 * in the argument instruction. 316 * @param i the instruction to access. 317 * @param k the index of the operand. 318 * @return the index of the k'th operand called Param 319 * in the argument instruction 320 */ 321 public static int indexOfParam(Instruction i, int k) { 322 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 323 return 4+k; 324 } 325 /** 326 * Does the argument instruction have a non-null 327 * k'th operand named Param? 328 * @param i the instruction to access. 329 * @param k the index of the operand. 330 * @return <code>true</code> if the instruction has an non-null 331 * k'th operand named Param or <code>false</code> 332 * if it does not. 333 */ 334 public static boolean hasParam(Instruction i, int k) { 335 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 336 return i.getOperand(4+k) != null; 337 } 338 339 /** 340 * Return the index of the first operand called Param 341 * in the argument instruction. 342 * @param i the instruction to access. 343 * @return the index of the first operand called Param 344 * in the argument instruction 345 */ 346 public static int indexOfParams(Instruction i) 347 { 348 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 349 return 4; 350 } 351 /** 352 * Does the argument instruction have any operands 353 * named Param? 354 * @param i the instruction to access. 355 * @return <code>true</code> if the instruction has operands 356 * named Param or <code>false</code> if it does not. 357 */ 358 public static boolean hasParams(Instruction i) 359 { 360 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 361 return i.getNumberOfOperands()-4 > 0 && i.getOperand(4) != null; 362 } 363 364 /** 365 * How many variable-length operands called Params 366 * does the argument instruction have? 367 * @param i the instruction to access 368 * @return the number of operands called Params the instruction has 369 */ 370 public static int getNumberOfParams(Instruction i) 371 { 372 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 373 return i.getNumberOfOperands()-4; 374 } 375 376 /** 377 * Change the number of Params that may be stored in 378 * the argument instruction to numVarOps. 379 * @param i the instruction to access 380 * @param numVarOps the new number of variable operands called Params 381 * that may be stored in the instruction 382 */ 383 public static void resizeNumberOfParams(Instruction i, int numVarOps) 384 { 385 if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Call"); 386 if (4+numVarOps>MIN_OPERAND_ARRAY_LENGTH) 387 i.resizeNumberOfOperands(4+numVarOps); 388 else 389 for (int j = 4+numVarOps; j < MIN_OPERAND_ARRAY_LENGTH; j++) 390 i.putOperand(j, null); 391 } 392 393 /** 394 * Create an instruction of the Call instruction format. 395 * @param o the instruction's operator 396 * @param Result the instruction's Result operand 397 * @param Address the instruction's Address operand 398 * @param Method the instruction's Method operand 399 * @param Guard the instruction's Guard operand 400 * @param numVarOps the number of variable length operands that 401 * will be stored in the insruction. 402 * @return the newly created Call instruction 403 */ 404 public static Instruction create(Operator o 405 , RegisterOperand Result 406 , Operand Address 407 , MethodOperand Method 408 , Operand Guard 409 , int numVarOps 410 ) 411 { 412 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 413 Instruction i = new Instruction(o, Math.max(4+numVarOps, MIN_OPERAND_ARRAY_LENGTH)); 414 i.putOperand(0, Result); 415 i.putOperand(1, Address); 416 i.putOperand(2, Method); 417 i.putOperand(3, Guard); 418 return i; 419 } 420 /** 421 * Create an instruction of the Call instruction format 422 * with 0 variable arguments. 423 * @param o the instruction's operator 424 * @param Result the instruction's Result operand 425 * @param Address the instruction's Address operand 426 * @param Method the instruction's Method operand 427 * @param Guard the instruction's Guard operand 428 * @return the newly created Call instruction 429 */ 430 public static Instruction create0(Operator o 431 , RegisterOperand Result 432 , Operand Address 433 , MethodOperand Method 434 , Operand Guard 435 ) 436 { 437 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 438 Instruction i = new Instruction(o, 5); 439 i.putOperand(0, Result); 440 i.putOperand(1, Address); 441 i.putOperand(2, Method); 442 i.putOperand(3, Guard); 443 return i; 444 } 445 /** 446 * Create an instruction of the Call instruction format 447 * with 1 variable arguments. 448 * @param o the instruction's operator 449 * @param Result the instruction's Result operand 450 * @param Address the instruction's Address operand 451 * @param Method the instruction's Method operand 452 * @param Guard the instruction's Guard operand 453 * @param Param_1 the k'th variable argument called Param 454 * @return the newly created Call instruction 455 */ 456 public static Instruction create1(Operator o 457 , RegisterOperand Result 458 , Operand Address 459 , MethodOperand Method 460 , Operand Guard 461 , Operand Param_1 462 ) 463 { 464 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 465 Instruction i = new Instruction(o, 5); 466 i.putOperand(0, Result); 467 i.putOperand(1, Address); 468 i.putOperand(2, Method); 469 i.putOperand(3, Guard); 470 i.putOperand(4, Param_1); 471 return i; 472 } 473 /** 474 * Create an instruction of the Call instruction format 475 * with 2 variable arguments. 476 * @param o the instruction's operator 477 * @param Result the instruction's Result operand 478 * @param Address the instruction's Address operand 479 * @param Method the instruction's Method operand 480 * @param Guard the instruction's Guard operand 481 * @param Param_1 the k'th variable argument called Param 482 * @param Param_2 the k'th variable argument called Param 483 * @return the newly created Call instruction 484 */ 485 public static Instruction create2(Operator o 486 , RegisterOperand Result 487 , Operand Address 488 , MethodOperand Method 489 , Operand Guard 490 , Operand Param_1 491 , Operand Param_2 492 ) 493 { 494 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 495 Instruction i = new Instruction(o, 6); 496 i.putOperand(0, Result); 497 i.putOperand(1, Address); 498 i.putOperand(2, Method); 499 i.putOperand(3, Guard); 500 i.putOperand(4, Param_1); 501 i.putOperand(5, Param_2); 502 return i; 503 } 504 /** 505 * Create an instruction of the Call instruction format 506 * with 3 variable arguments. 507 * @param o the instruction's operator 508 * @param Result the instruction's Result operand 509 * @param Address the instruction's Address operand 510 * @param Method the instruction's Method operand 511 * @param Guard the instruction's Guard operand 512 * @param Param_1 the k'th variable argument called Param 513 * @param Param_2 the k'th variable argument called Param 514 * @param Param_3 the k'th variable argument called Param 515 * @return the newly created Call instruction 516 */ 517 public static Instruction create3(Operator o 518 , RegisterOperand Result 519 , Operand Address 520 , MethodOperand Method 521 , Operand Guard 522 , Operand Param_1 523 , Operand Param_2 524 , Operand Param_3 525 ) 526 { 527 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 528 Instruction i = new Instruction(o, 7); 529 i.putOperand(0, Result); 530 i.putOperand(1, Address); 531 i.putOperand(2, Method); 532 i.putOperand(3, Guard); 533 i.putOperand(4, Param_1); 534 i.putOperand(5, Param_2); 535 i.putOperand(6, Param_3); 536 return i; 537 } 538 /** 539 * Create an instruction of the Call instruction format 540 * with 4 variable arguments. 541 * @param o the instruction's operator 542 * @param Result the instruction's Result operand 543 * @param Address the instruction's Address operand 544 * @param Method the instruction's Method operand 545 * @param Guard the instruction's Guard operand 546 * @param Param_1 the k'th variable argument called Param 547 * @param Param_2 the k'th variable argument called Param 548 * @param Param_3 the k'th variable argument called Param 549 * @param Param_4 the k'th variable argument called Param 550 * @return the newly created Call instruction 551 */ 552 public static Instruction create4(Operator o 553 , RegisterOperand Result 554 , Operand Address 555 , MethodOperand Method 556 , Operand Guard 557 , Operand Param_1 558 , Operand Param_2 559 , Operand Param_3 560 , Operand Param_4 561 ) 562 { 563 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 564 Instruction i = new Instruction(o, 8); 565 i.putOperand(0, Result); 566 i.putOperand(1, Address); 567 i.putOperand(2, Method); 568 i.putOperand(3, Guard); 569 i.putOperand(4, Param_1); 570 i.putOperand(5, Param_2); 571 i.putOperand(6, Param_3); 572 i.putOperand(7, Param_4); 573 return i; 574 } 575 /** 576 * Create an instruction of the Call instruction format 577 * with 5 variable arguments. 578 * @param o the instruction's operator 579 * @param Result the instruction's Result operand 580 * @param Address the instruction's Address operand 581 * @param Method the instruction's Method operand 582 * @param Guard the instruction's Guard operand 583 * @param Param_1 the k'th variable argument called Param 584 * @param Param_2 the k'th variable argument called Param 585 * @param Param_3 the k'th variable argument called Param 586 * @param Param_4 the k'th variable argument called Param 587 * @param Param_5 the k'th variable argument called Param 588 * @return the newly created Call instruction 589 */ 590 public static Instruction create5(Operator o 591 , RegisterOperand Result 592 , Operand Address 593 , MethodOperand Method 594 , Operand Guard 595 , Operand Param_1 596 , Operand Param_2 597 , Operand Param_3 598 , Operand Param_4 599 , Operand Param_5 600 ) 601 { 602 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 603 Instruction i = new Instruction(o, 9); 604 i.putOperand(0, Result); 605 i.putOperand(1, Address); 606 i.putOperand(2, Method); 607 i.putOperand(3, Guard); 608 i.putOperand(4, Param_1); 609 i.putOperand(5, Param_2); 610 i.putOperand(6, Param_3); 611 i.putOperand(7, Param_4); 612 i.putOperand(8, Param_5); 613 return i; 614 } 615 /** 616 * Create an instruction of the Call instruction format 617 * with 6 variable arguments. 618 * @param o the instruction's operator 619 * @param Result the instruction's Result operand 620 * @param Address the instruction's Address operand 621 * @param Method the instruction's Method operand 622 * @param Guard the instruction's Guard operand 623 * @param Param_1 the k'th variable argument called Param 624 * @param Param_2 the k'th variable argument called Param 625 * @param Param_3 the k'th variable argument called Param 626 * @param Param_4 the k'th variable argument called Param 627 * @param Param_5 the k'th variable argument called Param 628 * @param Param_6 the k'th variable argument called Param 629 * @return the newly created Call instruction 630 */ 631 public static Instruction create6(Operator o 632 , RegisterOperand Result 633 , Operand Address 634 , MethodOperand Method 635 , Operand Guard 636 , Operand Param_1 637 , Operand Param_2 638 , Operand Param_3 639 , Operand Param_4 640 , Operand Param_5 641 , Operand Param_6 642 ) 643 { 644 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 645 Instruction i = new Instruction(o, 10); 646 i.putOperand(0, Result); 647 i.putOperand(1, Address); 648 i.putOperand(2, Method); 649 i.putOperand(3, Guard); 650 i.putOperand(4, Param_1); 651 i.putOperand(5, Param_2); 652 i.putOperand(6, Param_3); 653 i.putOperand(7, Param_4); 654 i.putOperand(8, Param_5); 655 i.putOperand(9, Param_6); 656 return i; 657 } 658 /** 659 * Create an instruction of the Call instruction format 660 * with 7 variable arguments. 661 * @param o the instruction's operator 662 * @param Result the instruction's Result operand 663 * @param Address the instruction's Address operand 664 * @param Method the instruction's Method operand 665 * @param Guard the instruction's Guard operand 666 * @param Param_1 the k'th variable argument called Param 667 * @param Param_2 the k'th variable argument called Param 668 * @param Param_3 the k'th variable argument called Param 669 * @param Param_4 the k'th variable argument called Param 670 * @param Param_5 the k'th variable argument called Param 671 * @param Param_6 the k'th variable argument called Param 672 * @param Param_7 the k'th variable argument called Param 673 * @return the newly created Call instruction 674 */ 675 public static Instruction create7(Operator o 676 , RegisterOperand Result 677 , Operand Address 678 , MethodOperand Method 679 , Operand Guard 680 , Operand Param_1 681 , Operand Param_2 682 , Operand Param_3 683 , Operand Param_4 684 , Operand Param_5 685 , Operand Param_6 686 , Operand Param_7 687 ) 688 { 689 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 690 Instruction i = new Instruction(o, 11); 691 i.putOperand(0, Result); 692 i.putOperand(1, Address); 693 i.putOperand(2, Method); 694 i.putOperand(3, Guard); 695 i.putOperand(4, Param_1); 696 i.putOperand(5, Param_2); 697 i.putOperand(6, Param_3); 698 i.putOperand(7, Param_4); 699 i.putOperand(8, Param_5); 700 i.putOperand(9, Param_6); 701 i.putOperand(10, Param_7); 702 return i; 703 } 704 /** 705 * Create an instruction of the Call instruction format 706 * with 8 variable arguments. 707 * @param o the instruction's operator 708 * @param Result the instruction's Result operand 709 * @param Address the instruction's Address operand 710 * @param Method the instruction's Method operand 711 * @param Guard the instruction's Guard operand 712 * @param Param_1 the k'th variable argument called Param 713 * @param Param_2 the k'th variable argument called Param 714 * @param Param_3 the k'th variable argument called Param 715 * @param Param_4 the k'th variable argument called Param 716 * @param Param_5 the k'th variable argument called Param 717 * @param Param_6 the k'th variable argument called Param 718 * @param Param_7 the k'th variable argument called Param 719 * @param Param_8 the k'th variable argument called Param 720 * @return the newly created Call instruction 721 */ 722 public static Instruction create8(Operator o 723 , RegisterOperand Result 724 , Operand Address 725 , MethodOperand Method 726 , Operand Guard 727 , Operand Param_1 728 , Operand Param_2 729 , Operand Param_3 730 , Operand Param_4 731 , Operand Param_5 732 , Operand Param_6 733 , Operand Param_7 734 , Operand Param_8 735 ) 736 { 737 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 738 Instruction i = new Instruction(o, 12); 739 i.putOperand(0, Result); 740 i.putOperand(1, Address); 741 i.putOperand(2, Method); 742 i.putOperand(3, Guard); 743 i.putOperand(4, Param_1); 744 i.putOperand(5, Param_2); 745 i.putOperand(6, Param_3); 746 i.putOperand(7, Param_4); 747 i.putOperand(8, Param_5); 748 i.putOperand(9, Param_6); 749 i.putOperand(10, Param_7); 750 i.putOperand(11, Param_8); 751 return i; 752 } 753 754 /** 755 * Mutate the argument instruction into an instruction of the 756 * Call instruction format having the specified 757 * operator and operands. 758 * @param i the instruction to mutate 759 * @param o the instruction's operator 760 * @param Result the instruction's Result operand 761 * @param Address the instruction's Address operand 762 * @param Method the instruction's Method operand 763 * @param Guard the instruction's Guard operand 764 * @param numVarOps the number of variable length operands that 765 * will be stored in the insruction. 766 * @return the mutated instruction 767 */ 768 public static Instruction mutate(Instruction i, Operator o 769 , RegisterOperand Result 770 , Operand Address 771 , MethodOperand Method 772 , Operand Guard 773 , int numVarOps 774 ) 775 { 776 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 777 if (4+numVarOps>MIN_OPERAND_ARRAY_LENGTH) 778 i.resizeNumberOfOperands(4+numVarOps); 779 780 i.operator = o; 781 i.putOperand(0, Result); 782 i.putOperand(1, Address); 783 i.putOperand(2, Method); 784 i.putOperand(3, Guard); 785 return i; 786 } 787 /** 788 * Mutate the argument instruction into an instruction of the 789 * Call instruction format having the specified 790 * operator, operands, and number of variable-length operands. 791 * @param Result the instruction's Result operand 792 * @param Address the instruction's Address operand 793 * @param Method the instruction's Method operand 794 * @param Guard the instruction's Guard operand 795 * @return the mutated instruction 796 */ 797 public static Instruction mutate0(Instruction i, Operator o 798 , RegisterOperand Result 799 , Operand Address 800 , MethodOperand Method 801 , Operand Guard 802 ) 803 { 804 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 805 i.operator = o; 806 i.putOperand(0, Result); 807 i.putOperand(1, Address); 808 i.putOperand(2, Method); 809 i.putOperand(3, Guard); 810 return i; 811 } 812 /** 813 * Mutate the argument instruction into an instruction of the 814 * Call instruction format having the specified 815 * operator, operands, and number of variable-length operands. 816 * @param Result the instruction's Result operand 817 * @param Address the instruction's Address operand 818 * @param Method the instruction's Method operand 819 * @param Guard the instruction's Guard operand 820 * @param Param_1 the k'th variable argument called Param 821 * @return the mutated instruction 822 */ 823 public static Instruction mutate1(Instruction i, Operator o 824 , RegisterOperand Result 825 , Operand Address 826 , MethodOperand Method 827 , Operand Guard 828 , Operand Param_1 829 ) 830 { 831 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 832 i.operator = o; 833 i.putOperand(0, Result); 834 i.putOperand(1, Address); 835 i.putOperand(2, Method); 836 i.putOperand(3, Guard); 837 i.putOperand(4, Param_1); 838 return i; 839 } 840 /** 841 * Mutate the argument instruction into an instruction of the 842 * Call instruction format having the specified 843 * operator, operands, and number of variable-length operands. 844 * @param Result the instruction's Result operand 845 * @param Address the instruction's Address operand 846 * @param Method the instruction's Method operand 847 * @param Guard the instruction's Guard operand 848 * @param Param_1 the k'th variable argument called Param 849 * @param Param_2 the k'th variable argument called Param 850 * @return the mutated instruction 851 */ 852 public static Instruction mutate2(Instruction i, Operator o 853 , RegisterOperand Result 854 , Operand Address 855 , MethodOperand Method 856 , Operand Guard 857 , Operand Param_1 858 , Operand Param_2 859 ) 860 { 861 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 862 i.resizeNumberOfOperands(6); 863 i.operator = o; 864 i.putOperand(0, Result); 865 i.putOperand(1, Address); 866 i.putOperand(2, Method); 867 i.putOperand(3, Guard); 868 i.putOperand(4, Param_1); 869 i.putOperand(5, Param_2); 870 return i; 871 } 872 /** 873 * Mutate the argument instruction into an instruction of the 874 * Call instruction format having the specified 875 * operator, operands, and number of variable-length operands. 876 * @param Result the instruction's Result operand 877 * @param Address the instruction's Address operand 878 * @param Method the instruction's Method operand 879 * @param Guard the instruction's Guard operand 880 * @param Param_1 the k'th variable argument called Param 881 * @param Param_2 the k'th variable argument called Param 882 * @param Param_3 the k'th variable argument called Param 883 * @return the mutated instruction 884 */ 885 public static Instruction mutate3(Instruction i, Operator o 886 , RegisterOperand Result 887 , Operand Address 888 , MethodOperand Method 889 , Operand Guard 890 , Operand Param_1 891 , Operand Param_2 892 , Operand Param_3 893 ) 894 { 895 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 896 i.resizeNumberOfOperands(7); 897 i.operator = o; 898 i.putOperand(0, Result); 899 i.putOperand(1, Address); 900 i.putOperand(2, Method); 901 i.putOperand(3, Guard); 902 i.putOperand(4, Param_1); 903 i.putOperand(5, Param_2); 904 i.putOperand(6, Param_3); 905 return i; 906 } 907 /** 908 * Mutate the argument instruction into an instruction of the 909 * Call instruction format having the specified 910 * operator, operands, and number of variable-length operands. 911 * @param Result the instruction's Result operand 912 * @param Address the instruction's Address operand 913 * @param Method the instruction's Method operand 914 * @param Guard the instruction's Guard operand 915 * @param Param_1 the k'th variable argument called Param 916 * @param Param_2 the k'th variable argument called Param 917 * @param Param_3 the k'th variable argument called Param 918 * @param Param_4 the k'th variable argument called Param 919 * @return the mutated instruction 920 */ 921 public static Instruction mutate4(Instruction i, Operator o 922 , RegisterOperand Result 923 , Operand Address 924 , MethodOperand Method 925 , Operand Guard 926 , Operand Param_1 927 , Operand Param_2 928 , Operand Param_3 929 , Operand Param_4 930 ) 931 { 932 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 933 i.resizeNumberOfOperands(8); 934 i.operator = o; 935 i.putOperand(0, Result); 936 i.putOperand(1, Address); 937 i.putOperand(2, Method); 938 i.putOperand(3, Guard); 939 i.putOperand(4, Param_1); 940 i.putOperand(5, Param_2); 941 i.putOperand(6, Param_3); 942 i.putOperand(7, Param_4); 943 return i; 944 } 945 /** 946 * Mutate the argument instruction into an instruction of the 947 * Call instruction format having the specified 948 * operator, operands, and number of variable-length operands. 949 * @param Result the instruction's Result operand 950 * @param Address the instruction's Address operand 951 * @param Method the instruction's Method operand 952 * @param Guard the instruction's Guard operand 953 * @param Param_1 the k'th variable argument called Param 954 * @param Param_2 the k'th variable argument called Param 955 * @param Param_3 the k'th variable argument called Param 956 * @param Param_4 the k'th variable argument called Param 957 * @param Param_5 the k'th variable argument called Param 958 * @return the mutated instruction 959 */ 960 public static Instruction mutate5(Instruction i, Operator o 961 , RegisterOperand Result 962 , Operand Address 963 , MethodOperand Method 964 , Operand Guard 965 , Operand Param_1 966 , Operand Param_2 967 , Operand Param_3 968 , Operand Param_4 969 , Operand Param_5 970 ) 971 { 972 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 973 i.resizeNumberOfOperands(9); 974 i.operator = o; 975 i.putOperand(0, Result); 976 i.putOperand(1, Address); 977 i.putOperand(2, Method); 978 i.putOperand(3, Guard); 979 i.putOperand(4, Param_1); 980 i.putOperand(5, Param_2); 981 i.putOperand(6, Param_3); 982 i.putOperand(7, Param_4); 983 i.putOperand(8, Param_5); 984 return i; 985 } 986 /** 987 * Mutate the argument instruction into an instruction of the 988 * Call instruction format having the specified 989 * operator, operands, and number of variable-length operands. 990 * @param Result the instruction's Result operand 991 * @param Address the instruction's Address operand 992 * @param Method the instruction's Method operand 993 * @param Guard the instruction's Guard operand 994 * @param Param_1 the k'th variable argument called Param 995 * @param Param_2 the k'th variable argument called Param 996 * @param Param_3 the k'th variable argument called Param 997 * @param Param_4 the k'th variable argument called Param 998 * @param Param_5 the k'th variable argument called Param 999 * @param Param_6 the k'th variable argument called Param 1000 * @return the mutated instruction 1001 */ 1002 public static Instruction mutate6(Instruction i, Operator o 1003 , RegisterOperand Result 1004 , Operand Address 1005 , MethodOperand Method 1006 , Operand Guard 1007 , Operand Param_1 1008 , Operand Param_2 1009 , Operand Param_3 1010 , Operand Param_4 1011 , Operand Param_5 1012 , Operand Param_6 1013 ) 1014 { 1015 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1016 i.resizeNumberOfOperands(10); 1017 i.operator = o; 1018 i.putOperand(0, Result); 1019 i.putOperand(1, Address); 1020 i.putOperand(2, Method); 1021 i.putOperand(3, Guard); 1022 i.putOperand(4, Param_1); 1023 i.putOperand(5, Param_2); 1024 i.putOperand(6, Param_3); 1025 i.putOperand(7, Param_4); 1026 i.putOperand(8, Param_5); 1027 i.putOperand(9, Param_6); 1028 return i; 1029 } 1030 /** 1031 * Mutate the argument instruction into an instruction of the 1032 * Call instruction format having the specified 1033 * operator, operands, and number of variable-length operands. 1034 * @param Result the instruction's Result operand 1035 * @param Address the instruction's Address operand 1036 * @param Method the instruction's Method operand 1037 * @param Guard the instruction's Guard operand 1038 * @param Param_1 the k'th variable argument called Param 1039 * @param Param_2 the k'th variable argument called Param 1040 * @param Param_3 the k'th variable argument called Param 1041 * @param Param_4 the k'th variable argument called Param 1042 * @param Param_5 the k'th variable argument called Param 1043 * @param Param_6 the k'th variable argument called Param 1044 * @param Param_7 the k'th variable argument called Param 1045 * @return the mutated instruction 1046 */ 1047 public static Instruction mutate7(Instruction i, Operator o 1048 , RegisterOperand Result 1049 , Operand Address 1050 , MethodOperand Method 1051 , Operand Guard 1052 , Operand Param_1 1053 , Operand Param_2 1054 , Operand Param_3 1055 , Operand Param_4 1056 , Operand Param_5 1057 , Operand Param_6 1058 , Operand Param_7 1059 ) 1060 { 1061 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1062 i.resizeNumberOfOperands(11); 1063 i.operator = o; 1064 i.putOperand(0, Result); 1065 i.putOperand(1, Address); 1066 i.putOperand(2, Method); 1067 i.putOperand(3, Guard); 1068 i.putOperand(4, Param_1); 1069 i.putOperand(5, Param_2); 1070 i.putOperand(6, Param_3); 1071 i.putOperand(7, Param_4); 1072 i.putOperand(8, Param_5); 1073 i.putOperand(9, Param_6); 1074 i.putOperand(10, Param_7); 1075 return i; 1076 } 1077 /** 1078 * Mutate the argument instruction into an instruction of the 1079 * Call instruction format having the specified 1080 * operator, operands, and number of variable-length operands. 1081 * @param Result the instruction's Result operand 1082 * @param Address the instruction's Address operand 1083 * @param Method the instruction's Method operand 1084 * @param Guard the instruction's Guard operand 1085 * @param Param_1 the k'th variable argument called Param 1086 * @param Param_2 the k'th variable argument called Param 1087 * @param Param_3 the k'th variable argument called Param 1088 * @param Param_4 the k'th variable argument called Param 1089 * @param Param_5 the k'th variable argument called Param 1090 * @param Param_6 the k'th variable argument called Param 1091 * @param Param_7 the k'th variable argument called Param 1092 * @param Param_8 the k'th variable argument called Param 1093 * @return the mutated instruction 1094 */ 1095 public static Instruction mutate8(Instruction i, Operator o 1096 , RegisterOperand Result 1097 , Operand Address 1098 , MethodOperand Method 1099 , Operand Guard 1100 , Operand Param_1 1101 , Operand Param_2 1102 , Operand Param_3 1103 , Operand Param_4 1104 , Operand Param_5 1105 , Operand Param_6 1106 , Operand Param_7 1107 , Operand Param_8 1108 ) 1109 { 1110 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1111 i.resizeNumberOfOperands(12); 1112 i.operator = o; 1113 i.putOperand(0, Result); 1114 i.putOperand(1, Address); 1115 i.putOperand(2, Method); 1116 i.putOperand(3, Guard); 1117 i.putOperand(4, Param_1); 1118 i.putOperand(5, Param_2); 1119 i.putOperand(6, Param_3); 1120 i.putOperand(7, Param_4); 1121 i.putOperand(8, Param_5); 1122 i.putOperand(9, Param_6); 1123 i.putOperand(10, Param_7); 1124 i.putOperand(11, Param_8); 1125 return i; 1126 } 1127 /** 1128 * Create an instruction of the Call instruction format. 1129 * @param o the instruction's operator 1130 * @param Result the instruction's Result operand 1131 * @param Address the instruction's Address operand 1132 * @param Method the instruction's Method operand 1133 * @param numVarOps the number of variable length operands that 1134 * will be stored in the insruction. 1135 * @return the newly created Call instruction 1136 */ 1137 public static Instruction create(Operator o 1138 , RegisterOperand Result 1139 , Operand Address 1140 , MethodOperand Method 1141 , int numVarOps 1142 ) 1143 { 1144 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1145 Instruction i = new Instruction(o, Math.max(4+numVarOps, MIN_OPERAND_ARRAY_LENGTH)); 1146 i.putOperand(0, Result); 1147 i.putOperand(1, Address); 1148 i.putOperand(2, Method); 1149 return i; 1150 } 1151 /** 1152 * Create an instruction of the Call instruction format 1153 * with 0 variable arguments. 1154 * @param o the instruction's operator 1155 * @param Result the instruction's Result operand 1156 * @param Address the instruction's Address operand 1157 * @param Method the instruction's Method operand 1158 * @return the newly created Call instruction 1159 */ 1160 public static Instruction create0(Operator o 1161 , RegisterOperand Result 1162 , Operand Address 1163 , MethodOperand Method 1164 ) 1165 { 1166 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1167 Instruction i = new Instruction(o, 5); 1168 i.putOperand(0, Result); 1169 i.putOperand(1, Address); 1170 i.putOperand(2, Method); 1171 return i; 1172 } 1173 /** 1174 * Create an instruction of the Call instruction format 1175 * with 1 variable arguments. 1176 * @param o the instruction's operator 1177 * @param Result the instruction's Result operand 1178 * @param Address the instruction's Address operand 1179 * @param Method the instruction's Method operand 1180 * @param Param_1 the k'th variable argument called Param 1181 * @return the newly created Call instruction 1182 */ 1183 public static Instruction create1(Operator o 1184 , RegisterOperand Result 1185 , Operand Address 1186 , MethodOperand Method 1187 , Operand Param_1 1188 ) 1189 { 1190 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1191 Instruction i = new Instruction(o, 5); 1192 i.putOperand(0, Result); 1193 i.putOperand(1, Address); 1194 i.putOperand(2, Method); 1195 i.putOperand(4, Param_1); 1196 return i; 1197 } 1198 /** 1199 * Create an instruction of the Call instruction format 1200 * with 2 variable arguments. 1201 * @param o the instruction's operator 1202 * @param Result the instruction's Result operand 1203 * @param Address the instruction's Address operand 1204 * @param Method the instruction's Method operand 1205 * @param Param_1 the k'th variable argument called Param 1206 * @param Param_2 the k'th variable argument called Param 1207 * @return the newly created Call instruction 1208 */ 1209 public static Instruction create2(Operator o 1210 , RegisterOperand Result 1211 , Operand Address 1212 , MethodOperand Method 1213 , Operand Param_1 1214 , Operand Param_2 1215 ) 1216 { 1217 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1218 Instruction i = new Instruction(o, 6); 1219 i.putOperand(0, Result); 1220 i.putOperand(1, Address); 1221 i.putOperand(2, Method); 1222 i.putOperand(4, Param_1); 1223 i.putOperand(5, Param_2); 1224 return i; 1225 } 1226 /** 1227 * Create an instruction of the Call instruction format 1228 * with 3 variable arguments. 1229 * @param o the instruction's operator 1230 * @param Result the instruction's Result operand 1231 * @param Address the instruction's Address operand 1232 * @param Method the instruction's Method operand 1233 * @param Param_1 the k'th variable argument called Param 1234 * @param Param_2 the k'th variable argument called Param 1235 * @param Param_3 the k'th variable argument called Param 1236 * @return the newly created Call instruction 1237 */ 1238 public static Instruction create3(Operator o 1239 , RegisterOperand Result 1240 , Operand Address 1241 , MethodOperand Method 1242 , Operand Param_1 1243 , Operand Param_2 1244 , Operand Param_3 1245 ) 1246 { 1247 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1248 Instruction i = new Instruction(o, 7); 1249 i.putOperand(0, Result); 1250 i.putOperand(1, Address); 1251 i.putOperand(2, Method); 1252 i.putOperand(4, Param_1); 1253 i.putOperand(5, Param_2); 1254 i.putOperand(6, Param_3); 1255 return i; 1256 } 1257 /** 1258 * Create an instruction of the Call instruction format 1259 * with 4 variable arguments. 1260 * @param o the instruction's operator 1261 * @param Result the instruction's Result operand 1262 * @param Address the instruction's Address operand 1263 * @param Method the instruction's Method operand 1264 * @param Param_1 the k'th variable argument called Param 1265 * @param Param_2 the k'th variable argument called Param 1266 * @param Param_3 the k'th variable argument called Param 1267 * @param Param_4 the k'th variable argument called Param 1268 * @return the newly created Call instruction 1269 */ 1270 public static Instruction create4(Operator o 1271 , RegisterOperand Result 1272 , Operand Address 1273 , MethodOperand Method 1274 , Operand Param_1 1275 , Operand Param_2 1276 , Operand Param_3 1277 , Operand Param_4 1278 ) 1279 { 1280 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1281 Instruction i = new Instruction(o, 8); 1282 i.putOperand(0, Result); 1283 i.putOperand(1, Address); 1284 i.putOperand(2, Method); 1285 i.putOperand(4, Param_1); 1286 i.putOperand(5, Param_2); 1287 i.putOperand(6, Param_3); 1288 i.putOperand(7, Param_4); 1289 return i; 1290 } 1291 /** 1292 * Create an instruction of the Call instruction format 1293 * with 5 variable arguments. 1294 * @param o the instruction's operator 1295 * @param Result the instruction's Result operand 1296 * @param Address the instruction's Address operand 1297 * @param Method the instruction's Method operand 1298 * @param Param_1 the k'th variable argument called Param 1299 * @param Param_2 the k'th variable argument called Param 1300 * @param Param_3 the k'th variable argument called Param 1301 * @param Param_4 the k'th variable argument called Param 1302 * @param Param_5 the k'th variable argument called Param 1303 * @return the newly created Call instruction 1304 */ 1305 public static Instruction create5(Operator o 1306 , RegisterOperand Result 1307 , Operand Address 1308 , MethodOperand Method 1309 , Operand Param_1 1310 , Operand Param_2 1311 , Operand Param_3 1312 , Operand Param_4 1313 , Operand Param_5 1314 ) 1315 { 1316 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1317 Instruction i = new Instruction(o, 9); 1318 i.putOperand(0, Result); 1319 i.putOperand(1, Address); 1320 i.putOperand(2, Method); 1321 i.putOperand(4, Param_1); 1322 i.putOperand(5, Param_2); 1323 i.putOperand(6, Param_3); 1324 i.putOperand(7, Param_4); 1325 i.putOperand(8, Param_5); 1326 return i; 1327 } 1328 /** 1329 * Create an instruction of the Call instruction format 1330 * with 6 variable arguments. 1331 * @param o the instruction's operator 1332 * @param Result the instruction's Result operand 1333 * @param Address the instruction's Address operand 1334 * @param Method the instruction's Method operand 1335 * @param Param_1 the k'th variable argument called Param 1336 * @param Param_2 the k'th variable argument called Param 1337 * @param Param_3 the k'th variable argument called Param 1338 * @param Param_4 the k'th variable argument called Param 1339 * @param Param_5 the k'th variable argument called Param 1340 * @param Param_6 the k'th variable argument called Param 1341 * @return the newly created Call instruction 1342 */ 1343 public static Instruction create6(Operator o 1344 , RegisterOperand Result 1345 , Operand Address 1346 , MethodOperand Method 1347 , Operand Param_1 1348 , Operand Param_2 1349 , Operand Param_3 1350 , Operand Param_4 1351 , Operand Param_5 1352 , Operand Param_6 1353 ) 1354 { 1355 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1356 Instruction i = new Instruction(o, 10); 1357 i.putOperand(0, Result); 1358 i.putOperand(1, Address); 1359 i.putOperand(2, Method); 1360 i.putOperand(4, Param_1); 1361 i.putOperand(5, Param_2); 1362 i.putOperand(6, Param_3); 1363 i.putOperand(7, Param_4); 1364 i.putOperand(8, Param_5); 1365 i.putOperand(9, Param_6); 1366 return i; 1367 } 1368 /** 1369 * Create an instruction of the Call instruction format 1370 * with 7 variable arguments. 1371 * @param o the instruction's operator 1372 * @param Result the instruction's Result operand 1373 * @param Address the instruction's Address operand 1374 * @param Method the instruction's Method operand 1375 * @param Param_1 the k'th variable argument called Param 1376 * @param Param_2 the k'th variable argument called Param 1377 * @param Param_3 the k'th variable argument called Param 1378 * @param Param_4 the k'th variable argument called Param 1379 * @param Param_5 the k'th variable argument called Param 1380 * @param Param_6 the k'th variable argument called Param 1381 * @param Param_7 the k'th variable argument called Param 1382 * @return the newly created Call instruction 1383 */ 1384 public static Instruction create7(Operator o 1385 , RegisterOperand Result 1386 , Operand Address 1387 , MethodOperand Method 1388 , Operand Param_1 1389 , Operand Param_2 1390 , Operand Param_3 1391 , Operand Param_4 1392 , Operand Param_5 1393 , Operand Param_6 1394 , Operand Param_7 1395 ) 1396 { 1397 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1398 Instruction i = new Instruction(o, 11); 1399 i.putOperand(0, Result); 1400 i.putOperand(1, Address); 1401 i.putOperand(2, Method); 1402 i.putOperand(4, Param_1); 1403 i.putOperand(5, Param_2); 1404 i.putOperand(6, Param_3); 1405 i.putOperand(7, Param_4); 1406 i.putOperand(8, Param_5); 1407 i.putOperand(9, Param_6); 1408 i.putOperand(10, Param_7); 1409 return i; 1410 } 1411 /** 1412 * Create an instruction of the Call instruction format 1413 * with 8 variable arguments. 1414 * @param o the instruction's operator 1415 * @param Result the instruction's Result operand 1416 * @param Address the instruction's Address operand 1417 * @param Method the instruction's Method operand 1418 * @param Param_1 the k'th variable argument called Param 1419 * @param Param_2 the k'th variable argument called Param 1420 * @param Param_3 the k'th variable argument called Param 1421 * @param Param_4 the k'th variable argument called Param 1422 * @param Param_5 the k'th variable argument called Param 1423 * @param Param_6 the k'th variable argument called Param 1424 * @param Param_7 the k'th variable argument called Param 1425 * @param Param_8 the k'th variable argument called Param 1426 * @return the newly created Call instruction 1427 */ 1428 public static Instruction create8(Operator o 1429 , RegisterOperand Result 1430 , Operand Address 1431 , MethodOperand Method 1432 , Operand Param_1 1433 , Operand Param_2 1434 , Operand Param_3 1435 , Operand Param_4 1436 , Operand Param_5 1437 , Operand Param_6 1438 , Operand Param_7 1439 , Operand Param_8 1440 ) 1441 { 1442 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1443 Instruction i = new Instruction(o, 12); 1444 i.putOperand(0, Result); 1445 i.putOperand(1, Address); 1446 i.putOperand(2, Method); 1447 i.putOperand(4, Param_1); 1448 i.putOperand(5, Param_2); 1449 i.putOperand(6, Param_3); 1450 i.putOperand(7, Param_4); 1451 i.putOperand(8, Param_5); 1452 i.putOperand(9, Param_6); 1453 i.putOperand(10, Param_7); 1454 i.putOperand(11, Param_8); 1455 return i; 1456 } 1457 1458 /** 1459 * Mutate the argument instruction into an instruction of the 1460 * Call instruction format having the specified 1461 * operator and operands. 1462 * @param i the instruction to mutate 1463 * @param o the instruction's operator 1464 * @param Result the instruction's Result operand 1465 * @param Address the instruction's Address operand 1466 * @param Method the instruction's Method operand 1467 * @param numVarOps the number of variable length operands that 1468 * will be stored in the insruction. 1469 * @return the mutated instruction 1470 */ 1471 public static Instruction mutate(Instruction i, Operator o 1472 , RegisterOperand Result 1473 , Operand Address 1474 , MethodOperand Method 1475 , int numVarOps 1476 ) 1477 { 1478 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1479 if (4+numVarOps>MIN_OPERAND_ARRAY_LENGTH) 1480 i.resizeNumberOfOperands(4+numVarOps); 1481 1482 i.operator = o; 1483 i.putOperand(0, Result); 1484 i.putOperand(1, Address); 1485 i.putOperand(2, Method); 1486 i.putOperand(3, null); 1487 return i; 1488 } 1489 /** 1490 * Mutate the argument instruction into an instruction of the 1491 * Call instruction format having the specified 1492 * operator, operands, and number of variable-length operands. 1493 * @param Result the instruction's Result operand 1494 * @param Address the instruction's Address operand 1495 * @param Method the instruction's Method operand 1496 * @return the mutated instruction 1497 */ 1498 public static Instruction mutate0(Instruction i, Operator o 1499 , RegisterOperand Result 1500 , Operand Address 1501 , MethodOperand Method 1502 ) 1503 { 1504 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1505 i.operator = o; 1506 i.putOperand(0, Result); 1507 i.putOperand(1, Address); 1508 i.putOperand(2, Method); 1509 i.putOperand(3, null); 1510 return i; 1511 } 1512 /** 1513 * Mutate the argument instruction into an instruction of the 1514 * Call instruction format having the specified 1515 * operator, operands, and number of variable-length operands. 1516 * @param Result the instruction's Result operand 1517 * @param Address the instruction's Address operand 1518 * @param Method the instruction's Method operand 1519 * @param Param_1 the k'th variable argument called Param 1520 * @return the mutated instruction 1521 */ 1522 public static Instruction mutate1(Instruction i, Operator o 1523 , RegisterOperand Result 1524 , Operand Address 1525 , MethodOperand Method 1526 , Operand Param_1 1527 ) 1528 { 1529 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1530 i.operator = o; 1531 i.putOperand(0, Result); 1532 i.putOperand(1, Address); 1533 i.putOperand(2, Method); 1534 i.putOperand(3, null); 1535 i.putOperand(4, Param_1); 1536 return i; 1537 } 1538 /** 1539 * Mutate the argument instruction into an instruction of the 1540 * Call instruction format having the specified 1541 * operator, operands, and number of variable-length operands. 1542 * @param Result the instruction's Result operand 1543 * @param Address the instruction's Address operand 1544 * @param Method the instruction's Method operand 1545 * @param Param_1 the k'th variable argument called Param 1546 * @param Param_2 the k'th variable argument called Param 1547 * @return the mutated instruction 1548 */ 1549 public static Instruction mutate2(Instruction i, Operator o 1550 , RegisterOperand Result 1551 , Operand Address 1552 , MethodOperand Method 1553 , Operand Param_1 1554 , Operand Param_2 1555 ) 1556 { 1557 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1558 i.resizeNumberOfOperands(6); 1559 i.operator = o; 1560 i.putOperand(0, Result); 1561 i.putOperand(1, Address); 1562 i.putOperand(2, Method); 1563 i.putOperand(3, null); 1564 i.putOperand(4, Param_1); 1565 i.putOperand(5, Param_2); 1566 return i; 1567 } 1568 /** 1569 * Mutate the argument instruction into an instruction of the 1570 * Call instruction format having the specified 1571 * operator, operands, and number of variable-length operands. 1572 * @param Result the instruction's Result operand 1573 * @param Address the instruction's Address operand 1574 * @param Method the instruction's Method operand 1575 * @param Param_1 the k'th variable argument called Param 1576 * @param Param_2 the k'th variable argument called Param 1577 * @param Param_3 the k'th variable argument called Param 1578 * @return the mutated instruction 1579 */ 1580 public static Instruction mutate3(Instruction i, Operator o 1581 , RegisterOperand Result 1582 , Operand Address 1583 , MethodOperand Method 1584 , Operand Param_1 1585 , Operand Param_2 1586 , Operand Param_3 1587 ) 1588 { 1589 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1590 i.resizeNumberOfOperands(7); 1591 i.operator = o; 1592 i.putOperand(0, Result); 1593 i.putOperand(1, Address); 1594 i.putOperand(2, Method); 1595 i.putOperand(3, null); 1596 i.putOperand(4, Param_1); 1597 i.putOperand(5, Param_2); 1598 i.putOperand(6, Param_3); 1599 return i; 1600 } 1601 /** 1602 * Mutate the argument instruction into an instruction of the 1603 * Call instruction format having the specified 1604 * operator, operands, and number of variable-length operands. 1605 * @param Result the instruction's Result operand 1606 * @param Address the instruction's Address operand 1607 * @param Method the instruction's Method operand 1608 * @param Param_1 the k'th variable argument called Param 1609 * @param Param_2 the k'th variable argument called Param 1610 * @param Param_3 the k'th variable argument called Param 1611 * @param Param_4 the k'th variable argument called Param 1612 * @return the mutated instruction 1613 */ 1614 public static Instruction mutate4(Instruction i, Operator o 1615 , RegisterOperand Result 1616 , Operand Address 1617 , MethodOperand Method 1618 , Operand Param_1 1619 , Operand Param_2 1620 , Operand Param_3 1621 , Operand Param_4 1622 ) 1623 { 1624 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1625 i.resizeNumberOfOperands(8); 1626 i.operator = o; 1627 i.putOperand(0, Result); 1628 i.putOperand(1, Address); 1629 i.putOperand(2, Method); 1630 i.putOperand(3, null); 1631 i.putOperand(4, Param_1); 1632 i.putOperand(5, Param_2); 1633 i.putOperand(6, Param_3); 1634 i.putOperand(7, Param_4); 1635 return i; 1636 } 1637 /** 1638 * Mutate the argument instruction into an instruction of the 1639 * Call instruction format having the specified 1640 * operator, operands, and number of variable-length operands. 1641 * @param Result the instruction's Result operand 1642 * @param Address the instruction's Address operand 1643 * @param Method the instruction's Method operand 1644 * @param Param_1 the k'th variable argument called Param 1645 * @param Param_2 the k'th variable argument called Param 1646 * @param Param_3 the k'th variable argument called Param 1647 * @param Param_4 the k'th variable argument called Param 1648 * @param Param_5 the k'th variable argument called Param 1649 * @return the mutated instruction 1650 */ 1651 public static Instruction mutate5(Instruction i, Operator o 1652 , RegisterOperand Result 1653 , Operand Address 1654 , MethodOperand Method 1655 , Operand Param_1 1656 , Operand Param_2 1657 , Operand Param_3 1658 , Operand Param_4 1659 , Operand Param_5 1660 ) 1661 { 1662 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1663 i.resizeNumberOfOperands(9); 1664 i.operator = o; 1665 i.putOperand(0, Result); 1666 i.putOperand(1, Address); 1667 i.putOperand(2, Method); 1668 i.putOperand(3, null); 1669 i.putOperand(4, Param_1); 1670 i.putOperand(5, Param_2); 1671 i.putOperand(6, Param_3); 1672 i.putOperand(7, Param_4); 1673 i.putOperand(8, Param_5); 1674 return i; 1675 } 1676 /** 1677 * Mutate the argument instruction into an instruction of the 1678 * Call instruction format having the specified 1679 * operator, operands, and number of variable-length operands. 1680 * @param Result the instruction's Result operand 1681 * @param Address the instruction's Address operand 1682 * @param Method the instruction's Method operand 1683 * @param Param_1 the k'th variable argument called Param 1684 * @param Param_2 the k'th variable argument called Param 1685 * @param Param_3 the k'th variable argument called Param 1686 * @param Param_4 the k'th variable argument called Param 1687 * @param Param_5 the k'th variable argument called Param 1688 * @param Param_6 the k'th variable argument called Param 1689 * @return the mutated instruction 1690 */ 1691 public static Instruction mutate6(Instruction i, Operator o 1692 , RegisterOperand Result 1693 , Operand Address 1694 , MethodOperand Method 1695 , Operand Param_1 1696 , Operand Param_2 1697 , Operand Param_3 1698 , Operand Param_4 1699 , Operand Param_5 1700 , Operand Param_6 1701 ) 1702 { 1703 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1704 i.resizeNumberOfOperands(10); 1705 i.operator = o; 1706 i.putOperand(0, Result); 1707 i.putOperand(1, Address); 1708 i.putOperand(2, Method); 1709 i.putOperand(3, null); 1710 i.putOperand(4, Param_1); 1711 i.putOperand(5, Param_2); 1712 i.putOperand(6, Param_3); 1713 i.putOperand(7, Param_4); 1714 i.putOperand(8, Param_5); 1715 i.putOperand(9, Param_6); 1716 return i; 1717 } 1718 /** 1719 * Mutate the argument instruction into an instruction of the 1720 * Call instruction format having the specified 1721 * operator, operands, and number of variable-length operands. 1722 * @param Result the instruction's Result operand 1723 * @param Address the instruction's Address operand 1724 * @param Method the instruction's Method operand 1725 * @param Param_1 the k'th variable argument called Param 1726 * @param Param_2 the k'th variable argument called Param 1727 * @param Param_3 the k'th variable argument called Param 1728 * @param Param_4 the k'th variable argument called Param 1729 * @param Param_5 the k'th variable argument called Param 1730 * @param Param_6 the k'th variable argument called Param 1731 * @param Param_7 the k'th variable argument called Param 1732 * @return the mutated instruction 1733 */ 1734 public static Instruction mutate7(Instruction i, Operator o 1735 , RegisterOperand Result 1736 , Operand Address 1737 , MethodOperand Method 1738 , Operand Param_1 1739 , Operand Param_2 1740 , Operand Param_3 1741 , Operand Param_4 1742 , Operand Param_5 1743 , Operand Param_6 1744 , Operand Param_7 1745 ) 1746 { 1747 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1748 i.resizeNumberOfOperands(11); 1749 i.operator = o; 1750 i.putOperand(0, Result); 1751 i.putOperand(1, Address); 1752 i.putOperand(2, Method); 1753 i.putOperand(3, null); 1754 i.putOperand(4, Param_1); 1755 i.putOperand(5, Param_2); 1756 i.putOperand(6, Param_3); 1757 i.putOperand(7, Param_4); 1758 i.putOperand(8, Param_5); 1759 i.putOperand(9, Param_6); 1760 i.putOperand(10, Param_7); 1761 return i; 1762 } 1763 /** 1764 * Mutate the argument instruction into an instruction of the 1765 * Call instruction format having the specified 1766 * operator, operands, and number of variable-length operands. 1767 * @param Result the instruction's Result operand 1768 * @param Address the instruction's Address operand 1769 * @param Method the instruction's Method operand 1770 * @param Param_1 the k'th variable argument called Param 1771 * @param Param_2 the k'th variable argument called Param 1772 * @param Param_3 the k'th variable argument called Param 1773 * @param Param_4 the k'th variable argument called Param 1774 * @param Param_5 the k'th variable argument called Param 1775 * @param Param_6 the k'th variable argument called Param 1776 * @param Param_7 the k'th variable argument called Param 1777 * @param Param_8 the k'th variable argument called Param 1778 * @return the mutated instruction 1779 */ 1780 public static Instruction mutate8(Instruction i, Operator o 1781 , RegisterOperand Result 1782 , Operand Address 1783 , MethodOperand Method 1784 , Operand Param_1 1785 , Operand Param_2 1786 , Operand Param_3 1787 , Operand Param_4 1788 , Operand Param_5 1789 , Operand Param_6 1790 , Operand Param_7 1791 , Operand Param_8 1792 ) 1793 { 1794 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Call"); 1795 i.resizeNumberOfOperands(12); 1796 i.operator = o; 1797 i.putOperand(0, Result); 1798 i.putOperand(1, Address); 1799 i.putOperand(2, Method); 1800 i.putOperand(3, null); 1801 i.putOperand(4, Param_1); 1802 i.putOperand(5, Param_2); 1803 i.putOperand(6, Param_3); 1804 i.putOperand(7, Param_4); 1805 i.putOperand(8, Param_5); 1806 i.putOperand(9, Param_6); 1807 i.putOperand(10, Param_7); 1808 i.putOperand(11, Param_8); 1809 return i; 1810 } 1811 } 1812