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.ppc; 009 010import org.jikesrvm.Configuration; 011import org.jikesrvm.compilers.opt.ir.operand.ppc.PowerPCConditionOperand; 012import org.jikesrvm.compilers.opt.ir.operand.ppc.PowerPCTrapOperand; 013import org.jikesrvm.compilers.opt.ir.operand.*; 014import org.jikesrvm.compilers.opt.ir.Instruction; 015import org.jikesrvm.compilers.opt.ir.Operator; 016 017/** 018 * The MIR_Empty InstructionFormat class. 019 * 020 * The header comment for {@link Instruction} contains 021 * an explanation of the role of InstructionFormats in the 022 * opt compiler's IR. 023 */ 024@SuppressWarnings("unused") // Machine generated code is never 100% clean 025public final class MIR_Empty extends ArchInstructionFormat { 026 /** 027 * InstructionFormat identification method for MIR_Empty. 028 * @param i an instruction 029 * @return <code>true</code> if the InstructionFormat of the argument 030 * instruction is MIR_Empty or <code>false</code> 031 * if it is not. 032 */ 033 public static boolean conforms(Instruction i) { 034 return conforms(i.operator()); 035 } 036 /** 037 * InstructionFormat identification method for MIR_Empty. 038 * @param o an instruction 039 * @return <code>true</code> if the InstructionFormat of the argument 040 * operator is MIR_Empty or <code>false</code> 041 * if it is not. 042 */ 043 public static boolean conforms(Operator o) { 044 return o.format == MIR_Empty_format; 045 } 046 047 048 /** 049 * Create an instruction of the MIR_Empty instruction format. 050 * @param o the instruction's operator 051 * @return the newly created MIR_Empty instruction 052 */ 053 public static Instruction create(Operator o 054 ) 055 { 056 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "MIR_Empty"); 057 Instruction i = Instruction.create(o, 5); 058 return i; 059 } 060 061 /** 062 * Mutate the argument instruction into an instruction of the 063 * MIR_Empty instruction format having the specified 064 * operator and operands. 065 * @param i the instruction to mutate 066 * @param o the instruction's operator 067 * @return the mutated instruction 068 */ 069 public static Instruction mutate(Instruction i, Operator o 070 ) 071 { 072 if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "MIR_Empty"); 073 i.changeOperatorTo(o); 074 return i; 075 } 076} 077