arch/m68k/fpsp040/do_func.S
Source file repositories/reference/linux-study-clean/arch/m68k/fpsp040/do_func.S
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/fpsp040/do_func.S- Extension
.S- Size
- 13813 bytes
- Lines
- 559
- 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 CMDREG1Bfunction FPSR_QBYTEfunction FPSR_QBYTEfunction STAG
Annotated Snippet
bfextu CMDREG1B(%a6){#0:#6},%d0 |get opclass and src fields
cmpil #0x17,%d0 |if op class and size fields are $17,
| ;it is FMOVECR; if not, continue
bnes not_fmovecr
jmp smovcr |fmovecr; jmp directly to emulation
not_fmovecr:
movew CMDREG1B(%a6),%d0
andl #0x7F,%d0
cmpil #0x38,%d0 |if the extension is >= $38,
bge serror |it is illegal
bfextu STAG(%a6){#0:#3},%d1
lsll #3,%d0 |make room for STAG
addl %d1,%d0 |combine for final index into table
leal tblpre,%a1 |start of monster jump table
movel (%a1,%d0.w*4),%a1 |real target address
leal ETEMP(%a6),%a0 |a0 is pointer to src op
movel USER_FPCR(%a6),%d1
andl #0xFF,%d1 | discard all but rounding mode/prec
fmovel #0,%fpcr
jmp (%a1)
|
| ERROR
|
.global serror
serror:
st STORE_FLG(%a6)
rts
|
| These routines load forced values into fp0. They are called
| by index into tbldo.
|
| Load a signed zero to fp0 and set inex2/ainex
|
.global snzrinx
snzrinx:
btstb #sign_bit,LOCAL_EX(%a0) |get sign of source operand
bnes ld_mzinx |if negative, branch
bsr ld_pzero |bsr so we can return and set inx
bra t_inx2 |now, set the inx for the next inst
ld_mzinx:
bsr ld_mzero |if neg, load neg zero, return here
bra t_inx2 |now, set the inx for the next inst
|
| Load a signed zero to fp0; do not set inex2/ainex
|
.global szero
szero:
btstb #sign_bit,LOCAL_EX(%a0) |get sign of source operand
bne ld_mzero |if neg, load neg zero
bra ld_pzero |load positive zero
|
| Load a signed infinity to fp0; do not set inex2/ainex
|
.global sinf
sinf:
btstb #sign_bit,LOCAL_EX(%a0) |get sign of source operand
bne ld_minf |if negative branch
bra ld_pinf
|
| Load a signed one to fp0; do not set inex2/ainex
|
.global sone
sone:
btstb #sign_bit,LOCAL_EX(%a0) |check sign of source
bne ld_mone
bra ld_pone
|
| Load a signed pi/2 to fp0; do not set inex2/ainex
|
Annotation
- Immediate include surface: `fpsp.h`.
- Detected declarations: `function CMDREG1B`, `function CMDREG1B`, `function FPSR_QBYTE`, `function FPSR_QBYTE`, `function STAG`.
- 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.