diff options
| author | Max Filippov | 2019-03-22 04:22:03 +0100 |
|---|---|---|
| committer | Max Filippov | 2019-03-22 05:47:50 +0100 |
| commit | b9ec52188f1eafb2901d37a57727bbf1d8bbe3ca (patch) | |
| tree | 9fc0259f9fa49c37ef235806cc953ccb8a534e3b /target | |
| parent | Update version for v4.0.0-rc0 release (diff) | |
| download | qemu-b9ec52188f1eafb2901d37a57727bbf1d8bbe3ca.tar.gz qemu-b9ec52188f1eafb2901d37a57727bbf1d8bbe3ca.tar.xz qemu-b9ec52188f1eafb2901d37a57727bbf1d8bbe3ca.zip | |
target/xtensa: fix break_dependency for repeated resources
break_dependency incorrectly handles the case of dependency on an opcode
that references the same register multiple times. E.g. the following
instruction is translated incorrectly:
{ or a2, a3, a3 ; or a3, a2, a2 }
This happens because resource indices of both dependency graph nodes are
incremented, and a copy for the second instance of the same register in
the ending node is not done.
Only increment resource index of the ending node of the dependency.
Add test.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'target')
| -rw-r--r-- | target/xtensa/translate.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 77bc04d6b0..65561d2c49 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -1041,7 +1041,6 @@ static bool break_dependency(struct slot_prop *a, copy[n].resource = b->in[j].resource; copy[n].arg = b->arg + index; ++n; - ++i; ++j; rv = true; } |
