The six supported gfx1030 SOPP compute control forms are now described in
crates/isa/semantics/rdna2/sopp.toml, and the decoder and shader dispatch
from the registry. A sweep over all 128 SOPP opcodes, 13 SIMM16 values and
two stream positions (3,328 records) is identical before and after.
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
s_mov_b32 was the last hand-written SOP1 decode path. It becomes
ScalarUnaryOp::MovB32 under a new sop1_move operand rule that matches the
old hand-written domain exactly (it accepts more SDST and SSRC0 classes
than sop1_sgpr, which other unary forms keep).
A decode sweep of 33,664 s_mov_b32 words shows no behaviour change: the
21,010 accepted words differ only in the instruction's name and the 12,654
rejections are identical. IR and MSL goldens are unchanged.
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
Address review on the delay-import probe change:
- Read only descriptors inside the delay import directory's declared
size, and require that size to hold the terminating empty descriptor.
- Require each descriptor's DLL name, import address table and import
name table to be present and to start in section data, with a
diagnostic naming the missing field.
- Leave delayed rows out of the xenora imports sync backlog, so its
totals stay ordinary-only.
Signed-off-by: zachdoxsee <zachdoxsee36@gmail.com>
Read the PE32+ delay-load directory (data directory 13) with a bounded
parser and list each delay-loaded import in imports.csv, marked by a new
import_table column. Ordinary totals and missing_imports.csv are
unchanged; the JSON report counts delayed slots and DLLs separately and
carries a diagnostic for truncated, out-of-range or unsupported tables.
Adds an original fixture with ordinary and delayed imports, generated by
fixtures/pe/delay-imports.py and cross-checked with llvm-readobj.
Signed-off-by: zachdoxsee <zachdoxsee36@gmail.com>
main keeps the last error per TEB since #310. This adds the missing
retirement step, so a reused TEB address starts at zero, and two
conformance tests: a successful call keeps a nonzero error, and one
thread's failure does not reach another.
Signed-off-by: LanaCodes-Boop <139008131+LanaCodes-Boop@users.noreply.github.com>
main gained per-TEB last-error handling in #310. The conflicts in
CHANGELOG.md, services.rs and runtime_services.rs are resolved to main's
version, which drops this branch's separate thread-context mechanism.
Signed-off-by: LanaCodes-Boop <139008131+LanaCodes-Boop@users.noreply.github.com>
The merge of #309 kept only the wide-compare skip, so scripts/test-gpu.sh
runs vop1_integer_forms_match_the_guide_on_native_metal, which fails until
the translator implements the VOP1 integer forms.
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
A form declared operation = "cmov" without carry_in = "scc" passed
validation and would have generated a move that never writes D. The new
generator test fails without the fix.
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
Declares s_movk_i32, s_cmovk_i32, s_cmpk_{eq,lg,gt,ge,lt,le}_{i32,u32},
s_addk_i32 and s_mulk_i32 as registry data under the new operand rules
sopk_sgpr and sopk_compare (SDST s0-s105 only, SIMM16 never a literal),
with the operations mov and cmov, the sext_simm16 primitive and an XML
check of the 16-bit immediate. The decoder dispatches them through the
generated ScalarImmediateOp and ScalarImmediateCompareOp (the fixed
0xbbfd0000 fence keeps its own decoding) and the translator folds them
into its scalar state like SOP2 and SOPC, refusing writes to s0-s7.
The guide-derived oracle in tests/validation/tests/sopk.rs is unchanged.
Adds IR and MSL goldens for the new fixture, LLVM-checked decoder words,
a known answer, an isa dispatch test and generator unit tests.
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
Uses all sixteen s_*k_* integer forms: the twelve s_cmpk compares split
signed from unsigned SIMM16 extension, s_addk_i32 sets SCC on signed
overflow, s_mulk_i32 leaves it alone and s_cmovk_i32 moves only while
SCC is set. The expected input ^ 0x40008275 is worked out by hand in the
file from guide section 12.2.
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
Exit functions are guest code run through callback tasks in reverse
registration order. Table storage lives on the default guest heap.
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
v_swap_b32 gains rejections for v0 as SRC0 and as VDST under full EXEC.
Its outstanding-load case is a VDST read, so it is labelled as one. The
GPU gate skip names #215.
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
A CPU test checks that the production compiler still rejects all 28
forms, and each 64-bit form gains a rejection for v255 as VSRC1 after an
inline integer (dropping that check in the second interpreter now fails
the rejection test). Docs and counts follow.
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
The guest sees a configurable simulated machine, kept separate from the
detected host hardware. Sleeping goes through the injectable clock.
Move the PE fixture harness into a shared test support module.
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
The ignored native Metal test fails today because the translator rejects
the 16- and 64-bit compares; scripts/test-gpu.sh runs every ignored
semantic-review test, so it skips this one by name.
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
vector-compare.md gains section 2a for the subset the reference
interpreters accept, and no longer says the reference rejects these
forms. vopc_f_t.rs stops listing the 64-bit F/T opcodes as unsupported:
the reference accepts them now, and the check passed only because v2 of
the v[1:2] pair was uninitialized.
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
Add callback tasks to the import dispatcher. A task runs guest callbacks
on a reserved stack frame, checks the nonvolatile registers after each,
and returns to the original caller. Use it for qsort, qsort_s, bsearch,
bsearch_s, _initterm, _initterm_e, InitOnceExecuteOnce and FlsFree
cleanup callbacks.
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Pin MXCSR for a flushed exact tiny result, PE for unmasked overflow and
underflow, and run the sweeps with each exception unmasked alone. Require a
refused form to stop at its exact instruction with all state unchanged,
assert the cached DBT run hits the cache, and check the fallback counter for
every straight-line case. Add a faulting zero-count memory shift.
The tighter checks expose one more defect, kept as an ignored test: an exact
unmasked overflow sets PE as well as OE.
Correct the chronology: 700 table cases were written before the CPU source
was read, and the other cases and the sweeps afterwards. The message of
1c5c320 says otherwise.
Signed-off-by: jelly013 <22855910+jelly013@users.noreply.github.com>