Mercurial > hg > truffle
comparison graal/com.oracle.max.asmdis/src/com/sun/max/asm/gen/cisc/x86/X86Template.java @ 4142:bc8527f3071c
Adjust code base to new level of warnings.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sun, 18 Dec 2011 05:24:06 +0100 |
parents | e233f5660da4 |
children |
comparison
equal
deleted
inserted
replaced
4141:04d21be7a24f | 4142:bc8527f3071c |
---|---|
42 private HexByte instructionSelectionPrefix; | 42 private HexByte instructionSelectionPrefix; |
43 private HexByte opcode1; | 43 private HexByte opcode1; |
44 private HexByte opcode2; | 44 private HexByte opcode2; |
45 private ModRMGroup modRMGroup; | 45 private ModRMGroup modRMGroup; |
46 private ModRMGroup.Opcode modRMGroupOpcode; | 46 private ModRMGroup.Opcode modRMGroupOpcode; |
47 private List<X86Operand> operands = new LinkedList<X86Operand>(); | 47 private List<X86Operand> operands = new LinkedList<>(); |
48 private List<X86ImplicitOperand> implicitOperands = new LinkedList<X86ImplicitOperand>(); | 48 private List<X86ImplicitOperand> implicitOperands = new LinkedList<>(); |
49 private List<X86Parameter> parameters = new ArrayList<X86Parameter>(); | 49 private List<X86Parameter> parameters = new ArrayList<>(); |
50 protected boolean isLabelMethodWritten; | 50 protected boolean isLabelMethodWritten; |
51 | 51 |
52 protected X86Template(X86InstructionDescription instructionDescription, int serial, InstructionAssessment instructionFamily, X86TemplateContext context) { | 52 protected X86Template(X86InstructionDescription instructionDescription, int serial, InstructionAssessment instructionFamily, X86TemplateContext context) { |
53 super(instructionDescription, serial); | 53 super(instructionDescription, serial); |
54 this.instructionFamily = instructionFamily; | 54 this.instructionFamily = instructionFamily; |
145 result += externalOperandTypeSuffix; | 145 result += externalOperandTypeSuffix; |
146 } | 146 } |
147 return result; | 147 return result; |
148 } | 148 } |
149 | 149 |
150 private String format(HexByte parameter) { | 150 private static String format(HexByte parameter) { |
151 return parameter == null ? "" : parameter.toString() + ", "; | 151 return parameter == null ? "" : parameter.toString() + ", "; |
152 } | 152 } |
153 | 153 |
154 @Override | 154 @Override |
155 public String toString() { | 155 public String toString() { |
237 parameter.excludeTestArguments(testArgumentExclusion); | 237 parameter.excludeTestArguments(testArgumentExclusion); |
238 } | 238 } |
239 | 239 |
240 protected <EnumerableArgument_Type extends Enum<EnumerableArgument_Type> & EnumerableArgument<EnumerableArgument_Type>> X86Parameter addEnumerableParameter(X86Operand.Designation designation, ParameterPlace parameterPlace, | 240 protected <EnumerableArgument_Type extends Enum<EnumerableArgument_Type> & EnumerableArgument<EnumerableArgument_Type>> X86Parameter addEnumerableParameter(X86Operand.Designation designation, ParameterPlace parameterPlace, |
241 final Enumerator<EnumerableArgument_Type> enumerator) { | 241 final Enumerator<EnumerableArgument_Type> enumerator) { |
242 return addParameter(new X86EnumerableParameter<EnumerableArgument_Type>(designation, parameterPlace, enumerator)); | 242 return addParameter(new X86EnumerableParameter<>(designation, parameterPlace, enumerator)); |
243 } | 243 } |
244 | 244 |
245 protected void addImplicitOperand(X86ImplicitOperand implicitOperand) { | 245 protected void addImplicitOperand(X86ImplicitOperand implicitOperand) { |
246 implicitOperands.add(implicitOperand); | 246 implicitOperands.add(implicitOperand); |
247 operands.add(implicitOperand); | 247 operands.add(implicitOperand); |
297 break; | 297 break; |
298 } | 298 } |
299 return operandTypeCode.name(); | 299 return operandTypeCode.name(); |
300 } | 300 } |
301 | 301 |
302 private void checkSuffix(String newSuffix, String oldSuffix) { | 302 private static void checkSuffix(String newSuffix, String oldSuffix) { |
303 if (oldSuffix != null) { | 303 if (oldSuffix != null) { |
304 ProgramError.check(newSuffix.equals(oldSuffix), "conflicting operand type codes specified: " + newSuffix + " vs. " + oldSuffix); | 304 ProgramError.check(newSuffix.equals(oldSuffix), "conflicting operand type codes specified: " + newSuffix + " vs. " + oldSuffix); |
305 } | 305 } |
306 } | 306 } |
307 | 307 |