arch/m68k/fpsp040/kernel_ex.S
Source file repositories/reference/linux-study-clean/arch/m68k/fpsp040/kernel_ex.S
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/fpsp040/kernel_ex.S- Extension
.S- Size
- 13311 bytes
- Lines
- 494
- 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
fpsp.h
Detected Declarations
function STAGfunction LOCAL_SGNfunction FPCR_MODEfunction ETEMP_SGNfunction LOCAL_SGNfunction LOCAL_SGNfunction LOCAL_SGNfunction LOCAL_SGN
Annotated Snippet
bfclr STAG(%a6){#5:#3} |clear wbtm66,wbtm1,wbtm0
bsetb #wbtemp15_bit,WB_BYTE(%a6) |set wbtemp15
bsetb #sticky_bit,STICKY(%a6) |set sticky bit
bclrb #E1,E_BYTE(%a6)
unfl_dis:
bfextu FPCR_MODE(%a6){#0:#2},%d0 |get round precision
bclrb #sign_bit,LOCAL_EX(%a0)
sne LOCAL_SGN(%a0) |convert to internal ext format
bsr unf_sub |returns IEEE result at a0
| ;and sets FPSR_CC accordingly
bfclr LOCAL_SGN(%a0){#0:#8} |convert back to IEEE ext format
beqs unfl_fin
bsetb #sign_bit,LOCAL_EX(%a0)
bsetb #sign_bit,FP_SCR1(%a6) |set sign bit of exc operand
unfl_fin:
fmovemx (%a0),%fp0-%fp0 |store result in fp0
rts
|
| t_ovfl2 --- OVFL exception (without inex2 returned)
|
| This entry is used by scale to force catastrophic overflow. The
| ovfl, aovfl, and ainex bits are set, but not the inex2 bit.
|
t_ovfl2:
orl #ovfl_inx_mask,USER_FPSR(%a6)
movel ETEMP(%a6),FP_SCR1(%a6)
movel ETEMP_HI(%a6),FP_SCR1+4(%a6)
movel ETEMP_LO(%a6),FP_SCR1+8(%a6)
|
| Check for single or double round precision. If single, check if
| the lower 40 bits of ETEMP are zero; if not, set inex2. If double,
| check if the lower 21 bits are zero; if not, set inex2.
|
moveb FPCR_MODE(%a6),%d0
andib #0xc0,%d0
beq t_work |if extended, finish ovfl processing
cmpib #0x40,%d0 |test for single
bnes t_dbl
t_sgl:
tstb ETEMP_LO(%a6)
bnes t_setinx2
movel ETEMP_HI(%a6),%d0
andil #0xff,%d0 |look at only lower 8 bits
bnes t_setinx2
bra t_work
t_dbl:
movel ETEMP_LO(%a6),%d0
andil #0x7ff,%d0 |look at only lower 11 bits
beq t_work
t_setinx2:
orl #inex2_mask,USER_FPSR(%a6)
bras t_work
|
| t_ovfl --- OVFL exception
|
|** Note: the exc operand is returned in ETEMP.
|
t_ovfl:
orl #ovfinx_mask,USER_FPSR(%a6)
t_work:
btstb #ovfl_bit,FPCR_ENABLE(%a6) |test FPCR for ovfl enabled
Annotation
- Immediate include surface: `fpsp.h`.
- Detected declarations: `function STAG`, `function LOCAL_SGN`, `function FPCR_MODE`, `function ETEMP_SGN`, `function LOCAL_SGN`, `function LOCAL_SGN`, `function LOCAL_SGN`, `function LOCAL_SGN`.
- 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.