The guest time zone is UTC with no daylight transition. Processor
topology reports one core per profile processor and one package; no
simulated cache entries are reported.
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
Each PF_* feature is present only when guest CPUID reports every bit it
depends on, so startup code cannot pick instruction sets the translator
does not advertise. Features without a CPUID test report FALSE.
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
_msize, _recalloc, _aligned_malloc, _aligned_realloc, _aligned_msize
and _aligned_free on the CRT heap. Aligned blocks are tracked so double
and mismatched frees stop the guest.
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
__std_exception_copy duplicates an owned message on the CRT heap and
shares a borrowed one; __std_exception_destroy frees an owned message
and clears the record.
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
xenora imports coverage lists every standard runtime service by module
and status and where the import metadata disagrees with the registry.
It found six kernel32 services the metadata still classified as stubs.
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
__std_type_info_compare, __std_type_info_hash, __std_type_info_name and
__std_type_info_destroy_list compare and hash by decorated name and
undecorate plain class, struct, union and enum names. Decorations they
do not model stop the guest instead of returning a wrong name.
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
XInputGetState, XInputSetState, XInputGetCapabilities and XInputEnable
on xinput1_4.dll, reachable from xinput1_3.dll and xinput9_1_0.dll.
Readings come from a host-connected ControllerSource; without one,
every slot reports ERROR_DEVICE_NOT_CONNECTED.
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
FIONREAD reports unread stream bytes or the size of the next datagram.
FIONBIO accepts non-blocking mode; blocking mode returns WSAEOPNOTSUPP
because loopback sockets never block.
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
Stream sockets listen, accept and connect between guest sockets on
127.0.0.1 inside the runtime; no host socket is opened. Each socket
buffers up to 64 KiB, send takes what fits, recv returns 0 at end of
file after shutdown(SD_SEND) or closesocket, and sending to a closed
peer reports WSAECONNRESET. WSAPoll reports listen-queue readiness,
write space and POLLHUP. TCP and UDP ports are separate namespaces.
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
MoveFileExW accepts MOVEFILE_REPLACE_EXISTING, MOVEFILE_WRITE_THROUGH
and MOVEFILE_COPY_ALLOWED. A closed file may atomically replace another
closed file on a host mount or the synthetic C: drive; directories are
never replaced, and open files can neither move nor be replaced. Write
through flushes both host directories. Moves between drives report
ERROR_NOT_SAME_DEVICE, or ERROR_NOT_SUPPORTED when a copy is allowed.
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
MoveFileW now renames closed files and directories inside one writable
host mount using an exclusive host rename (renameatx_np RENAME_EXCL on
macOS, renameat2 RENAME_NOREPLACE on Linux), so an existing name is
never replaced. A change of case alone renames in place. Open files,
read-only mounts, the mount root and moves between drives fail with
explicit Win32 errors.
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
HostMount::with_quota limits the net bytes and the number of files and
directories guest operations add to a writable mount. Win32 writes,
extending SetEndOfFile, CreateFileW, CreateDirectoryW, GetTempFileNameW
and CRT fopen/fclose are charged; deletion and shrinking give the
amount back, never below zero. Exceeding a limit fails with
ERROR_DISK_FULL (CRT ENOSPC) and leaves the host unchanged.
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
Linux unlinkat rejects AT_EMPTY_PATH, and macOS never compiled that path,
so every remove was already name-based. State the in-mount TOCTOU plainly.
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
Conflicts: CHANGELOG.md, where both entries are kept; the generated
crates/loader/src/x86_table.rs, rebuilt with generate_x86.py from the
merged instructions.toml; and one sentence of
docs/cpu/instruction-registry.md, where the list of rejected
instructions now drops both RCL/RCR (from #351) and the fences.
Signed-off-by: zachdoxsee <zachdoxsee36@gmail.com>
`xenora probe` and `xenora imports sync` defaulted to a folder named after
one commercial game. Give both one shared default, `diagnostics/probe`, and
ignore it in Git. Keep the old ignore rules so existing local reports stay
out of commits.
Closes#364
Signed-off-by: jelly013 <22855910+jelly013@users.noreply.github.com>
The instruction registry document listed fences among the forms
rejected on purpose. This branch accepts them and explains why in the
new memory-ordering section, so the list no longer names them.
Signed-off-by: sahib453 <117431595+sahib453@users.noreply.github.com>
The instruction registry document listed RCL and RCR among the forms
rejected on purpose. This branch implements them, so the list no longer
names them. SHLD and SHRD stay on it.
Signed-off-by: sahib453 <117431595+sahib453@users.noreply.github.com>
Both engines refused the three fences as illegal instructions, and no
document said what ordering guest memory accesses have.
- instructions.toml, x86_table.rs (generated): the register forms of
0F AE digits 5, 6 and 7. The memory forms stay undeclared.
- x86_exec.rs: a fence changes nothing. Each engine runs one guest
instruction at a time on one host thread and completes its loads and
stores before the next, so accesses are already totally ordered.
- docs/cpu/instruction-registry.md: states that ordering, why the
fences are no-ops under it, and that it holds only while guest
threads do not run on several host threads.
- Tests: five single-thread known-answer cases, three assembled
fixtures, two rejected memory forms, and MASKMOVDQU as the refused
SSE2 instruction in cpu_features.rs now that MFENCE runs.
No multi-thread behaviour is established.
Signed-off-by: sahib453 <117431595+sahib453@users.noreply.github.com>
With the overflow exception unmasked, an overflow whose result is exact
before the exponent is bounded set the MXCSR precision flag as well as
the overflow flag. The Intel SDM (Vol. 1, D.4.2.3, Table D-16) reports
precision there only if rounding with an unbounded exponent is inexact.
- softfloat.rs: Control reads the overflow mask, and round() reports
precision on an unmasked overflow only when the result was rounded.
The masked response is unchanged.
- cpu_known_answers.rs: the five exact-overflow cases are no longer an
ignored defect, three more cover the other rounding modes, and the
scalar and conversion sweeps now compare the precision flag here.
- docs/cpu/instruction-registry.md: the behaviour is no longer listed
as unasserted.
Signed-off-by: sahib453 <117431595+sahib453@users.noreply.github.com>
Address review feedback: introduce AMD RDNA2 desktop GPU (gfx1030) before the internal codename, define the LLVM three-way decoder check, document the Apple M5 status spelling, use GitHub logins in acceptance records, and mark the independence rule as proposed pending maintainer confirmation.
Signed-off-by: Vedant Dadhich <vedantdadhich21@gmail.com>
Add scripts/cpu-tests.sh, which lists the default-feature workspace test
targets, runs shard K of N of them in a fixed round-robin order, and checks
that N shards cover every target exactly once. It fails when Cargo cannot
build the workspace instead of running a partial list. The full gate
(cargo test --locked --workspace) and scripts/test-gpu.sh are unchanged.
Record the measured gate cost and the selected-versus-full comparison in
docs/testing/cpu-coverage.md, index it in docs/README.md, and add a
changelog entry.
Signed-off-by: Swastickc <28708247+Swastickc@users.noreply.github.com>
* isa, decoder: VOP3 encodings of the eleven registry VOP2 integer forms (#215)
Eleven [[encoding_variant]] entries re-encode the VOP2 integer forms as
VOP3A (_e64) under operand rule vop3_vgpr2: two VGPR sources, no
modifiers, SRC2 the unused inline zero. Opcodes from the pinned XML,
checked against llvm-mc. Decoder known words and per-bit rejections.
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
* fixtures, decoder, shader: LLVM-assembled fixture and goldens for the eleven VOP3 VOP2 variants (#215)
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
* ref, validation: independent guide-derived oracle for VOP3 integer VOP2 forms and Wave32 VOP3 compares (#215)
crates/ref and tests/validation/independent_ref.rs decode and run the eleven
VOP3A (_e64) integer VOP2 forms and the sixteen V_CMP_*_{I32,U32}_e64 compares
writing a 32-bit lane mask to one SGPR (s0-s105) or vcc_lo, derived from the
AMD RDNA 2 guide only. New suites vop3_integer.rs and vop3_compare.rs, with
ignored native Metal parts.
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
* isa, decoder, shader: add VOP3A encodings for the sixteen integer compares (#215)
Sixteen gfx1030 Wave32 integer compares gain their VOP3A (_e64) encoding
as registry variants, with an explicit SGPR mask destination (guide 3.9,
13.3.3; pinned XML OPR_SREG), VCCZ branching through vcc_lo and
translation errors for reads of runtime-only SGPR results.
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
* fixtures, shader, validation: VOP3A compare fixture and native Metal runs (#215)
A fixture with all sixteen VOP3A integer compares (vcc_lo destination,
runtime s_cbranch_vccz) ties the new variants to fixture coverage, with
IR and MSL goldens. The VOP3 integer and compare Metal oracles now run in
the GPU gate: the translator they waited for is in this branch.
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
* changelog: VOP3A integer and compare encodings (#215)
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
* shader, fixtures, docs: e64 compare names in the IR; status rows for the 27 VOP3A forms (#215)
The IR names a VOP3A compare by its _e64 mnemonic and prints its SGPR
destination; VOPC output is unchanged. The compare fixture now uses a
mid-range second source (so swapped unsigned opcodes change the golden)
and one plain SGPR destination. docs/status.toml and the rendered
instruction table list the 27 new forms.
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
* docs: use a recognized lowering phrase for the VOP3A integer rows (#215)
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
* isa: VOP3A variants exist only for the 32-bit VOPC compares (#215)
After main gained the 16-bit compares (#327), the dispatch test expected a
VOP3A encoding for every non-64-bit compare. Only the 32-bit ones have one.
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
---------
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>