MCPcopy Create free account

hub / github.com/anthropics/claudes-c-compiler / functions

Functions6,057 in github.com/anthropics/claudes-c-compiler

↓ 4 callersMethodassign_scratch_reg
(&mut self, kind: &AsmOperandKind, excluded: &[String])
src/backend/arm/codegen/asm_emitter.rs:149
↓ 4 callersMethodassign_scratch_reg
(&mut self, kind: &AsmOperandKind, excluded: &[String])
src/backend/riscv/codegen/asm_emitter.rs:181
↓ 4 callersMethodbuild_asm_extra_args
Build extra assembler arguments for RISC-V ABI/arch overrides. When -mabi= or -march= are specified on the CLI, these override the defaults hardcoded
src/driver/external_tools.rs:270
↓ 4 callersFunctionbuild_jump_table
Build a jump table from switch cases: maps each index in [min..max] to a BlockId. Returns (table, min_val, range).
src/backend/traits.rs:1419
↓ 4 callersFunctioncalculate_stack_space_common
Shared stack space calculation: iterates over all instructions, assigns stack slots for allocas and value results. Arch-specific offset direction is h
src/backend/stack_layout/mod.rs:119
↓ 4 callersFunctioncc_from_mnemonic
Map condition code suffix to encoding.
src/backend/x86/assembler/encoder/registers.rs:276
↓ 4 callersFunctionclassify_params_full
Classify all parameters of a function for callee-side store emission. Uses the same `CallAbiConfig` as `classify_call_args` to ensure caller and call
src/backend/call_abi.rs:645
↓ 4 callersMethodcollect_refs_from_compound
Collect function name references from a compound statement.
src/ir/lowering/ref_collection.rs:119
↓ 4 callersMethodcollect_scope_cleanup_vars_above_depth
Collect cleanup variables from scopes above `target_depth` (for break/continue). This collects from the innermost scope down to (but not including) th
src/ir/lowering/lower.rs:412
↓ 4 callersFunctioncompute_live_intervals
Compute live intervals for all non-alloca values in a function. Uses backward dataflow analysis to correctly handle loops: - live_in[B] = gen[B] ∪ (l
src/backend/liveness.rs:153
↓ 4 callersFunctioncompute_unsigned_magic_64
Compute the magic number for unsigned 64-bit division by `d`. Returns (magic_number, post_shift, needs_add) where: - If !needs_add: result = mulhi(x,
src/passes/div_by_const.rs:865
↓ 4 callersMethodconfigure_preprocessor
Configure the preprocessor with CLI-defined macros and target.
src/driver/pipeline.rs:777
↓ 4 callersFunctionconstraint_is_immediate_only
Shared inline assembly constraint classification utilities. Used by the inline pass (symbol resolution), cfg_simplify (dead block detection), and the
src/common/asm_constraints.rs:14
↓ 4 callersFunctionconstraint_is_memory_only
Check whether a constraint is memory-only (has memory alternative but no register alternative). For constraints like "rm", "qm", "g" that allow both r
src/backend/inline_asm.rs:273
↓ 4 callersMethodconvert_struct_fields
Convert struct field declarations to StructField for layout computation.
src/frontend/sema/const_eval.rs:1057
↓ 4 callersMethodctype_align
(&self, ctype: &CType)
src/ir/lowering/pointer_analysis.rs:256
↓ 4 callersMethodcurrent_section_mut
(&mut self)
src/backend/elf_writer_common.rs:359
↓ 4 callersMethoddeclare
(&mut self, symbol: Symbol)
src/common/symbol_table.rs:45
↓ 4 callersFunctiondecompose_symbol_addend
Decompose a symbol name that may contain an embedded addend. For example, `"cgroup_bpf_enabled_key+144"` -> `("cgroup_bpf_enabled_key", 144)`. If the
src/backend/riscv/assembler/elf_writer.rs:262
↓ 4 callersMethoddrill_designators
Drill through a slice of designators to find the target type and byte offset. This resolves chains like [Field("b"), Index(2), Field("x")] by walking
src/ir/lowering/global_init_bytes.rs:200
↓ 4 callersFunctioneliminate_dead_code
Eliminate dead code in a single function using use-count-based worklist DCE. Algorithm: 1. Build use-counts for all values (single pass) 2. Build a d
src/passes/dce.rs:30
↓ 4 callersMethodemit_add_offset_to_addr_reg_impl
(&mut self, offset: i64)
src/backend/arm/codegen/memory.rs:124
↓ 4 callersMethodemit_add_offset_to_addr_reg_impl
(&mut self, offset: i64)
src/backend/x86/codegen/memory.rs:213
↓ 4 callersMethodemit_add_offset_to_addr_reg_impl
(&mut self, offset: i64)
src/backend/riscv/codegen/memory.rs:113
↓ 4 callersMethodemit_branch_nonzero
(&mut self, label: &str)
src/backend/i686/codegen/emit.rs:1469
↓ 4 callersMethodemit_complex_expr_to_offset
Emit a complex expression to a memory location at the given offset. Handles integer-to-complex conversion properly by using lower_expr_to_complex and
src/ir/lowering/stmt.rs:591
↓ 4 callersMethodemit_copy_value
emit_copy_value: handles F128, wide (F64/I64/U64), and 32-bit copies.
src/backend/i686/codegen/emit.rs:1680
↓ 4 callersMethodemit_data_integer
Emit a plain integer value for .byte (size=1), .short (size=2), .long (size=4) or .quad (size=8).
src/backend/elf/writer_base.rs:570
↓ 4 callersMethodemit_data_values
(&mut self, vals: &[DataValue], size: usize)
src/backend/elf_writer_common.rs:664
↓ 4 callersMethodemit_entry_alloca
Emit an alloca into the entry block buffer. Used for local variable declarations so that variables whose declarations are skipped by `goto` still have
src/ir/lowering/lower.rs:1096
↓ 4 callersMethodemit_expr_to_compound
Emit a single expression as a compound element. When `coerce_ty` is Some, tries const eval with type coercion first (for scalar fields with known typ
src/ir/lowering/global_init_compound.rs:300
↓ 4 callersFunctionemit_inline_asm_common
Shared inline assembly emission logic. All four backends call this from their `emit_inline_asm` implementation, providing an `InlineAsmEmitter` to han
src/backend/inline_asm.rs:403
↓ 4 callersMethodemit_instr_imm_mem
(&mut self, mnemonic: &str, imm: i64, offset: i64, base: &str)
src/backend/common.rs:1007
↓ 4 callersFunctionemit_int_data
Emit an integer constant at the width specified by `ty`. Truncates or sign-extends `val` (an i64) as needed to match the target width.
src/backend/common.rs:1650
↓ 4 callersMethodemit_save_acc
(&mut self)
src/backend/arm/codegen/emit.rs:1827
↓ 4 callersMethodemit_segment_prefix
Encode ModR/M + SIB + displacement for a memory operand. For i686 REL relocations, the relocation offset must point to the displacement field (where
src/backend/i686/assembler/encoder/core.rs:31
↓ 4 callersMethodemit_struct_field_init_compound
Emit a single struct field initialization into the byte buffer and ptr_ranges. Handles pointer fields, pointer array fields, bitfields, nested structs
src/ir/lowering/global_init_compound_ptrs.rs:279
↓ 4 callersMethodemit_ternary_branch
Shared helper for ternary branch patterns (conditional and GNU conditional). Evaluates `then_fn` in the true branch and `else_fn` in the false branch,
src/ir/lowering/expr_ops.rs:623
↓ 4 callersMethodencode_avx_3op_0f_imm8
Encode AVX 3-operand in 0F map (mm=1) with imm8 (vshufps, vshufpd, etc.)
src/backend/x86/assembler/encoder/avx.rs:305
↓ 4 callersMethodencode_avx_mov_np
Encode AVX vmovaps/vmovapd/vmovups/vmovupd (no mandatory prefix, or 66 prefix)
src/backend/x86/assembler/encoder/avx.rs:190
↓ 4 callersMethodencode_bit_scan
(&mut self, ops: &[Operand], mnemonic: &str, opcode2: u8)
src/backend/x86/assembler/encoder/x87_misc.rs:182
↓ 4 callersMethodencode_crc32
Encode CRC32 instruction. crc32b: F2 0F 38 F0 /r (8-bit source) crc32w: 66 F2 0F 38 F1 /r (16-bit source) crc32l: F2 0F 38 F1 /r (32-bit source) crc32
src/backend/x86/assembler/encoder/sse.rs:539
↓ 4 callersMethodencode_evex_rotate_imm
Encode EVEX rotate-by-immediate instructions (vprold, vprolq, vprord, vprorq). AT&T syntax: `vprold $imm8, %src, %dst` ops[0] = imm8 (rotation count)
src/backend/x86/assembler/encoder/avx.rs:115
↓ 4 callersFunctionencode_fp_arith_d
(operands: &[Operand], funct7: u32)
src/backend/riscv/assembler/encoder/float.rs:77
↓ 4 callersMethodencode_imul
(&mut self, ops: &[Operand], size: u8)
src/backend/x86/assembler/encoder/gp_integer.rs:641
↓ 4 callersFunctionencode_instruction
Encode an AArch64 instruction from its mnemonic and parsed operands.
src/backend/arm/assembler/encoder/mod.rs:192
↓ 4 callersFunctionencode_ldtr_sized
Encode LDTR/STTR with explicit size (for ldtrh, ldtrb, etc.)
src/backend/arm/assembler/encoder/load_store.rs:292
↓ 4 callersFunctionencode_ldur_stur
Encode LDUR/STUR (unscaled immediate offset load/store) Format: size 111 V 00 opc 0 imm9 00 Rn Rt
src/backend/arm/assembler/encoder/load_store.rs:248
↓ 4 callersFunctionencode_ldxp_stxp
Encode LDXP/STXP/LDAXP/STLXP (exclusive pair) instructions. LDXP Xt1, Xt2, [Xn] : sz 001000 0 1 1 11111 0 Rt2 Rn Rt LDAXP Xt1, Xt2, [Xn] : sz 0010
src/backend/arm/assembler/encoder/load_store.rs:604
↓ 4 callersMethodencode_mov
(&mut self, ops: &[Operand], size: u8)
src/backend/i686/assembler/encoder/gp_integer.rs:11
↓ 4 callersMethodencode_mov_seg
(&mut self, ops: &[Operand])
src/backend/x86/assembler/encoder/x87_misc.rs:211
↓ 4 callersFunctionencode_neon_across
Encode NEON across-vector instructions: UMAXV, UMINV, SMAXV, SMINV Format: 0 Q U 01110 size 11000 opcode 10 Rn Rd `u_bit`: 0 for signed, 1 for unsig
src/backend/arm/assembler/encoder/neon.rs:445
↓ 4 callersFunctionencode_neon_aes
Encode NEON AES instructions (AESE, AESD, AESMC, AESIMC)
src/backend/arm/assembler/encoder/neon.rs:1146
↓ 4 callersFunctionencode_neon_shll
── NEON SSHLL/USHLL (shift left long) ─────────────────────────────────── Format: 0 Q U 011110 immh immb 10100 1 Rn Rd
src/backend/arm/assembler/encoder/neon.rs:1472
↓ 4 callersFunctionencode_neon_shrn
── NEON shift right narrow (SHRN/RSHRN) ───────────────────────────────── Format: 0 Q 0 01111 0 immh immb opcode 1 Rn Rd SHRN opcode=10000, RSHRN opco
src/backend/arm/assembler/encoder/neon.rs:1436
↓ 4 callersFunctionencode_neon_sqshrun
Encode NEON SQSHRUN/SQSHRUN2: Signed saturating shift right unsigned narrow Format: 0 Q 1 011110 immh immb 100011 Rn Rd
src/backend/arm/assembler/encoder/neon.rs:119
↓ 4 callersFunctionencode_neon_xtl
Encode NEON UXTL/SXTL (unsigned/signed extend long). These are aliases for USHLL/SSHLL with shift #0. Format: 0 Q U 011110 immh immb 10100 1 Rn Rd
src/backend/arm/assembler/encoder/neon.rs:163
↓ 4 callersMethodencode_prefetch
Encode prefetch instructions (0F 18 /hint)
src/backend/i686/assembler/encoder/system.rs:11
↓ 4 callersFunctionencode_shift
(operands: &[Operand], shift_type: u32)
src/backend/arm/assembler/encoder/data_processing.rs:796
↓ 4 callersMethodencode_sse_cvt_gp_to_xmm
(&mut self, ops: &[Operand], opcode: &[u8], gp_size: u8)
src/backend/x86/assembler/encoder/sse.rs:282
↓ 4 callersMethodencode_sse_extract
Encode SSE/SSE4.1 extract instructions (pextrw, pextrd, pextrb, pextrq). `swap_reg_rm`: if true, the GP register goes in the ModRM "reg" field and the
src/backend/x86/assembler/encoder/sse.rs:416
↓ 4 callersMethodencode_sse_insert
(&mut self, ops: &[Operand], opcode: &[u8], rex_w: bool)
src/backend/x86/assembler/encoder/sse.rs:374
↓ 4 callersFunctionencode_store
(operands: &[Operand], funct3: u32)
src/backend/riscv/assembler/encoder/base.rs:194
↓ 4 callersMethodencode_suffixless_unary
(&mut self, ops: &[Operand], op_ext: u8)
src/backend/x86/assembler/encoder/x87_misc.rs:373
↓ 4 callersMethodencode_x87_arith_reg
Encode x87 register-register arithmetic (fadd, fmul, fsub, fdiv). In AT&T syntax: fadd %st(i), %st -> D8 (base_st0 + i) -- st(0) = st(0) op st(i)
src/backend/x86/assembler/encoder/avx.rs:1026
↓ 4 callersMethodencode_x87_arith_reg
Encode x87 register-register arithmetic (fadd/fmul/fsub/fdiv with st(i) operands).
src/backend/i686/assembler/encoder/x87.rs:230
↓ 4 callersMethodends_with_funclike_macro
Check if a line ends with an identifier that is a defined function-like macro. This is used to detect cases where the macro arguments '(' might be on
src/frontend/preprocessor/pipeline.rs:577
↓ 4 callersMethodensure_section
(&mut self)
src/backend/elf_writer_common.rs:607
↓ 4 callersMethodentry_addr
Get the address of a GOT entry for a given symbol key.
src/backend/arm/linker/reloc.rs:52
↓ 4 callersMethodeval_const_expr_as_usize
(&self, expr: &Expr)
src/frontend/sema/analysis.rs:2012
↓ 4 callersMethodeval_string_literal_with_offset
Helper: intern a string literal + offset => GlobalAddr or GlobalAddrOffset.
src/ir/lowering/global_init.rs:1102
↓ 4 callersFunctioneval_unary
(tokens: &[ExprToken], pos: &mut usize)
src/backend/asm_expr.rs:200
↓ 4 callersFunctionexpand_sdiv64
Expand `dest = x /s C` for native 64-bit signed x using 128-bit multiply.
src/passes/div_by_const.rs:1097
↓ 4 callersFunctionexpand_srem64
Expand `dest = x %s C` for 64-bit signed x.
src/passes/div_by_const.rs:1266
↓ 4 callersMethodexpand_text
Recursively expand macros in text, tracking which macros are currently being expanded to prevent infinite recursion. Operates on bytes for performanc
src/frontend/preprocessor/macro_defs.rs:362
↓ 4 callersFunctionextract_jump_target
Extract the jump target label from a jump/branch instruction.
src/backend/x86/codegen/peephole/passes/helpers.rs:202
↓ 4 callersMethodextract_symbol_from_global_addr_expr
Try to resolve an expression to a global symbol name with optional offset, using the global address expression evaluator. Returns strings like `"boot_
src/ir/lowering/stmt_asm.rs:496
↓ 4 callersFunctionextract_trailing_ident
Extract the trailing identifier from a string, if it ends with one. Returns Some(ident) if the string ends with an identifier (skipping trailing white
src/frontend/preprocessor/macro_defs.rs:1175
↓ 4 callersMethodf128_is_alloca
(&self, val_id: u32)
src/backend/arm/codegen/f128.rs:310
↓ 4 callersMethodf128_load_indirect_ptr_to_addr_reg
(&mut self, slot: StackSlot, _val_id: u32)
src/backend/arm/codegen/f128.rs:227
↓ 4 callersMethodf128_move_aligned_to_addr_reg
Move the computed aligned address into the address register. ARM needs `mov x17, x9` because x9 is the alloca addr register and x17 is the F128 addr r
src/backend/f128_softfloat.rs:201
↓ 4 callersMethodf128_move_callee_reg_to_addr_reg
(&mut self, val_id: u32)
src/backend/arm/codegen/f128.rs:212
↓ 4 callersMethodf128_set_dyn_alloca
(&mut self, val: bool)
src/backend/arm/codegen/f128.rs:206
↓ 4 callersFunctionf128_to_abs_uint
Core f128-to-unsigned-integer conversion. Extracts the absolute value of an f128 float as u128, with truncation toward zero. `max_bits` limits the out
src/common/long_double.rs:1054
↓ 4 callersFunctionf64_to_f128_bytes
Convert an f64 value to IEEE 754 binary128 (quad-precision) encoding (16 bytes, little-endian). Quad format: 1 sign bit, 15 exponent bits (bias 16383)
src/ir/constants.rs:48
↓ 4 callersFunctionf64_to_f128_bytes_lossless
Convert f64 to f128 bytes (widening, zero-fills extra mantissa bits).
src/common/long_double.rs:1028
↓ 4 callersMethodfill_multidim_array_field
Fill a multi-dimensional array field from a braced initializer list. Handles arrays like `int a[2][3]`, `struct S a[2][2][2]`, `union U a[3][4]`, etc.
src/ir/lowering/global_init_bytes.rs:617
↓ 4 callersFunctionfilter_available_regs
Filter a callee-saved register list by removing ASM-clobbered entries. Returns the filtered list suitable for passing to `run_regalloc_and_merge_clobb
src/backend/stack_layout/regalloc_helpers.rs:54
↓ 4 callersFunctionfind_gp_scratch_for_output
Find a GP scratch register for storing inline asm output values that doesn't conflict with any output register or the current output being stored. Us
src/backend/riscv/codegen/asm_emitter.rs:50
↓ 4 callersMethodfinish
(&self)
src/common/fx_hash.rs:78
↓ 4 callersMethodfinish_int_literal
Common integer literal finish: parse suffix, return token.
src/frontend/lexer/scan.rs:319
↓ 4 callersMethodflatten_global_init_item_bool
Flatten a single initializer item with _Bool awareness.
src/ir/lowering/global_init.rs:1906
↓ 4 callersMethodfloat_operand_to_xmm0
Load a float operand into %xmm0. Handles both Value operands (from stack) and float constants (loaded via their bit pattern into rax first).
src/backend/x86/codegen/intrinsics.rs:25
↓ 4 callersMethodfor_each_set_bit
Iterate over all set bits, calling f(bit_index) for each.
src/backend/liveness.rs:109
↓ 4 callersFunctiongcc_cc_to_x86
Map GCC inline asm condition code suffix to x86 SETcc/Jcc suffix. GCC's `=@cc<cond>` output constraint maps directly to x86 condition codes. This map
src/backend/x86_common.rs:63
↓ 4 callersFunctiongenerate_module_with_debug
Generate assembly for a module using the given architecture's codegen. Generate assembly for an IR module with debug info support. Sets `debug_info` o
src/backend/generation.rs:488
↓ 4 callersFunctionget_symbol
(operands: &[Operand], idx: usize)
src/backend/riscv/assembler/encoder/mod.rs:394
↓ 4 callersMethodget_va_args
Get variadic arguments (__VA_ARGS__) as a comma-separated string.
src/frontend/preprocessor/macro_defs.rs:1121
↓ 4 callersFunctiongot_key
Build a GOT key for a symbol reference in a relocation. Local symbols must be scoped to their object to avoid collisions (e.g., `.LANCHOR3` in differe
src/backend/arm/linker/reloc.rs:95
↓ 4 callersFunctiongsf_invalidate_all
Invalidate all slot mappings.
src/backend/riscv/codegen/peephole.rs:704
← previousnext →801–900 of 6,057, ranked by callers