Add @(require_results) where missing

This commit is contained in:
gingerBill
2026-06-23 13:24:25 +01:00
parent f3a275c4dc
commit 19bb9070e1
3 changed files with 6 additions and 2 deletions

View File

@@ -66,6 +66,7 @@ decode :: proc(
}
@(require_results)
decode_one :: proc(
data: []u8,
relocs: []Relocation,
@@ -230,7 +231,7 @@ decode_one :: proc(
// Which index space the IDX immediate in operand slot `which` addresses, by
// mnemonic. Mirrors how the builders in instructions.odin tag each operand.
@(private="file")
@(private="file", require_results)
idx_kind_for :: #force_inline proc "contextless" (m: Mnemonic, which: int) -> Index_Kind {
#partial switch m {
case .BR, .BR_IF: return .LABEL
@@ -247,7 +248,7 @@ idx_kind_for :: #force_inline proc "contextless" (m: Mnemonic, which: int) -> In
return .NONE
}
@(private="file")
@(private="file", require_results)
reloc_label_at :: #force_inline proc "contextless" (relocs: []Relocation, offset: u32) -> (label_id: u32, found: bool) {
for r in relocs {
if r.offset == offset {

View File

@@ -132,6 +132,7 @@ write_uleb_padded5 :: #force_inline proc "contextless" (code: []u8, offset: ^u32
}
}
@(require_results)
uleb_size :: #force_inline proc "contextless" (value: u64) -> u32 {
v := value
n: u32 = 1
@@ -141,6 +142,7 @@ uleb_size :: #force_inline proc "contextless" (value: u64) -> u32 {
return n
}
@(require_results)
sleb_size :: #force_inline proc "contextless" (value: i64) -> u32 {
v := value
n: u32 = 0

View File

@@ -41,6 +41,7 @@ Print_Options :: isa.Print_Options
Print_Result :: isa.Print_Result
DEFAULT_PRINT_OPTIONS :: isa.DEFAULT_PRINT_OPTIONS
@(require_results)
mnemonic_to_string :: proc(m: Mnemonic, lowercase: bool = true, allocator := context.temp_allocator) -> string {
sb := strings.builder_make(allocator)
write_mnemonic(&sb, m, !lowercase)