Import QEMU upstream snapshot d2e570c

Upstream: https://gitlab.com/qemu-project/qemu.git

Upstream-Commit: d2e570cc0f97b936902a5b1b86b73c0f5998b475
This commit is contained in:
Yaya48 committed 2026-08-31 02:15:30 +02:00
commit cf256aa081
11315 files changed
+3598369

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose duplicate member names
&args a a
+5
View File
@@ -0,0 +1,5 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose invalid member names
&args a b c d0 0e
+5
View File
@@ -0,0 +1,5 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose invalid field syntax
%field asdf
+7
View File
@@ -0,0 +1,7 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose formats which refer to undefined fields
%field1 field2:3
@fmt ........ ........ ........ ........ %field1
insn 00000000 00000000 00000000 00000000 @fmt
+5
View File
@@ -0,0 +1,5 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose invalid field width.
%field 0:33
+5
View File
@@ -0,0 +1,5 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose invalid field position.
%field 31:2
+6
View File
@@ -0,0 +1,6 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose duplicate field name.
%field 0:1
%field 0:1
+5
View File
@@ -0,0 +1,5 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose duplicate function specifier.
%field 0:1 !function=a !function=a
+5
View File
@@ -0,0 +1,5 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose no bits in field
%field
+7
View File
@@ -0,0 +1,7 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose fields whose definitions form a loop
%field1 field2:3
%field2 field1:4
insn 00000000 00000000 00000000 00000000 %field1 %field2
+8
View File
@@ -0,0 +1,8 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose patterns which refer to undefined fields
&f1 f1 a
%field1 field2:3
@fmt ........ ........ ........ .... a:4 &f1
insn 00000000 00000000 00000000 0000 .... @fmt f1=%field1
+14
View File
@@ -0,0 +1,14 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose fields where the format refers to a field defined in the
# pattern and the pattern refers to a field defined in the format.
# This is theoretically not impossible to implement, but is not
# supported by the script at this time.
&abcd a b c d
%refa a:3
%refc c:4
# Format defines 'c' and sets 'b' to an indirect ref to 'a'
@fmt ........ ........ ........ c:8 &abcd b=%refa
# Pattern defines 'a' and sets 'd' to an indirect ref to 'c'
insn 00000000 00000000 00000000 ........ @fmt d=%refc a=6
+6
View File
@@ -0,0 +1,6 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose uninitialized member in pattern.
&args a b
insn 00000000 00000000 00000000 b:8 &args
+6
View File
@@ -0,0 +1,6 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose member initialized twice in pattern.
&args a b
insn 00000000 00000000 a:8 b:8 &args a=1
+7
View File
@@ -0,0 +1,7 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose member initialized twice in pattern + format.
&args a
@format ........ ........ a:16 &args
insn 00000000 00000000 a:16 @format
+7
View File
@@ -0,0 +1,7 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose uninitialized member in pattern + format.
&args a b
@format ........ ........ a:16 &args
insn 00000000 00000000 ........ ........ @format
+6
View File
@@ -0,0 +1,6 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose field overlapping fixedbits.
%field 0:1
insn 00000000 00000000 00000000 00000000 %field
+6
View File
@@ -0,0 +1,6 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose field overlapping fixedbits w/format.
@format ........ ........ ........ ....... fld:1
insn 00000000 00000000 00000000 00000000 @format
+6
View File
@@ -0,0 +1,6 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose field overlapping unspecified bits.
%field 0:1
insn 00000000 00000000 00000000 -------- %field
+6
View File
@@ -0,0 +1,6 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose fixed bits overlapping unspecified bits.
@format ........ ........ ........ .......-
insn 00000000 00000000 00000000 00000000 @format
+5
View File
@@ -0,0 +1,5 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose overlapping sub-fields.
%field 3:5 0:5
+6
View File
@@ -0,0 +1,6 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose overlapping fixed bits w/format.
@format ........ ........ ........ .......1
insn 00000000 00000000 00000000 00000000 @format
+6
View File
@@ -0,0 +1,6 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose overlapping patterns.
insn1 00000000 00000000 00000000 00000000
insn2 00000000 00000000 00000000 00000000
+5
View File
@@ -0,0 +1,5 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose not specified bit (. vs -).
insn 00000000 00000000 00000000 0000000.
+6
View File
@@ -0,0 +1,6 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose not specified bit (. vs -) w/format.
@format ........ a:8 ........ b:7 .
insn 00000000 ........ 00000000 ........ @format
@@ -0,0 +1,6 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# empty groups are not allowed
{
}
@@ -0,0 +1,10 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
%sub1 0:8
# Make sure that indentation is enforced
{
top 00000000 00000000 00000000 00000000
sub1 00000000 00000000 00000000 ........ %sub1
}
@@ -0,0 +1,11 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
%sub1 0:8
# Make sure that indentation is enforced
{
top 00000000 00000000 00000000 00000000
sub1 00000000 00000000 00000000 ........ %sub1
# comments are supposed to be indented
}
@@ -0,0 +1,14 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
%sub1 0:8
%sub2 8:8
# Make sure braces are matched
{
top 00000000 00000000 00000000 00000000
[
sub1 00000000 00000000 00000000 ........ %sub1
sub2 00000000 00000000 ........ ........ %sub1 %sub2
}
}
@@ -0,0 +1,6 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Make sure braces are matched
{
[
@@ -0,0 +1,14 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
%sub1 0:8
%sub2 8:8
# The exclusive group should error for overlap.
{
top 00000000 00000000 00000000 00000000
[
sub1 00000000 00000000 00000000 ........ %sub1
sub2 00000000 00000000 ........ ........ %sub1 %sub2
]
}
@@ -0,0 +1,6 @@
one 00000000000000000000000000000000
{
two 0000000000000000000000000000000 s:1
three 000000000000000000000000000000 s:1 0
}
+5
View File
@@ -0,0 +1,5 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose too many bits (33 of 32)
one 000000000000000000000000000000000
+5
View File
@@ -0,0 +1,5 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose too few bits (31 of 32)
one 0000000000000000000000000000000
+5
View File
@@ -0,0 +1,5 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose too many bits (33 of 32)
one 0 s:32
+5
View File
@@ -0,0 +1,5 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Diagnose too few bits (31 of 32)
one 0 s:30
+65
View File
@@ -0,0 +1,65 @@
err_tests = [
'err_argset1.decode',
'err_argset2.decode',
'err_field1.decode',
'err_field2.decode',
'err_field3.decode',
'err_field4.decode',
'err_field5.decode',
'err_field6.decode',
'err_field7.decode',
'err_field8.decode',
'err_field9.decode',
'err_field10.decode',
'err_init1.decode',
'err_init2.decode',
'err_init3.decode',
'err_init4.decode',
'err_overlap1.decode',
'err_overlap2.decode',
'err_overlap3.decode',
'err_overlap4.decode',
'err_overlap5.decode',
'err_overlap6.decode',
'err_overlap7.decode',
'err_overlap8.decode',
'err_overlap9.decode',
'err_pattern_group_empty.decode',
'err_pattern_group_ident1.decode',
'err_pattern_group_ident2.decode',
'err_pattern_group_nest1.decode',
'err_pattern_group_nest2.decode',
'err_pattern_group_nest3.decode',
'err_pattern_group_overlap1.decode',
'err_width1.decode',
'err_width2.decode',
'err_width3.decode',
'err_width4.decode',
]
succ_tests = [
'succ_argset_type1.decode',
'succ_function.decode',
'succ_ident1.decode',
'succ_infer1.decode',
'succ_named_field.decode',
'succ_pattern_group_nest1.decode',
'succ_pattern_group_nest2.decode',
'succ_pattern_group_nest3.decode',
'succ_pattern_group_nest4.decode',
]
suite = 'decodetree'
decodetree = find_program(meson.project_source_root() / 'scripts/decodetree.py')
foreach t: err_tests
test(fs.replace_suffix(t, ''),
decodetree, args: ['--output-null', '--test-for-error', files(t)],
suite: suite)
endforeach
foreach t: succ_tests
test(fs.replace_suffix(t, ''),
decodetree, args: ['--output-null', files(t)],
suite: suite)
endforeach
+1
View File
@@ -0,0 +1 @@
&asdf b:bool c:uint64_t a
+6
View File
@@ -0,0 +1,6 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# "Field" as parameter pulled from DisasContext.
%foo !function=foo
foo 00000000000000000000000000000000 %foo
+7
View File
@@ -0,0 +1,7 @@
%1f 0:8
%2f 8:8
%3f 16:8
&3arg a b c
@3arg ........ ........ ........ ........ &3arg a=%1f b=%2f c=%3f
3insn 00000000 ........ ........ ........ @3arg
+4
View File
@@ -0,0 +1,4 @@
&rprr_load rd pg rn rm dtype nreg
@rprr_load .... .... ... rm:5 ... pg:3 rn:5 rd:5 &rprr_load
LD1Q 1100 0100 000 rm:5 101 pg:3 rn:5 rd:5
+19
View File
@@ -0,0 +1,19 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# field using a named_field
%imm_sz 8:8 sz:3
insn 00000000 00000000 ........ 00000000 imm_sz=%imm_sz sz=1
# Ditto, via a format. Here a field in the format
# references a named field defined in the insn pattern:
&imm_a imm alpha
%foo 0:16 alpha:4
@foo 00000001 ........ ........ ........ &imm_a imm=%foo
i1 ........ 00000000 ........ ........ @foo alpha=1
i2 ........ 00000001 ........ ........ @foo alpha=2
# Here the named field is defined in the format and referenced
# from the insn pattern:
@bar 00000010 ........ ........ ........ &imm_a alpha=4
i3 ........ 00000000 ........ ........ @bar imm=%foo
@@ -0,0 +1,22 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
%sub1 0:8
%sub2 8:8
%sub3 16:8
%sub4 24:7
# Make sure deep netsting works, as few targets will actually exercise it
{
top 00000000 00000000 00000000 00000000
{
sub1 00000000 00000000 00000000 ........ %sub1
{
sub2 00000000 00000000 ........ ........ %sub1 %sub2
{
sub3 00000000 ........ ........ ........ %sub1 %sub2 %sub3
sub4 0....... ........ ........ ........ %sub1 %sub2 %sub3 %sub4
}
}
}
}
@@ -0,0 +1,13 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
%sub1 0:8
%sub2 8:8
%sub3 16:8
%sub4 24:8
# Group with complete overlap of the two patterns
{
top 00000000 00000000 00000000 00000000
sub4 ........ ........ ........ ........ %sub1 %sub2 %sub3 %sub4
}
@@ -0,0 +1,11 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
{
[
sub1 00000000 a:8 b:8 c:8
sub2 00000001 a:8 b:8 c:8
sub3 00000010 a:8 b:8 c:8
]
sub4 000000 d:2 a:8 b:8 c:8
}
@@ -0,0 +1,13 @@
# This work is licensed under the terms of the GNU LGPL, version 2 or later.
# See the COPYING.LIB file in the top-level directory.
# Verify deeper nesting, and a single element in the groups.
{
[
{
[
sub1 00000000 a:8 b:8 c:8
]
}
]
}