summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé2020-03-30 14:13:45 +0200
committerRichard Henderson2020-03-30 20:44:04 +0200
commitb412378785c1bd95e3461c1373dd8938bc54fb4e (patch)
tree626d6a1ee45d801ba0d2159180334d5787fec087 /scripts
parenttcg/i386: Fix INDEX_op_dup2_vec (diff)
downloadqemu-b412378785c1bd95e3461c1373dd8938bc54fb4e.tar.gz
qemu-b412378785c1bd95e3461c1373dd8938bc54fb4e.tar.xz
qemu-b412378785c1bd95e3461c1373dd8938bc54fb4e.zip
decodetree: Use Python3 floor division operator
This script started using Python2, where the 'classic' division operator returns the floor result. In commit 3d004a371 we started to use Python3, where the division operator returns the float result ('true division'). To keep the same behavior, use the 'floor division' operator "//" which returns the floor result. Fixes: 3d004a371 Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200330121345.14665-1-f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/decodetree.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index 2a8f2b6e06..46ab917807 100755
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -1025,7 +1025,7 @@ class SizeTree:
if extracted < self.width:
output(ind, 'insn = ', decode_function,
'_load_bytes(ctx, insn, {0}, {1});\n'
- .format(extracted / 8, self.width / 8));
+ .format(extracted // 8, self.width // 8));
extracted = self.width
# Attempt to aid the compiler in producing compact switch statements.
@@ -1079,7 +1079,7 @@ class SizeLeaf:
if extracted < self.width:
output(ind, 'insn = ', decode_function,
'_load_bytes(ctx, insn, {0}, {1});\n'
- .format(extracted / 8, self.width / 8));
+ .format(extracted // 8, self.width // 8));
extracted = self.width
output(ind, 'return insn;\n')
# end SizeLeaf