Commit Graph
518 Commits
Author SHA1 Message Date
elforeign 131c8669cf isa, decoder, shader: move the SOPP control forms into the semantic registry (#215)
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>
2026-11-24 10:00:42 -06:00
Ranveer Soni fb0544652b Merge pull request #317 from elforeign/task/215-smov
isa, decoder, shader: move s_mov_b32 into the semantic registry (#215)
2026-11-24 21:13:46 +05:30
elforeign bdcdd57c55 docs: s_mov_b32 is now a registry SOP1 form (#215)
Review finding: the scalar ALU page still called it hand-written.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
archive/pull/317/head
2026-11-24 09:39:39 -06:00
elforeign 5b894777ce Merge remote-tracking branch 'origin/main' into task/215-smov 2026-11-24 09:37:41 -06:00
elforeign dc44c5c64b isa, decoder, shader: move s_mov_b32 into the semantic registry (#215)
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>
2026-11-24 09:37:41 -06:00
Ranveer Soni b9f6985d57 Merge pull request #315 from zachdoxsee/task/244-delay-imports
loader: report delay-loaded PE imports in the static probe (#244)
2026-11-24 21:01:45 +05:30
zachdoxsee db40a1307d loader, cli: bound delay-load tables by their declared size (#244)
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>
archive/pull/315/head
2026-11-24 16:28:02 +01:00
zachdoxsee b174b45bed loader: report delay-loaded PE imports in the static probe (#244)
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>
2026-11-24 16:25:14 +01:00
Ranveer Soni 7504a5d48d Merge pull request #305 from LanaCodes-Boop/runtime/last-error-per-thread
loader: retire a guest thread's last error and test the per-TEB contract (#202)
2026-11-24 20:53:03 +05:30
Ranveer Soni 2b858ab7c6 Merge branch 'main' into runtime/last-error-per-thread archive/pull/305/head 2026-11-24 20:52:39 +05:30
Ranveer Soni 076f3e52aa Merge pull request #313 from elforeign/task/215-gpu-skip
scripts: restore the VOP1 oracle's GPU gate skip (#215)
2026-11-24 20:51:33 +05:30
Ranveer Soni e17e3bfc63 Merge pull request #314 from elforeign/task/215-sopk-oracle
isa, decoder, shader, ref: the sixteen SOPK integer forms through the semantic registry (#215)
2026-11-24 20:50:46 +05:30
Ranveer Soni 1915e2374c Merge pull request #297 from Swastickc/task/196-bit-scan-bit-test
loader: lower BSF, BSR and register BT in the ARM64 DBT (#196)
2026-11-24 20:49:54 +05:30
elforeign 6545a25b7b Merge remote-tracking branch 'origin/main' into task/215-sopk-oracle archive/pull/314/head 2026-11-24 09:12:11 -06:00
LanaCodes-Boop d5514aa9d8 Merge main into runtime/last-error-per-thread
Signed-off-by: LanaCodes-Boop <139008131+LanaCodes-Boop@users.noreply.github.com>
2026-11-24 12:10:25 -03:00
LanaCodes-Boop 7623fde0e7 loader: retire a guest thread's last error and test the per-TEB contract (#202)
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>
2026-11-24 12:10:20 -03:00
Ranveer Soni f2e6db03a9 Update README.md 2026-11-24 20:39:34 +05:30
LanaCodes-Boop 3a14bd98ab Merge main into runtime/last-error-per-thread
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>
2026-11-24 12:08:04 -03:00
elforeign d31b8ef20c scripts: restore the VOP1 oracle's GPU gate skip (#215)
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>
archive/pull/313/head
2026-11-24 09:07:18 -06:00
elforeign 81cfe69143 Merge remote-tracking branch 'origin/main' into task/215-sopk-oracle
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
2026-11-24 09:06:03 -06:00
elforeign 91fe3f345b isa: cmov reads SCC in the registry validator (#215)
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>
2026-11-24 09:05:49 -06:00
Ranveer Soni 0a722d2e60 Merge pull request #310 from soggyramennoodle/feat/system-runtime-expansion
System runtime: Win32 services, CRT, sync, guest callbacks and sysinfo
2026-11-24 20:30:19 +05:30
Ranveer Soni 738b518a26 Merge branch 'main' into feat/system-runtime-expansion archive/pull/310/head 2026-11-24 20:29:27 +05:30
elforeign 0cf4e8a9e9 docs: status rows for the sixteen SOPK forms (#215)
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 08:58:43 -06:00
Ranveer Soni 9f8dc3a912 Merge pull request #309 from elforeign/task/215-vop1-int-oracle
ref, validation: independent oracle for six VOP1 integer forms (#215)
2026-11-24 20:27:25 +05:30
Ranveer Soni d6f21217a2 Merge branch 'main' into task/215-vop1-int-oracle archive/pull/309/head 2026-11-24 20:27:11 +05:30
Ranveer Soni 9478795696 Merge pull request #308 from elforeign/task/215-vopc-wide-oracle
ref, validation: independent oracle for the Wave32 16-bit and 64-bit integer compares (#215)
2026-11-24 20:26:40 +05:30
elforeign d8c117cdd3 docs: SOPK contract, coverage and changelog (#215)
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 08:55:52 -06:00
elforeign 9ef9537540 isa, decoder, shader: SOPK integer forms through the semantic registry (#215)
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>
2026-11-24 08:55:52 -06:00
elforeign 081f9c9e06 fixtures: add an original SOPK scalar-immediate fixture (#215)
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>
2026-11-24 08:55:52 -06:00
Adeeb RahmanandCursor 17fa47f058 Add CRT onexit tables, atexit and _cexit
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>
2026-11-24 09:52:50 -05:00
elforeign 3250ae8fd1 Merge remote-tracking branch 'origin/main' into task/215-vop1-int-oracle 2026-11-24 08:51:35 -06:00
elforeign 6ff79431bc validation: swap rejections for v0, honest pending-load labels (#215)
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>
2026-11-24 08:51:35 -06:00
elforeign c1fc4d373f Merge remote-tracking branch 'origin/main' into task/215-vopc-wide-oracle archive/pull/308/head 2026-11-24 08:50:10 -06:00
elforeign 1b4911ffea validation, docs: close the wide-compare review gaps (#215)
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>
2026-11-24 08:50:10 -06:00
Adeeb Rahman 6c460f7c1c Merge upstream main a2a6a56 into system runtime branch
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 09:48:20 -05:00
Adeeb RahmanandCursor 8d7f7fadb4 Add guest system information, calendar time and sleeping
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>
2026-11-24 09:48:16 -05:00
Ranveer Soni a2a6a56222 Update README.md 2026-11-24 20:17:47 +05:30
elforeign fbe1d3c4d1 Merge remote-tracking branch 'origin/main' into task/215-sopk-oracle 2026-11-24 08:47:37 -06:00
elforeign 8f67a9680d scripts, changelog: VOP1 integer oracle; skip its Metal test until the translator lands (#215)
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 08:46:52 -06:00
elforeign 74af0d8eb9 scripts: skip the wide-compare Metal oracle in the GPU gate until the translator lands (#215)
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>
2026-11-24 08:46:52 -06:00
elforeign 4bc268c931 Merge remote-tracking branch 'origin/main' into task/215-vop1-int-oracle 2026-11-24 08:45:35 -06:00
elforeign 0b00fb378d docs, validation: document the 16-bit and 64-bit compare oracle subset (#215)
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>
2026-11-24 08:44:01 -06:00
elforeign d5437c1c18 Merge remote-tracking branch 'origin/main' into task/215-vopc-wide-oracle 2026-11-24 08:43:19 -06:00
Ranveer Soni ad4d07492d Merge pull request #299 from jelly013/task/155-cpu-known-answers
test(loader): x86-64 architectural known answers from the Intel SDM (#155)
2026-11-24 20:12:42 +05:30
Ranveer Soni 65bf3ec3fc Merge pull request #293 from Swastickc/task/290-shared-gpu-context
ffi: share one Metal device and queue across frame-loop sessions (#290)
2026-11-24 20:12:20 +05:30
Ranveer Soni 0afae6fa45 Merge pull request #304 from elforeign/task/215-m27
isa, decoder, shader: move the six VOP2 logical and shift forms into the registry (#215)
2026-11-24 20:11:45 +05:30
Adeeb Rahman 143429ceeb Merge upstream main a2cc14d into system runtime branch
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 09:41:43 -05:00
Adeeb RahmanandCursor 1eae910ce1 Let services call guest code and continue after it returns
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>
2026-11-24 09:41:39 -05:00
jelly013 c586a4a82a test(loader): tighten the x86-64 known answers after review (#155)
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>
archive/pull/299/head
2026-11-24 15:41:20 +01:00