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