From: Doug Evans Date: Tue, 7 Apr 1998 00:12:27 +0000 (+0000) Subject: * config/tc-dvp.c (assemble_vif): Watch for macro insns. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b25ce8e1fad700771179f8adc7901c7b97c2b2f1;p=binutils-gdb.git * config/tc-dvp.c (assemble_vif): Watch for macro insns. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 267902d99a2..34db311746f 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +start-sanitize-sky +Mon Apr 6 17:08:47 1998 Doug Evans + + * config/tc-dvp.c (assemble_vif): Watch for macro insns. + +end-sanitize-sky Mon Apr 6 12:06:39 1998 Andreas Schwab * config/tc-m68k.c (m68k_ip, case "#B"): Install the offset of the diff --git a/gas/config/tc-dvp.c b/gas/config/tc-dvp.c index 64e516bd1c5..b3c523a1148 100644 --- a/gas/config/tc-dvp.c +++ b/gas/config/tc-dvp.c @@ -474,6 +474,28 @@ assemble_vif (str) const char *file; /* Length in 32 bit words. */ int data_len; + /* Macro expansion, if there is one. */ + char * macstr; + + /* First check for macros. */ + macstr = dvp_expand_macro (vif_macros, vif_macro_count, str); + if (macstr) + { + /* The macro may expand into several insns (delimited with '\n'), + so loop. */ + char * next = macstr; + do + { + char *p = strchr (next, '\n'); + if (p) + *p = 0; + assemble_vif (next); + next = p ? p + 1 : 0; + } + while (next); + free (macstr); + return; + } opcode = assemble_one_insn (DVP_VIF, vif_opcode_lookup_asm (str), vif_operands,