diff options
author | David Edelsohn <dje.gcc@gmail.com> | 1997-04-10 21:54:15 +0000 |
---|---|---|
committer | David Edelsohn <dje.gcc@gmail.com> | 1997-04-10 21:54:15 +0000 |
commit | 4e9d8deacb172d5ebcee32576ffd910c69d3a467 (patch) | |
tree | a336ed7f4f0fdc806eca92cd294b9ee2bbe41cfa /gas/config | |
parent | 841eff9e79feef61fa9ada5ec008514385750642 (diff) | |
download | gdb-4e9d8deacb172d5ebcee32576ffd910c69d3a467.zip gdb-4e9d8deacb172d5ebcee32576ffd910c69d3a467.tar.gz gdb-4e9d8deacb172d5ebcee32576ffd910c69d3a467.tar.bz2 |
* config/tc-m32r.c (md_begin): Set cgen_asm_parse_operand_fn.
(md_assemble): Call cgen_asm_init_parse.
Update call to m32r_cgen_assemble_insn, call as_bad if assembly failed.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-m32r.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gas/config/tc-m32r.c b/gas/config/tc-m32r.c index 4761e3d..43bf7f7 100644 --- a/gas/config/tc-m32r.c +++ b/gas/config/tc-m32r.c @@ -252,6 +252,10 @@ md_begin () subsegT subseg; /* Initialize the `cgen' interface. */ + + /* This is a callback from cgen to gas to parse operands. */ + cgen_asm_parse_operand_fn = cgen_asm_parse_operand; + /* Set the machine number and endian. */ CGEN_SYM (init_asm) (0 /* mach number */, target_big_endian ? CGEN_ENDIAN_BIG : CGEN_ENDIAN_LITTLE); @@ -306,10 +310,17 @@ md_assemble (str) #endif struct cgen_fields fields; const struct cgen_insn *insn; + char *errmsg; + + /* Initialize GAS's cgen interface for a new instruction. */ + cgen_asm_init_parse (); - insn = CGEN_SYM (assemble_insn) (str, &fields, buffer); + insn = CGEN_SYM (assemble_insn) (str, &fields, buffer, &errmsg); if (!insn) - return; + { + as_bad (errmsg); + return; + } if (CGEN_INSN_BITSIZE (insn) == 32) { |