From 41e9f56c749a0cb06ccea31ad40a6f1f88ad10b8 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Thu, 23 Jul 1998 19:20:47 +0000 Subject: [PATCH] * config/tc-mn10300.c (md_assemble): Make sure "errmsg" has a non-NULL value. --- gas/ChangeLog | 5 +++++ gas/config/tc-mn10300.c | 26 ++++++++++++++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index acad9be517b..621a8236456 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +Thu Jul 23 13:19:50 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mn10300.c (md_assemble): Make sure "errmsg" has a non-NULL + value. + start-sanitize-sky Wed Jul 22 17:39:28 1998 Frank Ch. Eigler diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c index c317a173dc8..1dd5803a119 100644 --- a/gas/config/tc-mn10300.c +++ b/gas/config/tc-mn10300.c @@ -152,12 +152,18 @@ static const struct reg_name r_registers[] = { "a1", 9 }, { "a2", 10 }, { "a3", 11 }, - { "a0", 12 }, + { "d0", 12 }, { "d1", 13 }, { "d2", 14 }, { "d3", 15 }, { "e0", 0 }, { "e1", 1 }, + { "e10", 10 }, + { "e11", 11 }, + { "e12", 12 }, + { "e13", 13 }, + { "e14", 14 }, + { "e15", 15 }, { "e2", 2 }, { "e3", 3 }, { "e4", 4 }, @@ -918,7 +924,7 @@ md_assemble (str) for(;;) { - const char *errmsg = NULL; + const char *errmsg = "Invalid opcode/operands"; int op_idx; char *hold; int extra_shift = 0; @@ -954,8 +960,6 @@ md_assemble (str) next_opindex = 0; } - errmsg = NULL; - while (*str == ' ' || *str == ',') ++str; @@ -1256,6 +1260,20 @@ md_assemble (str) str = hold; goto error; } + /* start-sanitize-am33 */ + else if (r_register_name (&ex)) + { + input_line_pointer = hold; + str = hold; + goto error; + } + else if (xr_register_name (&ex)) + { + input_line_pointer = hold; + str = hold; + goto error; + } + /* end-sanitize-am33 */ else if (*str == ')' || *str == '(') { input_line_pointer = hold; -- 2.30.2