diff options
author | Doug Evans <dje@google.com> | 1998-04-07 00:12:27 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 1998-04-07 00:12:27 +0000 |
commit | b25ce8e1fad700771179f8adc7901c7b97c2b2f1 (patch) | |
tree | 127ba29c40a00066cbe9507c802283b202bad5f5 | |
parent | 8632fe493a1434ba350986d91600da37bac87b27 (diff) | |
download | gdb-b25ce8e1fad700771179f8adc7901c7b97c2b2f1.zip gdb-b25ce8e1fad700771179f8adc7901c7b97c2b2f1.tar.gz gdb-b25ce8e1fad700771179f8adc7901c7b97c2b2f1.tar.bz2 |
* config/tc-dvp.c (assemble_vif): Watch for macro insns.
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-dvp.c | 22 |
2 files changed, 28 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 267902d..34db311 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +start-sanitize-sky +Mon Apr 6 17:08:47 1998 Doug Evans <devans@canuck.cygnus.com> + + * config/tc-dvp.c (assemble_vif): Watch for macro insns. + +end-sanitize-sky Mon Apr 6 12:06:39 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * 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 64e516b..b3c523a 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, |