* [PATCH] decodetree: Allow empty input files for var width
@ 2021-04-13 18:09 Luis Pires
2021-04-13 19:42 ` Luis Fernando Fujita Pires
0 siblings, 1 reply; 2+ messages in thread
From: Luis Pires @ 2021-04-13 18:09 UTC (permalink / raw)
To: qemu-devel; +Cc: Luis Pires, richard.henderson
This was broken when varinsnwidth was specified.
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
---
scripts/decodetree.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index 3450a2a08d..fef5eeaf42 100644
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -1177,11 +1177,12 @@ def output_code(self, i, extracted, outerbits, outermask):
ind = str_indent(i)
# If we need to load more bytes, do so now.
- if extracted < self.width:
- output(ind, 'insn = ', decode_function,
- '_load_bytes(ctx, insn, {0}, {1});\n'
- .format(extracted // 8, self.width // 8));
- extracted = self.width
+ if self.width is not None:
+ if extracted < self.width:
+ output(ind, 'insn = ', decode_function,
+ '_load_bytes(ctx, insn, {0}, {1});\n'
+ .format(extracted // 8, self.width // 8));
+ extracted = self.width
output(ind, 'return insn;\n')
# end SizeLeaf
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH] decodetree: Allow empty input files for var width
2021-04-13 18:09 [PATCH] decodetree: Allow empty input files for var width Luis Pires
@ 2021-04-13 19:42 ` Luis Fernando Fujita Pires
0 siblings, 0 replies; 2+ messages in thread
From: Luis Fernando Fujita Pires @ 2021-04-13 19:42 UTC (permalink / raw)
To: Luis Fernando Fujita Pires, qemu-devel; +Cc: richard.henderson
Please ignore this. I'll resend as part of a patch series.
Luis Pires
Instituto de Pesquisas ELDORADO
Departamento de Computação Embarcada
Aviso Legal - Disclaimer
-----Original Message-----
From: Luis Pires <luis.pires@eldorado.org.br>
Sent: terça-feira, 13 de abril de 2021 15:10
To: qemu-devel@nongnu.org
Cc: richard.henderson@linaro.org; Luis Fernando Fujita Pires <luis.pires@eldorado.org.br>
Subject: [PATCH] decodetree: Allow empty input files for var width
This was broken when varinsnwidth was specified.
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
---
scripts/decodetree.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/scripts/decodetree.py b/scripts/decodetree.py index 3450a2a08d..fef5eeaf42 100644
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -1177,11 +1177,12 @@ def output_code(self, i, extracted, outerbits, outermask):
ind = str_indent(i)
# If we need to load more bytes, do so now.
- if extracted < self.width:
- output(ind, 'insn = ', decode_function,
- '_load_bytes(ctx, insn, {0}, {1});\n'
- .format(extracted // 8, self.width // 8));
- extracted = self.width
+ if self.width is not None:
+ if extracted < self.width:
+ output(ind, 'insn = ', decode_function,
+ '_load_bytes(ctx, insn, {0}, {1});\n'
+ .format(extracted // 8, self.width // 8));
+ extracted = self.width
output(ind, 'return insn;\n')
# end SizeLeaf
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-13 19:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 18:09 [PATCH] decodetree: Allow empty input files for var width Luis Pires
2021-04-13 19:42 ` Luis Fernando Fujita Pires
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.