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.ia32;
009
010import org.jikesrvm.Configuration;
011import org.jikesrvm.compilers.opt.ir.operand.ia32.IA32ConditionOperand;
012import org.jikesrvm.compilers.opt.ir.operand.*;
013import org.jikesrvm.compilers.opt.ir.Instruction;
014import org.jikesrvm.compilers.opt.ir.Operator;
015
016/**
017 * The MIR_CondBranch2 InstructionFormat class.
018 *
019 * The header comment for {@link Instruction} contains
020 * an explanation of the role of InstructionFormats in the
021 * opt compiler's IR.
022 */
023@SuppressWarnings("unused")  // Machine generated code is never 100% clean
024public final class MIR_CondBranch2 extends ArchInstructionFormat {
025  /**
026   * InstructionFormat identification method for MIR_CondBranch2.
027   * @param i an instruction
028   * @return <code>true</code> if the InstructionFormat of the argument
029   *         instruction is MIR_CondBranch2 or <code>false</code>
030   *         if it is not.
031   */
032  public static boolean conforms(Instruction i) {
033    return conforms(i.operator());
034  }
035  /**
036   * InstructionFormat identification method for MIR_CondBranch2.
037   * @param o an instruction
038   * @return <code>true</code> if the InstructionFormat of the argument
039   *         operator is MIR_CondBranch2 or <code>false</code>
040   *         if it is not.
041   */
042  public static boolean conforms(Operator o) {
043    return o.format == MIR_CondBranch2_format;
044  }
045
046  /**
047   * Get the operand called Cond1 from the
048   * argument instruction. Note that the returned operand
049   * will still point to its containing instruction.
050   * @param i the instruction to fetch the operand from
051   * @return the operand called Cond1
052   */
053  public static IA32ConditionOperand getCond1(Instruction i) {
054    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
055    return (IA32ConditionOperand) i.getOperand(0);
056  }
057  /**
058   * Get the operand called Cond1 from the argument
059   * instruction clearing its instruction pointer. The returned
060   * operand will not point to any containing instruction.
061   * @param i the instruction to fetch the operand from
062   * @return the operand called Cond1
063   */
064  public static IA32ConditionOperand getClearCond1(Instruction i) {
065    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
066    return (IA32ConditionOperand) i.getClearOperand(0);
067  }
068  /**
069   * Set the operand called Cond1 in the argument
070   * instruction to the argument operand. The operand will
071   * now point to the argument instruction as its containing
072   * instruction.
073   * @param i the instruction in which to store the operand
074   * @param Cond1 the operand to store
075   */
076  public static void setCond1(Instruction i, IA32ConditionOperand Cond1) {
077    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
078    i.putOperand(0, Cond1);
079  }
080  /**
081   * Return the index of the operand called Cond1
082   * in the argument instruction.
083   * @param i the instruction to access.
084   * @return the index of the operand called Cond1
085   *         in the argument instruction
086   */
087  public static int indexOfCond1(Instruction i) {
088    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
089    return 0;
090  }
091  /**
092   * Does the argument instruction have a non-null
093   * operand named Cond1?
094   * @param i the instruction to access.
095   * @return <code>true</code> if the instruction has an non-null
096   *         operand named Cond1 or <code>false</code>
097   *         if it does not.
098   */
099  public static boolean hasCond1(Instruction i) {
100    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
101    return i.getOperand(0) != null;
102  }
103
104  /**
105   * Get the operand called Target1 from the
106   * argument instruction. Note that the returned operand
107   * will still point to its containing instruction.
108   * @param i the instruction to fetch the operand from
109   * @return the operand called Target1
110   */
111  public static BranchOperand getTarget1(Instruction i) {
112    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
113    return (BranchOperand) i.getOperand(1);
114  }
115  /**
116   * Get the operand called Target1 from the argument
117   * instruction clearing its instruction pointer. The returned
118   * operand will not point to any containing instruction.
119   * @param i the instruction to fetch the operand from
120   * @return the operand called Target1
121   */
122  public static BranchOperand getClearTarget1(Instruction i) {
123    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
124    return (BranchOperand) i.getClearOperand(1);
125  }
126  /**
127   * Set the operand called Target1 in the argument
128   * instruction to the argument operand. The operand will
129   * now point to the argument instruction as its containing
130   * instruction.
131   * @param i the instruction in which to store the operand
132   * @param Target1 the operand to store
133   */
134  public static void setTarget1(Instruction i, BranchOperand Target1) {
135    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
136    i.putOperand(1, Target1);
137  }
138  /**
139   * Return the index of the operand called Target1
140   * in the argument instruction.
141   * @param i the instruction to access.
142   * @return the index of the operand called Target1
143   *         in the argument instruction
144   */
145  public static int indexOfTarget1(Instruction i) {
146    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
147    return 1;
148  }
149  /**
150   * Does the argument instruction have a non-null
151   * operand named Target1?
152   * @param i the instruction to access.
153   * @return <code>true</code> if the instruction has an non-null
154   *         operand named Target1 or <code>false</code>
155   *         if it does not.
156   */
157  public static boolean hasTarget1(Instruction i) {
158    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
159    return i.getOperand(1) != null;
160  }
161
162  /**
163   * Get the operand called BranchProfile1 from the
164   * argument instruction. Note that the returned operand
165   * will still point to its containing instruction.
166   * @param i the instruction to fetch the operand from
167   * @return the operand called BranchProfile1
168   */
169  public static BranchProfileOperand getBranchProfile1(Instruction i) {
170    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
171    return (BranchProfileOperand) i.getOperand(2);
172  }
173  /**
174   * Get the operand called BranchProfile1 from the argument
175   * instruction clearing its instruction pointer. The returned
176   * operand will not point to any containing instruction.
177   * @param i the instruction to fetch the operand from
178   * @return the operand called BranchProfile1
179   */
180  public static BranchProfileOperand getClearBranchProfile1(Instruction i) {
181    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
182    return (BranchProfileOperand) i.getClearOperand(2);
183  }
184  /**
185   * Set the operand called BranchProfile1 in the argument
186   * instruction to the argument operand. The operand will
187   * now point to the argument instruction as its containing
188   * instruction.
189   * @param i the instruction in which to store the operand
190   * @param BranchProfile1 the operand to store
191   */
192  public static void setBranchProfile1(Instruction i, BranchProfileOperand BranchProfile1) {
193    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
194    i.putOperand(2, BranchProfile1);
195  }
196  /**
197   * Return the index of the operand called BranchProfile1
198   * in the argument instruction.
199   * @param i the instruction to access.
200   * @return the index of the operand called BranchProfile1
201   *         in the argument instruction
202   */
203  public static int indexOfBranchProfile1(Instruction i) {
204    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
205    return 2;
206  }
207  /**
208   * Does the argument instruction have a non-null
209   * operand named BranchProfile1?
210   * @param i the instruction to access.
211   * @return <code>true</code> if the instruction has an non-null
212   *         operand named BranchProfile1 or <code>false</code>
213   *         if it does not.
214   */
215  public static boolean hasBranchProfile1(Instruction i) {
216    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
217    return i.getOperand(2) != null;
218  }
219
220  /**
221   * Get the operand called Cond2 from the
222   * argument instruction. Note that the returned operand
223   * will still point to its containing instruction.
224   * @param i the instruction to fetch the operand from
225   * @return the operand called Cond2
226   */
227  public static IA32ConditionOperand getCond2(Instruction i) {
228    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
229    return (IA32ConditionOperand) i.getOperand(3);
230  }
231  /**
232   * Get the operand called Cond2 from the argument
233   * instruction clearing its instruction pointer. The returned
234   * operand will not point to any containing instruction.
235   * @param i the instruction to fetch the operand from
236   * @return the operand called Cond2
237   */
238  public static IA32ConditionOperand getClearCond2(Instruction i) {
239    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
240    return (IA32ConditionOperand) i.getClearOperand(3);
241  }
242  /**
243   * Set the operand called Cond2 in the argument
244   * instruction to the argument operand. The operand will
245   * now point to the argument instruction as its containing
246   * instruction.
247   * @param i the instruction in which to store the operand
248   * @param Cond2 the operand to store
249   */
250  public static void setCond2(Instruction i, IA32ConditionOperand Cond2) {
251    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
252    i.putOperand(3, Cond2);
253  }
254  /**
255   * Return the index of the operand called Cond2
256   * in the argument instruction.
257   * @param i the instruction to access.
258   * @return the index of the operand called Cond2
259   *         in the argument instruction
260   */
261  public static int indexOfCond2(Instruction i) {
262    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
263    return 3;
264  }
265  /**
266   * Does the argument instruction have a non-null
267   * operand named Cond2?
268   * @param i the instruction to access.
269   * @return <code>true</code> if the instruction has an non-null
270   *         operand named Cond2 or <code>false</code>
271   *         if it does not.
272   */
273  public static boolean hasCond2(Instruction i) {
274    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
275    return i.getOperand(3) != null;
276  }
277
278  /**
279   * Get the operand called Target2 from the
280   * argument instruction. Note that the returned operand
281   * will still point to its containing instruction.
282   * @param i the instruction to fetch the operand from
283   * @return the operand called Target2
284   */
285  public static BranchOperand getTarget2(Instruction i) {
286    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
287    return (BranchOperand) i.getOperand(4);
288  }
289  /**
290   * Get the operand called Target2 from the argument
291   * instruction clearing its instruction pointer. The returned
292   * operand will not point to any containing instruction.
293   * @param i the instruction to fetch the operand from
294   * @return the operand called Target2
295   */
296  public static BranchOperand getClearTarget2(Instruction i) {
297    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
298    return (BranchOperand) i.getClearOperand(4);
299  }
300  /**
301   * Set the operand called Target2 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 Target2 the operand to store
307   */
308  public static void setTarget2(Instruction i, BranchOperand Target2) {
309    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
310    i.putOperand(4, Target2);
311  }
312  /**
313   * Return the index of the operand called Target2
314   * in the argument instruction.
315   * @param i the instruction to access.
316   * @return the index of the operand called Target2
317   *         in the argument instruction
318   */
319  public static int indexOfTarget2(Instruction i) {
320    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
321    return 4;
322  }
323  /**
324   * Does the argument instruction have a non-null
325   * operand named Target2?
326   * @param i the instruction to access.
327   * @return <code>true</code> if the instruction has an non-null
328   *         operand named Target2 or <code>false</code>
329   *         if it does not.
330   */
331  public static boolean hasTarget2(Instruction i) {
332    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
333    return i.getOperand(4) != null;
334  }
335
336  /**
337   * Get the operand called BranchProfile2 from the
338   * argument instruction. Note that the returned operand
339   * will still point to its containing instruction.
340   * @param i the instruction to fetch the operand from
341   * @return the operand called BranchProfile2
342   */
343  public static BranchProfileOperand getBranchProfile2(Instruction i) {
344    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
345    return (BranchProfileOperand) i.getOperand(5);
346  }
347  /**
348   * Get the operand called BranchProfile2 from the argument
349   * instruction clearing its instruction pointer. The returned
350   * operand will not point to any containing instruction.
351   * @param i the instruction to fetch the operand from
352   * @return the operand called BranchProfile2
353   */
354  public static BranchProfileOperand getClearBranchProfile2(Instruction i) {
355    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
356    return (BranchProfileOperand) i.getClearOperand(5);
357  }
358  /**
359   * Set the operand called BranchProfile2 in the argument
360   * instruction to the argument operand. The operand will
361   * now point to the argument instruction as its containing
362   * instruction.
363   * @param i the instruction in which to store the operand
364   * @param BranchProfile2 the operand to store
365   */
366  public static void setBranchProfile2(Instruction i, BranchProfileOperand BranchProfile2) {
367    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
368    i.putOperand(5, BranchProfile2);
369  }
370  /**
371   * Return the index of the operand called BranchProfile2
372   * in the argument instruction.
373   * @param i the instruction to access.
374   * @return the index of the operand called BranchProfile2
375   *         in the argument instruction
376   */
377  public static int indexOfBranchProfile2(Instruction i) {
378    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
379    return 5;
380  }
381  /**
382   * Does the argument instruction have a non-null
383   * operand named BranchProfile2?
384   * @param i the instruction to access.
385   * @return <code>true</code> if the instruction has an non-null
386   *         operand named BranchProfile2 or <code>false</code>
387   *         if it does not.
388   */
389  public static boolean hasBranchProfile2(Instruction i) {
390    if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_CondBranch2");
391    return i.getOperand(5) != null;
392  }
393
394
395  /**
396   * Create an instruction of the MIR_CondBranch2 instruction format.
397   * @param o the instruction's operator
398   * @param Cond1 the instruction's Cond1 operand
399   * @param Target1 the instruction's Target1 operand
400   * @param BranchProfile1 the instruction's BranchProfile1 operand
401   * @param Cond2 the instruction's Cond2 operand
402   * @param Target2 the instruction's Target2 operand
403   * @param BranchProfile2 the instruction's BranchProfile2 operand
404   * @return the newly created MIR_CondBranch2 instruction
405   */
406  public static Instruction create(Operator o
407                   , IA32ConditionOperand Cond1
408                   , BranchOperand Target1
409                   , BranchProfileOperand BranchProfile1
410                   , IA32ConditionOperand Cond2
411                   , BranchOperand Target2
412                   , BranchProfileOperand BranchProfile2
413                )
414  {
415    if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "MIR_CondBranch2");
416    Instruction i = Instruction.create(o, 6);
417    i.putOperand(0, Cond1);
418    i.putOperand(1, Target1);
419    i.putOperand(2, BranchProfile1);
420    i.putOperand(3, Cond2);
421    i.putOperand(4, Target2);
422    i.putOperand(5, BranchProfile2);
423    return i;
424  }
425
426  /**
427   * Mutate the argument instruction into an instruction of the
428   * MIR_CondBranch2 instruction format having the specified
429   * operator and operands.
430   * @param i the instruction to mutate
431   * @param o the instruction's operator
432   * @param Cond1 the instruction's Cond1 operand
433   * @param Target1 the instruction's Target1 operand
434   * @param BranchProfile1 the instruction's BranchProfile1 operand
435   * @param Cond2 the instruction's Cond2 operand
436   * @param Target2 the instruction's Target2 operand
437   * @param BranchProfile2 the instruction's BranchProfile2 operand
438   * @return the mutated instruction
439   */
440  public static Instruction mutate(Instruction i, Operator o
441                   , IA32ConditionOperand Cond1
442                   , BranchOperand Target1
443                   , BranchProfileOperand BranchProfile1
444                   , IA32ConditionOperand Cond2
445                   , BranchOperand Target2
446                   , BranchProfileOperand BranchProfile2
447                )
448  {
449    if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "MIR_CondBranch2");
450    i.resizeNumberOfOperands(6);
451
452    i.changeOperatorTo(o);
453    i.putOperand(0, Cond1);
454    i.putOperand(1, Target1);
455    i.putOperand(2, BranchProfile1);
456    i.putOperand(3, Cond2);
457    i.putOperand(4, Target2);
458    i.putOperand(5, BranchProfile2);
459    return i;
460  }
461  /**
462   * Create an instruction of the MIR_CondBranch2 instruction format.
463   * @param o the instruction's operator
464   * @param Cond1 the instruction's Cond1 operand
465   * @param Target1 the instruction's Target1 operand
466   * @param BranchProfile1 the instruction's BranchProfile1 operand
467   * @param Cond2 the instruction's Cond2 operand
468   * @param BranchProfile2 the instruction's BranchProfile2 operand
469   * @return the newly created MIR_CondBranch2 instruction
470   */
471  public static Instruction create(Operator o
472                   , IA32ConditionOperand Cond1
473                   , BranchOperand Target1
474                   , BranchProfileOperand BranchProfile1
475                   , IA32ConditionOperand Cond2
476                   , BranchProfileOperand BranchProfile2
477                )
478  {
479    if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "MIR_CondBranch2");
480    Instruction i = Instruction.create(o, 6);
481    i.putOperand(0, Cond1);
482    i.putOperand(1, Target1);
483    i.putOperand(2, BranchProfile1);
484    i.putOperand(3, Cond2);
485    i.putOperand(5, BranchProfile2);
486    return i;
487  }
488
489  /**
490   * Mutate the argument instruction into an instruction of the
491   * MIR_CondBranch2 instruction format having the specified
492   * operator and operands.
493   * @param i the instruction to mutate
494   * @param o the instruction's operator
495   * @param Cond1 the instruction's Cond1 operand
496   * @param Target1 the instruction's Target1 operand
497   * @param BranchProfile1 the instruction's BranchProfile1 operand
498   * @param Cond2 the instruction's Cond2 operand
499   * @param BranchProfile2 the instruction's BranchProfile2 operand
500   * @return the mutated instruction
501   */
502  public static Instruction mutate(Instruction i, Operator o
503                   , IA32ConditionOperand Cond1
504                   , BranchOperand Target1
505                   , BranchProfileOperand BranchProfile1
506                   , IA32ConditionOperand Cond2
507                   , BranchProfileOperand BranchProfile2
508                )
509  {
510    if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "MIR_CondBranch2");
511    i.resizeNumberOfOperands(6);
512
513    i.changeOperatorTo(o);
514    i.putOperand(0, Cond1);
515    i.putOperand(1, Target1);
516    i.putOperand(2, BranchProfile1);
517    i.putOperand(3, Cond2);
518    i.putOperand(4, null);
519    i.putOperand(5, BranchProfile2);
520    return i;
521  }
522  /**
523   * Create an instruction of the MIR_CondBranch2 instruction format.
524   * @param o the instruction's operator
525   * @param Cond1 the instruction's Cond1 operand
526   * @param BranchProfile1 the instruction's BranchProfile1 operand
527   * @param Cond2 the instruction's Cond2 operand
528   * @param Target2 the instruction's Target2 operand
529   * @param BranchProfile2 the instruction's BranchProfile2 operand
530   * @return the newly created MIR_CondBranch2 instruction
531   */
532  public static Instruction create(Operator o
533                   , IA32ConditionOperand Cond1
534                   , BranchProfileOperand BranchProfile1
535                   , IA32ConditionOperand Cond2
536                   , BranchOperand Target2
537                   , BranchProfileOperand BranchProfile2
538                )
539  {
540    if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "MIR_CondBranch2");
541    Instruction i = Instruction.create(o, 6);
542    i.putOperand(0, Cond1);
543    i.putOperand(2, BranchProfile1);
544    i.putOperand(3, Cond2);
545    i.putOperand(4, Target2);
546    i.putOperand(5, BranchProfile2);
547    return i;
548  }
549
550  /**
551   * Mutate the argument instruction into an instruction of the
552   * MIR_CondBranch2 instruction format having the specified
553   * operator and operands.
554   * @param i the instruction to mutate
555   * @param o the instruction's operator
556   * @param Cond1 the instruction's Cond1 operand
557   * @param BranchProfile1 the instruction's BranchProfile1 operand
558   * @param Cond2 the instruction's Cond2 operand
559   * @param Target2 the instruction's Target2 operand
560   * @param BranchProfile2 the instruction's BranchProfile2 operand
561   * @return the mutated instruction
562   */
563  public static Instruction mutate(Instruction i, Operator o
564                   , IA32ConditionOperand Cond1
565                   , BranchProfileOperand BranchProfile1
566                   , IA32ConditionOperand Cond2
567                   , BranchOperand Target2
568                   , BranchProfileOperand BranchProfile2
569                )
570  {
571    if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "MIR_CondBranch2");
572    i.resizeNumberOfOperands(6);
573
574    i.changeOperatorTo(o);
575    i.putOperand(0, Cond1);
576    i.putOperand(1, null);
577    i.putOperand(2, BranchProfile1);
578    i.putOperand(3, Cond2);
579    i.putOperand(4, Target2);
580    i.putOperand(5, BranchProfile2);
581    return i;
582  }
583  /**
584   * Create an instruction of the MIR_CondBranch2 instruction format.
585   * @param o the instruction's operator
586   * @param Cond1 the instruction's Cond1 operand
587   * @param BranchProfile1 the instruction's BranchProfile1 operand
588   * @param Cond2 the instruction's Cond2 operand
589   * @param BranchProfile2 the instruction's BranchProfile2 operand
590   * @return the newly created MIR_CondBranch2 instruction
591   */
592  public static Instruction create(Operator o
593                   , IA32ConditionOperand Cond1
594                   , BranchProfileOperand BranchProfile1
595                   , IA32ConditionOperand Cond2
596                   , BranchProfileOperand BranchProfile2
597                )
598  {
599    if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "MIR_CondBranch2");
600    Instruction i = Instruction.create(o, 6);
601    i.putOperand(0, Cond1);
602    i.putOperand(2, BranchProfile1);
603    i.putOperand(3, Cond2);
604    i.putOperand(5, BranchProfile2);
605    return i;
606  }
607
608  /**
609   * Mutate the argument instruction into an instruction of the
610   * MIR_CondBranch2 instruction format having the specified
611   * operator and operands.
612   * @param i the instruction to mutate
613   * @param o the instruction's operator
614   * @param Cond1 the instruction's Cond1 operand
615   * @param BranchProfile1 the instruction's BranchProfile1 operand
616   * @param Cond2 the instruction's Cond2 operand
617   * @param BranchProfile2 the instruction's BranchProfile2 operand
618   * @return the mutated instruction
619   */
620  public static Instruction mutate(Instruction i, Operator o
621                   , IA32ConditionOperand Cond1
622                   , BranchProfileOperand BranchProfile1
623                   , IA32ConditionOperand Cond2
624                   , BranchProfileOperand BranchProfile2
625                )
626  {
627    if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "MIR_CondBranch2");
628    i.resizeNumberOfOperands(6);
629
630    i.changeOperatorTo(o);
631    i.putOperand(0, Cond1);
632    i.putOperand(1, null);
633    i.putOperand(2, BranchProfile1);
634    i.putOperand(3, Cond2);
635    i.putOperand(4, null);
636    i.putOperand(5, BranchProfile2);
637    return i;
638  }
639}
640