aboutsummaryrefslogtreecommitdiff
path: root/opcodes/cgen-asm.c
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>1997-04-10 21:58:28 +0000
committerDavid Edelsohn <dje.gcc@gmail.com>1997-04-10 21:58:28 +0000
commit5b3b8cb07149b04b6e612ddae2b01958f839025f (patch)
tree53fa0d21eeabd4f82f9421594c640fa64f0f07f4 /opcodes/cgen-asm.c
parentfe2dd6424b58b9f0e79a891f7fe3023d6c820730 (diff)
downloadgdb-5b3b8cb07149b04b6e612ddae2b01958f839025f.zip
gdb-5b3b8cb07149b04b6e612ddae2b01958f839025f.tar.gz
gdb-5b3b8cb07149b04b6e612ddae2b01958f839025f.tar.bz2
* cgen-asm.c (cgen_asm_parse_operand_fn): New global.
(cgen_parse_{{,un}signed_integer,address}): Update call to cgen_asm_parse_operand_fn. * m32r-asm.c (parse_insn_normal): Delete call to cgen_asm_init_parse. (m32r_cgen_assemble_insn): New operand `errmsg'. Delete call to as_bad, return error message to caller. (m32r_cgen_asm_hash_keywords): #if 0 out.
Diffstat (limited to 'opcodes/cgen-asm.c')
-rw-r--r--opcodes/cgen-asm.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/opcodes/cgen-asm.c b/opcodes/cgen-asm.c
index bbc45da..14c830ad 100644
--- a/opcodes/cgen-asm.c
+++ b/opcodes/cgen-asm.c
@@ -31,6 +31,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "bfd.h"
#include "opcode/cgen.h"
+/* Operand parsing callback. */
+const char * (*cgen_asm_parse_operand_fn)
+ PARAMS ((const char **, int, int, enum cgen_asm_result *, bfd_vma *));
+
/* This is not published as part of the public interface so we don't
declare this in cgen.h. */
extern CGEN_OPCODE_DATA *cgen_current_opcode_data;
@@ -176,8 +180,8 @@ cgen_parse_signed_integer (strp, opindex, min, max, valuep)
enum cgen_asm_result result;
const char *errmsg;
- errmsg = cgen_asm_parse_operand (strp, opindex, BFD_RELOC_NONE,
- &result, &value);
+ errmsg = (*cgen_asm_parse_operand_fn) (strp, opindex, BFD_RELOC_NONE,
+ &result, &value);
/* FIXME: Examine `result'. */
if (!errmsg)
{
@@ -201,8 +205,8 @@ cgen_parse_unsigned_integer (strp, opindex, min, max, valuep)
enum cgen_asm_result result;
const char *errmsg;
- errmsg = cgen_asm_parse_operand (strp, opindex, BFD_RELOC_NONE,
- &result, &value);
+ errmsg = (*cgen_asm_parse_operand_fn) (strp, opindex, BFD_RELOC_NONE,
+ &result, &value);
/* FIXME: Examine `result'. */
if (!errmsg)
{
@@ -226,7 +230,8 @@ cgen_parse_address (strp, opindex, opinfo, valuep)
enum cgen_asm_result result;
const char *errmsg;
- errmsg = cgen_asm_parse_operand (strp, opindex, opinfo, &result, &value);
+ errmsg = (*cgen_asm_parse_operand_fn) (strp, opindex, opinfo,
+ &result, &value);
/* FIXME: Examine `result'. */
if (!errmsg)
{