void $write_poly_int8(MSP430Operand o, int value) { switch (o.op_type) { case MSP430Operand.ABSO_val: $write_int8((MSP430Operand.ABSO) o, value); return; case MSP430Operand.INDX_val: $write_int8((MSP430Operand.INDX) o, value); return; case MSP430Operand.AIREG_B_val: $write_int8((MSP430Operand.AIREG_B) o, value); return; case MSP430Operand.IREG_val: $write_int8((MSP430Operand.IREG) o, value); return; case MSP430Operand.SYMB_val: $write_int8((MSP430Operand.SYMB) o, value); return; case MSP430Operand.IMML_val: $write_int8((MSP430Operand.IMML) o, value); return; case MSP430Operand.SREG_val: $write_int8((MSP430Operand.SREG) o, value); return; case MSP430Operand.IMM_val: $write_int8((MSP430Operand.IMM) o, value); return; } throw Util.failure("invalid operand type in write"); }
/** * The method is called by an option implementation when there is a problem parsing the value for * an option supplied by the user on the command line. For example, if an integer is not in the * correct format, this method will be called, which will report an error. * * @param name the name of the option * @param type the value type * @param val the (invalid) value passed */ protected void parseError(String name, String type, String val) { Util.userError( "Option Error", "invalid value for " + type + " option " + StringUtil.quote(name) + " = " + StringUtil.quote(val)); }
int $read_poly_uint16(MSP430Operand o) { switch (o.op_type) { case MSP430Operand.INDX_val: return $read_uint16((MSP430Operand.INDX) o); case MSP430Operand.IMML_val: return $read_uint16((MSP430Operand.IMML) o); case MSP430Operand.IMM_val: return $read_uint16((MSP430Operand.IMM) o); case MSP430Operand.IREG_val: return $read_uint16((MSP430Operand.IREG) o); case MSP430Operand.AIREG_W_val: return $read_uint16((MSP430Operand.AIREG_W) o); case MSP430Operand.ABSO_val: return $read_uint16((MSP430Operand.ABSO) o); case MSP430Operand.SREG_val: return $read_uint16((MSP430Operand.SREG) o); case MSP430Operand.SYMB_val: return $read_uint16((MSP430Operand.SYMB) o); } throw Util.failure("invalid operand type in read"); }