diff --git a/.gitignore b/.gitignore index 56c77c4..7e912eb 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ __pycache__/ *.pyc +/diagnostics/probe/ /diagnostics/gta6-candidate-*/ /diagnostics/gta6-check/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f5324e..c2efe1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ remains unsupported. - Release and bench builds now use fat link-time optimization with one codegen unit (#116). On a local Apple M5, `dbt_bench` medians over five alternating runs dropped by about 6 % for the interpreter (903 to 845 µs) and about 9 % for cold DBT (1.155 to 1.046 ms), while warm DBT (cache hits) became about 2 % slower (21.83-22.08 to 22.29-22.54 µs over four further runs). The `xenora` binary shrank from 2.73 to 2.11 MB. A clean release build of the workspace takes about 14 s instead of 6 s. Debug and test builds are unchanged. - The ARM64 assembler loads 64-bit constants with the fewest MOVZ or MOVN plus MOVK instructions (#92). It no longer emits MOVK for zero halfwords and starts from MOVN when more halfwords are 0xFFFF than zero, so small negative values take one instruction instead of four. On Apple M5 the DBT benchmark emits 245,168 instead of 290,184 native bytes for its 626 blocks (-15.5%) and the 1,048 integer fixture instructions 128,724 instead of 145,732 (-11.7%); benchmark run times did not change measurably. New tests check the sequences against LLVM encodings and execute 1,056 of them on the host through the JIT. - Resolve the tiled BC1 mip and array layer once per linearization and copy contiguous block runs within each tile row. Partial edge blocks are retained and padding slots are skipped. Closes #349. +- Changed the default report folder of `xenora probe` and `xenora imports sync` to `diagnostics/probe`, which Git ignores (#364). Anyone relying on the earlier default has to pass `--report`. - Relocation reports now build their type histogram once per image, avoiding a tree lookup for every entry. Target checks and fixup order are unchanged; synthetic regressions and an opt-in relocation timing test cover the change (#109). - Moved the six supported gfx1030 SOPP compute control forms into the semantic registry, preserving instruction decoding and shader lowering. Part of #215. - Moved gfx1030 `s_mov_b32` (SOP1) into the semantic registry, preserving its existing decode domain and shader output. The move operand rule retains explicit VCC and EXEC half destinations. Part of #215. diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index a9c85a1..55ba78d 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -6,6 +6,9 @@ mod shaders; use std::process::ExitCode; +/// Where `probe` writes and `imports sync` reads without `--report`. +const DEFAULT_REPORT_DIR: &str = "diagnostics/probe"; + fn main() -> ExitCode { match std::env::args().nth(1).as_deref() { Some("info") => { @@ -46,7 +49,7 @@ fn main() -> ExitCode { let args: Vec = std::env::args().collect(); let mut pe_path: Option = None; let mut mode = "static".to_string(); - let mut report_dir = "diagnostics/gta6-candidate-e95020b2".to_string(); + let mut report_dir = DEFAULT_REPORT_DIR.to_string(); let mut i = 2; while i < args.len() { @@ -373,7 +376,7 @@ fn run_imports_generate_cli(args: &[String]) -> ExitCode { } fn run_imports_sync_cli(args: &[String]) -> ExitCode { - let mut report_dir = "diagnostics/gta6-candidate-e95020b2".to_string(); + let mut report_dir = DEFAULT_REPORT_DIR.to_string(); let mut check_mode = false; let mut i = 0; diff --git a/crates/cli/tests/default_report.rs b/crates/cli/tests/default_report.rs new file mode 100644 index 0000000..3164f14 --- /dev/null +++ b/crates/cli/tests/default_report.rs @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +//! Default report folder of `xenora probe` and `xenora imports sync`. + +use std::process::Command; + +#[test] +fn probe_and_sync_use_the_same_default_folder() { + let fixture = concat!( + env!("CARGO_MANIFEST_DIR"), + "/../../fixtures/pe/delay-imports.exe" + ); + let folder = std::env::temp_dir().join(format!("xenora-default-{}", std::process::id())); + std::fs::create_dir(&folder).unwrap(); + for arguments in [&["probe", "--pe", fixture][..], &["imports", "sync"]] { + let status = Command::new(env!("CARGO_BIN_EXE_xenora")) + .args(arguments) + .current_dir(&folder) + .status() + .unwrap(); + assert!(status.success(), "{arguments:?}"); + } + let written = ["imports.csv", "import_backlog.md"] + .map(|name| folder.join("diagnostics/probe").join(name).is_file()); + std::fs::remove_dir_all(folder).unwrap(); + assert_eq!(written, [true, true]); +} diff --git a/docs/interfaces.md b/docs/interfaces.md index a03ad56..b00bd7a 100644 --- a/docs/interfaces.md +++ b/docs/interfaces.md @@ -70,7 +70,8 @@ uses a Win64-aligned stack and terminates with HLT. The result includes the load guest memory and the entry execution outcome. `xenora probe --mode static` inventories ordinary and delay-loaded PE imports -without guest execution. `missing_imports.csv` lists unresolved ordinary keys +without guest execution. Without `--report` it writes to `diagnostics/probe`, +where `xenora imports sync` also looks. `missing_imports.csv` lists unresolved ordinary keys with their import address table relative virtual addresses. The full inventory, `imports.csv`, marks each entry `ordinary` or `delayed` in its `import_table` column and records whether each key is registered, its implementation