arch/m68k/fpsp040/sint.S
Source file repositories/reference/linux-study-clean/arch/m68k/fpsp040/sint.S
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/fpsp040/sint.S- Extension
.S- Size
- 5696 bytes
- Lines
- 247
- 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 FPCR_MODEfunction FPCR_MODEfunction LOCAL_SGNfunction LOCAL_SGN
Annotated Snippet
bfextu FPCR_MODE(%a6){#2:#2},%d1 |use user's mode for rounding
| ;implicitly has extend precision
| ;in upper word.
movel %d1,L_SCR1(%a6) |save mode bits
bras sintexc
|
| FINT with extended denorm inputs.
|
.global sintd
sintd:
btstb #5,FPCR_MODE(%a6)
beq snzrinx |if round nearest or round zero, +/- 0
btstb #4,FPCR_MODE(%a6)
beqs rnd_mns
rnd_pls:
btstb #sign_bit,LOCAL_EX(%a0)
bnes sintmz
bsr ld_pone |if round plus inf and pos, answer is +1
bra t_inx2
rnd_mns:
btstb #sign_bit,LOCAL_EX(%a0)
beqs sintpz
bsr ld_mone |if round mns inf and neg, answer is -1
bra t_inx2
sintpz:
bsr ld_pzero
bra t_inx2
sintmz:
bsr ld_mzero
bra t_inx2
|
| FINTRZ
|
.global sintrz
sintrz:
movel #1,L_SCR1(%a6) |use rz mode for rounding
| ;implicitly has extend precision
| ;in upper word.
bras sintexc
|
| SINTDO
|
| Input: a0 points to an IEEE extended format operand
| Output: fp0 has the result
|
| Exceptions:
|
| If the subroutine results in an inexact operation, the inx2 and
| ainx bits in the USER_FPSR are set.
|
|
.global sintdo
sintdo:
bfextu FPCR_MODE(%a6){#2:#2},%d1 |use user's mode for rounding
| ;implicitly has ext precision
| ;in upper word.
movel %d1,L_SCR1(%a6) |save mode bits
|
| Real work of sint is in sintexc
|
sintexc:
bclrb #sign_bit,LOCAL_EX(%a0) |convert to internal extended
| ;format
sne LOCAL_SGN(%a0)
cmpw #0x403e,LOCAL_EX(%a0) |check if (unbiased) exp > 63
bgts out_rnge |branch if exp < 63
cmpw #0x3ffd,LOCAL_EX(%a0) |check if (unbiased) exp < 0
bgt in_rnge |if 63 >= exp > 0, do calc
Annotation
- Immediate include surface: `fpsp.h`.
- Detected declarations: `function FPCR_MODE`, `function FPCR_MODE`, `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.