arch/riscv/lib/tishift.S
Source file repositories/reference/linux-study-clean/arch/riscv/lib/tishift.S
File Facts
- System
- Linux kernel
- Corpus path
arch/riscv/lib/tishift.S- Extension
.S- Size
- 1024 bytes
- Lines
- 77
- 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.hlinux/export.h
Detected Declarations
export __lshrti3export __ashrti3export __ashlti3
Annotated Snippet
#include <linux/linkage.h>
#include <linux/export.h>
SYM_FUNC_START(__lshrti3)
beqz a2, .L1
li a5,64
sub a5,a5,a2
sext.w a4,a5
blez a5, .L2
sext.w a2,a2
srl a0,a0,a2
sll a4,a1,a4
srl a2,a1,a2
or a0,a0,a4
mv a1,a2
.L1:
ret
.L2:
negw a0,a4
li a2,0
srl a0,a1,a0
mv a1,a2
ret
SYM_FUNC_END(__lshrti3)
EXPORT_SYMBOL(__lshrti3)
SYM_FUNC_START(__ashrti3)
beqz a2, .L3
li a5,64
sub a5,a5,a2
sext.w a4,a5
blez a5, .L4
sext.w a2,a2
srl a0,a0,a2
sll a4,a1,a4
sra a2,a1,a2
or a0,a0,a4
mv a1,a2
.L3:
ret
.L4:
negw a0,a4
srai a2,a1,0x3f
sra a0,a1,a0
mv a1,a2
ret
SYM_FUNC_END(__ashrti3)
EXPORT_SYMBOL(__ashrti3)
SYM_FUNC_START(__ashlti3)
beqz a2, .L5
li a5,64
sub a5,a5,a2
sext.w a4,a5
blez a5, .L6
sext.w a2,a2
sll a1,a1,a2
srl a4,a0,a4
sll a2,a0,a2
or a1,a1,a4
mv a0,a2
.L5:
ret
.L6:
negw a1,a4
li a2,0
sll a1,a0,a1
mv a0,a2
ret
SYM_FUNC_END(__ashlti3)
Annotation
- Immediate include surface: `linux/linkage.h`, `linux/export.h`.
- Detected declarations: `export __lshrti3`, `export __ashrti3`, `export __ashlti3`.
- 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.