arch/xtensa/lib/ashrdi3.S

Source file repositories/reference/linux-study-clean/arch/xtensa/lib/ashrdi3.S

File Facts

System
Linux kernel
Corpus path
arch/xtensa/lib/ashrdi3.S
Extension
.S
Size
479 bytes
Lines
30
Domain
Architecture Layer
Bucket
arch/xtensa
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.

Dependency Surface

Detected Declarations

Annotated Snippet

#include <linux/linkage.h>
#include <asm/asmmacro.h>
#include <asm/core.h>

#ifdef __XTENSA_EB__
#define uh a2
#define ul a3
#else
#define uh a3
#define ul a2
#endif /* __XTENSA_EB__ */

ENTRY(__ashrdi3)

	abi_entry_default
	ssr	a4
	bgei	a4, 32, .Lhigh_only
	src	ul, uh, ul
	sra	uh, uh
	abi_ret_default

.Lhigh_only:
	sra	ul, uh
	srai	uh, uh, 31
	abi_ret_default

ENDPROC(__ashrdi3)
EXPORT_SYMBOL(__ashrdi3)

Annotation

Implementation Notes