arch/m68k/math-emu/fp_entry.S
Source file repositories/reference/linux-study-clean/arch/m68k/math-emu/fp_entry.S
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/math-emu/fp_entry.S- Extension
.S- Size
- 6805 bytes
- Lines
- 325
- Domain
- Architecture Layer
- Bucket
- arch/m68k
- Inferred role
- Architecture Layer: arch/m68k
- Status
- atlas-only
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.
Dependency Surface
linux/linkage.hasm/entry.hfp_emu.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#include <linux/linkage.h>
#include <asm/entry.h>
#include "fp_emu.h"
.globl fpu_emu
.globl fp_debugprint
.globl fp_err_ua1,fp_err_ua2
.text
fpu_emu:
SAVE_ALL_INT
GET_CURRENT(%d0)
#if defined(CPU_M68020_OR_M68030) && defined(CPU_M68040_OR_M68060)
tst.l m68k_is040or060
jeq 1f
#endif
#if defined(CPU_M68040_OR_M68060)
move.l (FPS_PC2,%sp),(FPS_PC,%sp)
#endif
1:
| emulate the instruction
jsr fp_scan
#if defined(CONFIG_M68060)
#if !defined(CPU_M68060_ONLY)
btst #3,m68k_cputype+3
jeq 1f
#endif
btst #7,(FPS_SR,%sp)
jne fp_sendtrace060
#endif
1:
| emulation successful?
tst.l %d0
jeq ret_from_exception
| send some signal to program here
jra ret_from_exception
| we jump here after an access error while trying to access
| user space, we correct stackpointer and send a SIGSEGV to
| the user process
fp_err_ua2:
addq.l #4,%sp
fp_err_ua1:
addq.l #4,%sp
move.l %a0,-(%sp)
pea LSEGV_MAPERR
pea LSIGSEGV
jsr fpemu_signal
add.w #12,%sp
jra ret_from_exception
#if defined(CONFIG_M68060)
| send a trace signal if we are debugged
| it does not really belong here, but...
fp_sendtrace060:
move.l (FPS_PC,%sp),-(%sp)
pea LTRAP_TRACE
pea LSIGTRAP
jsr fpemu_signal
add.w #12,%sp
jra ret_from_exception
#endif
.globl fp_get_data_reg, fp_put_data_reg
.globl fp_get_addr_reg, fp_put_addr_reg
Annotation
- Immediate include surface: `linux/linkage.h`, `asm/entry.h`, `fp_emu.h`.
- Atlas domain: Architecture Layer / arch/m68k.
- Implementation status: atlas-only.
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.