fix info stream layout

This commit is contained in:
Nikita Smith
2026-04-10 17:02:04 -07:00
parent 686b64c357
commit c5dc7bee3e
7 changed files with 818 additions and 428 deletions
+25
View File
@@ -69,4 +69,29 @@ T_BeginTest(str8_list_substr)
}
}
T_BeginTest(bit_array)
{
for (U64 start=0; start<32*3; start++) {
for (U64 end=start; end<32*3; end++) {
U32 v[3] = { 0 };
for (U64 i=start; i<end; i++) {
v[i/32] |= 1 << (i%32);
}
for (U64 lo=0; lo<32*3; lo++) {
for (U64 hi=0; hi<32*3; hi++) {
U64 expected_idx = Min(hi, end) - 1;
B32 expected_r = hi <= start || lo >= end || lo >= hi || start >= end ? 0 : 1;
U64 idx = bit_array_scan_right_to_left32((U32Array){.v=v, .count=ArrayCount(v)}, lo, hi, 1);
B32 r = idx < hi;
T_Ok(r == expected_r);
if (r) {
T_Ok(idx == expected_idx);
}
}
}
}
}
}
#undef T_Group
+8
View File
@@ -76,6 +76,7 @@
#include "ui/ui_inc.h"
#include "dbg_engine/dbg_engine_inc.h"
#include "raddbg/raddbg_inc.h"
#include "linker/base_ext/base_crc32.h"
#include "linker/base_ext/base_core.h"
#include "linker/base_ext/base_arena.h"
#include "linker/base_ext/base_arrays.h"
@@ -83,6 +84,9 @@
#include "linker/thread_pool/thread_pool.h"
#include "linker/codeview_ext/codeview.h"
#include "linker/pdb_ext/msf_builder.h"
#include "linker/pdb_ext/pdb.h"
#include "linker/pdb_ext/pdb_helpers.h"
#include "linker/pdb_ext/pdb_builder.h"
#include "linker/lnk_cmd_line.h"
#include "linker/lnk_cmd_line.c"
#include "linker/lnk_log.h"
@@ -148,9 +152,13 @@
#include "linker/base_ext/base_arena.c"
#include "linker/base_ext/base_arrays.c"
#include "linker/base_ext/base_bit_array.c"
#include "linker/base_ext/base_crc32.c"
#include "linker/thread_pool/thread_pool.c"
#include "linker/codeview_ext/codeview.c"
#include "linker/pdb_ext/msf_builder.c"
#include "linker/pdb_ext/pdb.c"
#include "linker/pdb_ext/pdb_helpers.c"
#include "linker/pdb_ext/pdb_builder.c"
#include "torture.c"
#include "torture_base.c"