arch/riscv/lib/ashldi3.S
Source file repositories/reference/linux-study-clean/arch/riscv/lib/ashldi3.S
File Facts
- System
- Linux kernel
- Corpus path
arch/riscv/lib/ashldi3.S- Extension
.S- Size
- 864 bytes
- Lines
- 37
- Domain
- Architecture Layer
- Bucket
- arch/riscv
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
Dependency Surface
linux/linkage.hasm/asm.h
Detected Declarations
export __ashldi3
Annotated Snippet
#include <linux/linkage.h>
#include <asm/asm.h>
/**
* Shift left
*
* @v a1:a0 Value to shift
* @v a2 Shift amount
* @ret a1:a0 Shifted value
*/
SYM_FUNC_START(__ashldi3)
/* Perform shift by 32 bits, if applicable */
li t0, 32
sub t1, t0, a2
bgtz t1, 1f
mv a1, a0
mv a0, zero
1: /* Perform shift by modulo-32 bits, if applicable */
andi a2, a2, 0x1f
beqz a2, 2f
srl t2, a0, t1
sll a0, a0, a2
sll a1, a1, a2
or a1, a1, t2
2: ret
SYM_FUNC_END(__ashldi3)
EXPORT_SYMBOL(__ashldi3)
Annotation
- Immediate include surface: `linux/linkage.h`, `asm/asm.h`.
- Detected declarations: `export __ashldi3`.
- Atlas domain: Architecture Layer / arch/riscv.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.