aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1998-01-29 00:29:37 +0000
committerNick Clifton <nickc@redhat.com>1998-01-29 00:29:37 +0000
commited29580469374a53b995b74181b5c4f5fc9db516 (patch)
tree3c4bb1b2a037bad5f21a296e1fc8e3b7a60114c0 /gas
parent241b462435f038f9814d25e69974e712b8ad6548 (diff)
downloadgdb-ed29580469374a53b995b74181b5c4f5fc9db516.zip
gdb-ed29580469374a53b995b74181b5c4f5fc9db516.tar.gz
gdb-ed29580469374a53b995b74181b5c4f5fc9db516.tar.bz2
Fix determination of when two instructions can be combined in parallel.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-m32r.c22
2 files changed, 17 insertions, 12 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 2ea76a1..19559c4 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+start-sanitize-m32rx
+Wed Jan 28 16:27:27 1998 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-m32r.c (md_assemble): Fix determination of when
+ instructions can be combined in parallel.
+
+end-sanitize-m32rx
Wed Jan 28 14:35:00 1998 Bill Moyer <billm@cygnus.com>
* as.h (flag_warn_suppress_instructionswap): added new flag.
diff --git a/gas/config/tc-m32r.c b/gas/config/tc-m32r.c
index 1c79bfd..7232d4b 100644
--- a/gas/config/tc-m32r.c
+++ b/gas/config/tc-m32r.c
@@ -746,21 +746,19 @@ md_assemble (str)
previous instruction to make one, parallel, 32 bit instruction.
If the previous instruction (potentially) changed the flow of
program control, then it cannot be combined with the current
- instruction, otherwise call can_make_parallel() with both
+ instruction. Also if the output of the previous instruction
+ is used as an input to the current instruction then it cannot
+ be combined. Otherwise call can_make_parallel() with both
orderings of the instructions to see if they can be combined. */
if ( ! CGEN_INSN_ATTR (prev_insn.insn, CGEN_INSN_COND_CTI)
- && ! CGEN_INSN_ATTR (prev_insn.insn, CGEN_INSN_UNCOND_CTI))
+ && ! CGEN_INSN_ATTR (prev_insn.insn, CGEN_INSN_UNCOND_CTI)
+ && check_parallel_io_clash (& prev_insn, &insn)
+ )
{
- if (can_make_parallel (& prev_insn, & insn) == NULL
- && check_parallel_io_clash (& prev_insn, &insn))
- {
- make_parallel (insn.buffer);
- }
- else if (can_make_parallel (& insn, & prev_insn.insn) == NULL
- && check_parallel_io_clash (& insn, & prev_insn))
- {
- swap = true;
- }
+ if (can_make_parallel (& prev_insn, & insn) == NULL)
+ make_parallel (insn.buffer);
+ else if (can_make_parallel (& insn, & prev_insn.insn) == NULL)
+ swap = true;
}
/* end-sanitize-phase2-m32rx */
/* end-sanitize-m32rx */