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_Empty 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_Empty extends ArchInstructionFormat {
025  /**
026   * InstructionFormat identification method for MIR_Empty.
027   * @param i an instruction
028   * @return <code>true</code> if the InstructionFormat of the argument
029   *         instruction is MIR_Empty 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_Empty.
037   * @param o an instruction
038   * @return <code>true</code> if the InstructionFormat of the argument
039   *         operator is MIR_Empty or <code>false</code>
040   *         if it is not.
041   */
042  public static boolean conforms(Operator o) {
043    return o.format == MIR_Empty_format;
044  }
045
046
047  /**
048   * Create an instruction of the MIR_Empty instruction format.
049   * @param o the instruction's operator
050   * @return the newly created MIR_Empty instruction
051   */
052  public static Instruction create(Operator o
053                )
054  {
055    if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "MIR_Empty");
056    Instruction i = Instruction.create(o, 5);
057    return i;
058  }
059
060  /**
061   * Mutate the argument instruction into an instruction of the
062   * MIR_Empty instruction format having the specified
063   * operator and operands.
064   * @param i the instruction to mutate
065   * @param o the instruction's operator
066   * @return the mutated instruction
067   */
068  public static Instruction mutate(Instruction i, Operator o
069                )
070  {
071    if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "MIR_Empty");
072    i.changeOperatorTo(o);
073    return i;
074  }
075}
076