diff --git a/gas/ChangeLog b/gas/ChangeLog index 9007a52d84d..151bf2f06a5 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +start-sanitize-v850 +Fri Aug 23 10:41:32 1996 Jeffrey A Law (law@cygnus.com) + + * config/tc-v850.c (md_assemble): If we find a register, but the + opcode doesn't want a register, then we don't have a match. + (md_assemble): Get size of the instruction from the opcode table. + +end-sanitize-v850 Thu Aug 22 10:20:30 1996 Ian Lance Taylor * configure.in: Set and substitute HLDENV. diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c index ac47152fa6a..adc17e756bf 100644 --- a/gas/config/tc-v850.c +++ b/gas/config/tc-v850.c @@ -500,6 +500,12 @@ md_assemble (str) fc++; } } + else if (register_name (&ex) + && (operand->flags & V850_OPERAND_REG) == 0) + { + errmsg = "syntax error: register not expected"; + goto error; + } else { expression(&ex); @@ -572,17 +578,8 @@ md_assemble (str) input_line_pointer = str; - /* Write out the instruction. */ - if ((insn & 0x0600) == 0x0600) - { - f = frag_more (4); - md_number_to_chars (f, insn, 4); - } - else - { - f = frag_more (2); - md_number_to_chars (f, insn, 2); - } + f = frag_more (opcode->size); + md_number_to_chars (f, insn, opcode->size); }