[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH 01/67] decodetree: Allow !function with no input bits
From: |
Richard Henderson |
Subject: |
[Qemu-arm] [PATCH 01/67] decodetree: Allow !function with no input bits |
Date: |
Fri, 26 Jul 2019 10:49:26 -0700 |
With this, we can have the function return a value from the DisasContext.
Signed-off-by: Richard Henderson <address@hidden>
---
scripts/decodetree.py | 5 ++++-
tests/decode/succ_function.decode | 2 ++
2 files changed, 6 insertions(+), 1 deletion(-)
create mode 100644 tests/decode/succ_function.decode
diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index d7a59d63ac..4259d87a95 100755
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -195,7 +195,10 @@ class MultiField:
"""Class representing a compound instruction field"""
def __init__(self, subs, mask):
self.subs = subs
- self.sign = subs[0].sign
+ if len(subs):
+ self.sign = subs[0].sign
+ else:
+ self.sign = 0
self.mask = mask
def __str__(self):
diff --git a/tests/decode/succ_function.decode
b/tests/decode/succ_function.decode
new file mode 100644
index 0000000000..632a9de252
--- /dev/null
+++ b/tests/decode/succ_function.decode
@@ -0,0 +1,2 @@
+%foo !function=foo
+foo 00000000000000000000000000000000 %foo
--
2.17.1
- [Qemu-arm] [PATCH 00/67] target/arm: Convert aa32 base isa to decodetree, Richard Henderson, 2019/07/26
- [Qemu-arm] [PATCH 03/67] target/arm: Remove offset argument to gen_exception_bkpt_insn, Richard Henderson, 2019/07/26
- [Qemu-arm] [PATCH 01/67] decodetree: Allow !function with no input bits,
Richard Henderson <=
- [Qemu-arm] [PATCH 02/67] target/arm: Remove offset argument to gen_exception_insn, Richard Henderson, 2019/07/26
- [Qemu-arm] [PATCH 04/67] target/arm: Remove offset argument to gen_exception_internal_insn, Richard Henderson, 2019/07/26
- [Qemu-arm] [PATCH 05/67] target/arm: Use the saved value of the insn address, Richard Henderson, 2019/07/26
- [Qemu-arm] [PATCH 06/67] target/arm: Introduce pc_read, Richard Henderson, 2019/07/26