arch/m68k/fpsp040/util.S
Source file repositories/reference/linux-study-clean/arch/m68k/fpsp040/util.S
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/fpsp040/util.S- Extension
.S- Size
- 17089 bytes
- Lines
- 748
- 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 CMDREG1Bfunction FPCR_MODEfunction FPCR_MODE
Annotated Snippet
bfextu FPCR_MODE(%a6){#0:#2},%d0 |set round precision
bra ovf_res
|
|
| ovf_r_x3 --- overflow result calculation
|
| This entry point used by x_ovfl. (opclass 3 only)
|
| Input a0 points to an operand in the internal extended format
| Output a0 points to the result in the internal extended format
|
| This sets the round precision according to the destination size.
|
.global ovf_r_x3
ovf_r_x3:
bsr g_dfmtou |get dest fmt in d0{1:0}
| ;for fmovout, the destination format
| ;is the rounding precision
|
| ovf_res --- overflow result calculation
|
| Input:
| a0 points to operand in internal extended format
| Output:
| a0 points to result in internal extended format
|
.global ovf_res
ovf_res:
lsll #2,%d0 |move round precision to d0{3:2}
bfextu FPCR_MODE(%a6){#2:#2},%d1 |set round mode
orl %d1,%d0 |index is fmt:mode in d0{3:0}
leal tblovfl,%a1 |load a1 with table address
movel %a1@(%d0:l:4),%a1 |use d0 as index to the table
jmp (%a1) |go to the correct routine
|
|case DEST_FMT = EXT
|
EXT_RN:
leal EXT_PINF,%a1 |answer is +/- infinity
bsetb #inf_bit,FPSR_CC(%a6)
bra set_sign |now go set the sign
EXT_RZ:
leal EXT_PLRG,%a1 |answer is +/- large number
bra set_sign |now go set the sign
EXT_RM:
tstb LOCAL_SGN(%a0) |if negative overflow
beqs e_rm_pos
e_rm_neg:
leal EXT_PINF,%a1 |answer is negative infinity
orl #neginf_mask,USER_FPSR(%a6)
bra end_ovfr
e_rm_pos:
leal EXT_PLRG,%a1 |answer is large positive number
bra end_ovfr
EXT_RP:
tstb LOCAL_SGN(%a0) |if negative overflow
beqs e_rp_pos
e_rp_neg:
leal EXT_PLRG,%a1 |answer is large negative number
bsetb #neg_bit,FPSR_CC(%a6)
bra end_ovfr
e_rp_pos:
leal EXT_PINF,%a1 |answer is positive infinity
bsetb #inf_bit,FPSR_CC(%a6)
bra end_ovfr
|
|case DEST_FMT = DBL
|
Annotation
- Immediate include surface: `fpsp.h`.
- Detected declarations: `function CMDREG1B`, `function FPCR_MODE`, `function FPCR_MODE`.
- 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.