arch/loongarch/lib/tishift.S
Source file repositories/reference/linux-study-clean/arch/loongarch/lib/tishift.S
File Facts
- System
- Linux kernel
- Corpus path
arch/loongarch/lib/tishift.S- Extension
.S- Size
- 1018 bytes
- Lines
- 57
- Domain
- Architecture Layer
- Bucket
- arch/loongarch
- 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
asm/asmmacro.hlinux/export.hlinux/linkage.h
Detected Declarations
export __ashlti3export __ashrti3export __lshrti3
Annotated Snippet
#include <asm/asmmacro.h>
#include <linux/export.h>
#include <linux/linkage.h>
SYM_FUNC_START(__ashlti3)
srli.d t2, a0, 1
nor t3, zero, a2
sll.d t1, a1, a2
srl.d t2, t2, t3
andi t0, a2, 64
sll.d a0, a0, a2
or t1, t2, t1
maskeqz a1, a0, t0
masknez a0, a0, t0
masknez t0, t1, t0
or a1, t0, a1
jr ra
SYM_FUNC_END(__ashlti3)
EXPORT_SYMBOL(__ashlti3)
SYM_FUNC_START(__ashrti3)
nor t3, zero, a2
slli.d t2, a1, 1
srl.d t1, a0, a2
sll.d t2, t2, t3
andi t0, a2, 64
or t1, t2, t1
sra.d a2, a1, a2
srai.d a1, a1, 63
maskeqz a0, a2, t0
maskeqz a1, a1, t0
masknez a2, a2, t0
masknez t0, t1, t0
or a1, a1, a2
or a0, t0, a0
jr ra
SYM_FUNC_END(__ashrti3)
EXPORT_SYMBOL(__ashrti3)
SYM_FUNC_START(__lshrti3)
slli.d t2, a1, 1
nor t3, zero, a2
srl.d t1, a0, a2
sll.d t2, t2, t3
andi t0, a2, 64
srl.d a1, a1, a2
or t1, t2, t1
maskeqz a0, a1, t0
masknez a1, a1, t0
masknez t0, t1, t0
or a0, t0, a0
jr ra
SYM_FUNC_END(__lshrti3)
EXPORT_SYMBOL(__lshrti3)
Annotation
- Immediate include surface: `asm/asmmacro.h`, `linux/export.h`, `linux/linkage.h`.
- Detected declarations: `export __ashlti3`, `export __ashrti3`, `export __lshrti3`.
- Atlas domain: Architecture Layer / arch/loongarch.
- 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.