Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthropics/claudes-c-compiler
/ functions
Functions
6,057 in github.com/anthropics/claudes-c-compiler
⨍
Functions
6,057
◇
Types & classes
346
↓ 13 callers
Function
decode_pua_byte
Decode a byte from the lexer's input, converting PUA-encoded bytes back to their original values. Returns the decoded byte and how many input bytes we
src/common/encoding.rs:80
↓ 13 callers
Method
decomposes_complex_double
Returns true if the target decomposes _Complex double into two separate FP scalar arguments/returns (real, imag) rather than passing as a struct. On x
src/ir/lowering/lower.rs:308
↓ 13 callers
Method
decomposes_complex_float
Returns true if the target decomposes _Complex float into two separate FP scalar arguments rather than passing as a struct. On i686: false (8 bytes fi
src/ir/lowering/lower.rs:316
↓ 13 callers
Method
encode_avx_scalar_3op
Encode AVX scalar 3-operand instruction (e.g. vmulss, vaddss) pp: 2=F3 (single), 3=F2 (double)
src/backend/x86/assembler/encoder/avx.rs:444
↓ 13 callers
Function
encode_b
B-type: imm[12|10:5] | rs2 | rs1 | funct3 | imm[4:1|11] | opcode
src/backend/riscv/assembler/encoder/mod.rs:294
↓ 13 callers
Method
eval_const_expr_for_designator
Evaluate a constant expression and return as usize (for array index designators).
src/ir/lowering/const_eval.rs:561
↓ 13 callers
Function
f128_bytes_to_x87_bytes
Convert f128 bytes to x87 80-bit bytes. This is a lossy narrowing conversion (112-bit mantissa → 64-bit mantissa) used when x87 format is needed (x86
src/common/long_double.rs:886
↓ 13 callers
Function
f128_is_zero
Helper: check if f128 is zero
src/common/long_double.rs:1905
↓ 13 callers
Function
for_each_operand_in_instruction
Iterate over all Operand references in an instruction. This is the single canonical source of truth for instruction operand traversal. All code that n
src/backend/liveness.rs:952
↓ 13 callers
Method
get_struct_base_addr
Get the base address of a struct variable (for member access). For struct locals, the alloca IS the struct base. For struct globals, we emit GlobalAdd
src/ir/lowering/structs.rs:345
↓ 13 callers
Method
infer_expr_ctype
Infer the CType of an expression using ExprTypeChecker.
src/frontend/sema/const_eval.rs:534
↓ 13 callers
Method
is_pointer_like
Whether this is a pointer type (including arrays which decay to pointers).
src/common/types.rs:1644
↓ 13 callers
Method
is_static
(&self)
src/frontend/parser/ast.rs:78
↓ 13 callers
Method
max_value_id
(&self)
src/ir/module.rs:321
↓ 13 callers
Method
offset_of
Look up the offset of a previously-added string. Returns 0 if not found.
src/backend/elf/string_table.rs:40
↓ 13 callers
Function
parse_int_literal
(s: &str)
src/backend/riscv/assembler/parser.rs:1053
↓ 13 callers
Function
parse_integer_expr
Parse an integer expression with full operator precedence. Supports: |, ^, &, <<, >>, +, -, *, /, %, ~, parentheses. Falls back to simple integer pars
src/backend/asm_expr.rs:308
↓ 13 callers
Function
parse_st_num
Parse x87 register number: "st(0)" -> 0, "st" -> 0, "st(1)" -> 1, etc.
src/backend/i686/assembler/encoder/registers.rs:102
↓ 13 callers
Method
parse_type_specifier
Parse a complete type specifier. Returns None if no type specifier found. Handles arbitrary ordering of type keywords (C allows "long unsigned int" o
src/frontend/parser/types.rs:45
↓ 13 callers
Method
parsing_const
(&self)
src/frontend/parser/parse.rs:155
↓ 13 callers
Function
replace_value_in_place
(val: &mut Value, copy_map: &[Option<Operand>])
src/passes/copy_prop.rs:363
↓ 13 callers
Function
simplify_cfg
Simplify the CFG of a single function. Iterates until no more simplifications are possible (fixpoint). Builds the `label_to_idx` map once per fixpoin
src/passes/cfg_simplify.rs:54
↓ 12 callers
Method
alignof_type
Compute the alignment of a type in bytes (_Alignof).
src/ir/lowering/types.rs:404
↓ 12 callers
Function
assert_div_matches
(a: &[u8; 16], b: &[u8; 16], label: &str)
src/common/long_double.rs:2834
↓ 12 callers
Function
collect_op
(op: &Operand, f: &mut impl FnMut(u32))
src/passes/licm.rs:270
↓ 12 callers
Method
define_macro
Define a macro from a command-line -D flag. Takes a name and value (e.g., name="FOO", value="1").
src/frontend/preprocessor/pipeline.rs:689
↓ 12 callers
Method
elf_type
Get the ELF relocation type number
src/backend/arm/assembler/encoder/mod.rs:95
↓ 12 callers
Method
emit_addi_s0
Emit: `dest_reg = s0 + offset`, handling large offsets.
src/backend/riscv/codegen/emit.rs:251
↓ 12 callers
Function
encode_alu_imm
(operands: &[Operand], funct3: u32)
src/backend/riscv/assembler/encoder/base.rs:223
↓ 12 callers
Function
encode_alu_reg_w
(operands: &[Operand], funct3: u32, funct7: u32)
src/backend/riscv/assembler/encoder/base.rs:283
↓ 12 callers
Function
encode_cond
Encode a condition code string to 4-bit encoding.
src/backend/arm/assembler/encoder/mod.rs:169
↓ 12 callers
Function
encode_neon_two_misc
── NEON two-register misc (integer) ───────────────────────────────────── Encode NEON two-reg misc: ABS, NEG, CLS, CLZ, etc. Format: 0 Q U 01110 size
src/backend/arm/assembler/encoder/neon.rs:1407
↓ 12 callers
Method
encode_sse_rr_rm
Encode SSE instruction: load (xmm<-xmm/mem) or store (xmm->mem).
src/backend/x86/assembler/encoder/sse.rs:7
↓ 12 callers
Function
for_each_value_use_in_instruction
Iterate over Value references (non-Operand) used in an instruction. These are pointer/base values used directly (not wrapped in Operand), e.g., the `p
src/backend/liveness.rs:1001
↓ 12 callers
Function
gnu_hash
ELF hash functions for `.gnu.hash` and `.hash` section generation. Provides GNU and SysV hash computations used by linkers when building the dynamic
src/backend/linker_common/hash.rs:7
↓ 12 callers
Method
is_direct_slot
Check if a value has a direct stack slot (the slot holds the value itself, not a pointer to the value). This is true for allocas and promoted InlineAs
src/backend/state.rs:332
↓ 12 callers
Method
is_extern
(&self)
src/frontend/parser/ast.rs:80
↓ 12 callers
Function
is_wide_int_type
Check if a type is "wide" — needs register-pair operations on the current target. Only I128/U128 on all targets. On i686, I64/U64 BinOps are handled
src/backend/generation.rs:1392
↓ 12 callers
Function
is_ymm
Is this a YMM register?
src/backend/x86/assembler/encoder/registers.rs:73
↓ 12 callers
Method
load_ptr_to_reg_rv
Load the address of a pointer Value into the given register.
src/backend/riscv/codegen/emit.rs:464
↓ 12 callers
Method
operand_to_imm_i64
Extract an immediate integer value from an operand. Used for SSE/AES instructions that require compile-time immediate operands.
src/backend/x86/codegen/emit.rs:871
↓ 12 callers
Function
read_cstr
Read a null-terminated string from a byte slice starting at `offset`.
src/backend/elf/io.rs:47
↓ 12 callers
Method
resolve_field_ctype
Resolve the CType of a struct/union field, handling both direct member access (s.field) and pointer member access (p->field) through a single entry po
src/ir/lowering/lower.rs:347
↓ 12 callers
Function
scan_register_refs
(b: &[u8])
src/backend/x86/codegen/peephole/types.rs:1131
↓ 12 callers
Method
set_extern
(&mut self, v: bool)
src/frontend/parser/ast.rs:96
↓ 12 callers
Method
set_static
(&mut self, v: bool)
src/frontend/parser/ast.rs:94
↓ 12 callers
Method
set_typedef
(&mut self, v: bool)
src/frontend/parser/ast.rs:252
↓ 12 callers
Method
store_complex_parts
Store a complex value (real, imag) into an alloca.
src/ir/lowering/complex.rs:87
↓ 12 callers
Method
zero_init_alloca
Zero-initialize an entire alloca.
src/ir/lowering/lower.rs:1420
↓ 11 callers
Method
add_relocation_for_label
Add a relocation for a label that may contain `symbol+offset` or `symbol-offset`. Splits the label string and extracts the addend if present.
src/backend/i686/assembler/encoder/core.rs:166
↓ 11 callers
Method
align
Alignment in bytes. On i686, some types have alignment smaller than size (e.g. F128/long double is 12 bytes but aligned to 4, I64/U64 aligned to 4).
src/common/types.rs:1750
↓ 11 callers
Method
align_ctx
Alignment in bytes, with struct/union layout lookup via context. Uses the thread-local target pointer size for target-dependent types.
src/common/types.rs:1335
↓ 11 callers
Method
bool_normalize
Normalize a constant for _Bool storage: any nonzero value becomes I8(1), zero becomes I8(0). Implements C11 6.3.1.2: "When any scalar value is convert
src/ir/constants.rs:557
↓ 11 callers
Function
bytes_to_string
Convert raw bytes to a valid UTF-8 String. If the bytes are valid UTF-8, returns them as-is. Otherwise, processes byte-by-byte: valid UTF-8 sequences
src/common/encoding.rs:22
↓ 11 callers
Method
emit_f64_load_to_x87
Load an F64 (double) operand onto the x87 FPU stack. F64 values occupy 8-byte stack slots on i686, so we use fldl to load them directly from memory ra
src/backend/i686/codegen/emit.rs:569
↓ 11 callers
Method
emit_instr_reg_mem
(&mut self, mnemonic: &str, reg: &str, offset: i64, base: &str)
src/backend/common.rs:991
↓ 11 callers
Method
emit_load_operand
---- Standard trait methods (kept inline - arch-specific) ----
src/backend/i686/codegen/emit.rs:1273
↓ 11 callers
Method
encode_alu
Encode ALU operations (add/or/adc/sbb/and/sub/xor/cmp). `alu_op` is the operation number (0-7).
src/backend/x86/assembler/encoder/gp_integer.rs:404
↓ 11 callers
Method
encode_sse_cvt_xmm_to_gp
(&mut self, ops: &[Operand], opcode: &[u8], gp_size: u8)
src/backend/x86/assembler/encoder/sse.rs:304
↓ 11 callers
Method
expand_line_reuse
Expand macros in a line of text, reusing the provided `expanding` set. The set is cleared before use. This avoids allocating a new FxHashSet for every
src/frontend/preprocessor/macro_defs.rs:231
↓ 11 callers
Function
extract_modifier_symbol
Extract symbol name from %modifier(symbol) expressions
src/backend/riscv/assembler/encoder/pseudo.rs:573
↓ 11 callers
Function
f128_decompose
Helper: decompose f128 bytes into (sign, biased_exponent, mantissa_with_implicit_bit). For normal numbers, mantissa has bit 112 set (the implicit lead
src/common/long_double.rs:1886
↓ 11 callers
Function
find_param_alloca
Find the nth alloca instruction in the entry block (used for parameter storage).
src/backend/stack_layout/regalloc_helpers.rs:69
↓ 11 callers
Method
get_struct_layout
(&self, key: &str)
src/common/types.rs:103
↓ 11 callers
Function
layout_section
( name: &str, section_name_to_idx: &HashMap<String, usize>, output_sections: &mut [OutputSection],
src/backend/i686/linker/emit.rs:968
↓ 11 callers
Function
line_info_with_regs
(kind: LineKind, ts: u16, reg_refs: u16)
src/backend/x86/codegen/peephole/types.rs:190
↓ 11 callers
Method
lower_condition_expr
Lower a condition expression, ensuring floating-point values are properly tested for truthiness (masking sign bit so -0.0 is falsy). For complex types
src/ir/lowering/expr.rs:72
↓ 11 callers
Method
mov_load_for_type
Return the load mnemonic for a given type.
src/backend/i686/codegen/emit.rs:427
↓ 11 callers
Function
parse_insn_reg
(s: &str)
src/backend/riscv/assembler/encoder/compressed.rs:110
↓ 11 callers
Function
reg_to_32
Convert any x86 register name to its 32-bit variant. Accepts both 64-bit (x86-64) and 32/16/8-bit (i686) register names. For `r8`-`r15` (x86-64 only)
src/backend/x86_common.rs:92
↓ 11 callers
Method
skip_balanced_parens
(&mut self)
src/frontend/parser/parse.rs:1076
↓ 11 callers
Method
span
Extract the source span from this statement, if available. Used by IR lowering to propagate source locations for debug info.
src/frontend/parser/ast.rs:613
↓ 11 callers
Method
to_hash_key
Convert to a hashable key representation (using bit patterns for floats).
src/ir/constants.rs:245
↓ 11 callers
Function
tprel
Compute TP offset for AArch64. On AArch64, the TLS block starts at TP + 16 (TP points to the DTV, TLS block is right after). For Local Exec: tp_offset
src/backend/arm/linker/reloc.rs:184
↓ 11 callers
Method
write_expr_to_bytes_or_ptrs
Write a scalar expression value to either the byte buffer or ptr_ranges, depending on whether the target type is a pointer/function pointer. Handles:
src/ir/lowering/global_init_compound_ptrs.rs:657
↓ 10 callers
Method
as_bytes
(&self)
src/backend/i686/linker/mod.rs:46
↓ 10 callers
Function
assert_rem_matches
(a: &[u8; 16], b: &[u8; 16], label: &str)
src/common/long_double.rs:2887
↓ 10 callers
Method
bmi2_infer_w
Infer BMI2 W bit (0=32-bit, 1=64-bit) from destination register.
src/backend/x86/assembler/encoder/avx.rs:1098
↓ 10 callers
Method
common_complex_type
Determine the common complex type for binary operations. Per C11 6.3.1.8: integer types rank below float in the type hierarchy, so they adopt the comp
src/ir/lowering/complex.rs:506
↓ 10 callers
Method
elf_type
Get the ELF relocation type number.
src/backend/riscv/assembler/encoder/mod.rs:105
↓ 10 callers
Method
emit_error
Emit a parse error at the given span. Updates error_count and prints the error with source location and snippet (if source manager is set).
src/frontend/parser/parse.rs:322
↓ 10 callers
Method
emit_init_expr_to_offset_bool
Lower an expression, cast to target type, then store at base + byte_offset. When target_is_bool is true, normalizes the value (any nonzero -> 1) per C
src/ir/lowering/lower.rs:1139
↓ 10 callers
Method
emit_instr_reg
(&mut self, mnemonic: &str, reg: &str)
src/backend/common.rs:902
↓ 10 callers
Function
encode_adrp
(out: &mut [u8], fp: usize, imm: i64)
src/backend/arm/linker/reloc.rs:500
↓ 10 callers
Function
encode_fcvt_rounding
(operands: &[Operand], rmode: u32, opcode: u32)
src/backend/arm/assembler/encoder/fp_scalar.rs:178
↓ 10 callers
Function
encode_fp_sgnj
(operands: &[Operand], funct7: u32, funct3: u32)
src/backend/riscv/assembler/encoder/float.rs:95
↓ 10 callers
Method
error
Create a new error diagnostic.
src/common/error.rs:352
↓ 10 callers
Method
f128_add_offset_to_addr_reg
(&mut self, offset: i64)
src/backend/arm/codegen/f128.rs:65
↓ 10 callers
Function
f128_bytes_to_i64
Convert f128 bytes to i64 (for constant folding). Direct extraction with full 112-bit mantissa precision (no lossy x87 intermediate).
src/common/long_double.rs:1090
↓ 10 callers
Function
f128_is_nan
Helper: check if f128 is NaN
src/common/long_double.rs:1919
↓ 10 callers
Function
f64_to_x87_bytes_simple
Create x87 bytes from an f64 value (for when we don't have the original text). This is a widening conversion that zero-fills the extra mantissa bits.
src/common/long_double.rs:1143
↓ 10 callers
Method
for_each_used_value
(&self, mut f: impl FnMut(u32))
src/ir/instruction.rs:470
↓ 10 callers
Function
get_branch_target
(operands: &[Operand], idx: usize)
src/backend/riscv/assembler/encoder/pseudo.rs:376
↓ 10 callers
Method
get_or_create_user_label
Get or create a unique IR label for a user-defined goto label. If the label name is declared via __label__ in a local scope, uses the scope-qualified
src/ir/lowering/lower.rs:1269
↓ 10 callers
Function
is_segment_reg
Is this a segment register?
src/backend/i686/assembler/encoder/registers.rs:32
↓ 10 callers
Method
is_type_specifier
(&self)
src/frontend/parser/parse.rs:552
↓ 10 callers
Method
is_undefined
(&self)
src/backend/linker_common/types.rs:44
↓ 10 callers
Function
load_file
( path: &str, objects: &mut Vec<ElfObject>, globals: &mut HashMap<String, GlobalSymbol>, neede
src/backend/arm/linker/input.rs:13
↓ 10 callers
Method
lower_expr_with_type
Lower expression and cast to target type if needed.
src/ir/lowering/expr.rs:516
↓ 10 callers
Method
lower_lvalue
Try to get the lvalue (address) of an expression. Returns Some(LValue) if the expression is an lvalue, None otherwise.
src/ir/lowering/lvalue.rs:16
← previous
next →
301–400 of 6,057, ranked by callers