arch/mips/math-emu/dp_2008class.c
Source file repositories/reference/linux-study-clean/arch/mips/math-emu/dp_2008class.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/math-emu/dp_2008class.c- Extension
.c- Size
- 974 bytes
- Lines
- 53
- Domain
- Architecture Layer
- Bucket
- arch/mips
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
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
ieee754dp.h
Detected Declarations
function Copyright
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* IEEE754 floating point arithmetic
* double precision: CLASS.f
* FPR[fd] = class(FPR[fs])
*
* MIPS floating point support
* Copyright (C) 2015 Imagination Technologies, Ltd.
* Author: Markos Chandras <markos.chandras@imgtec.com>
*/
#include "ieee754dp.h"
int ieee754dp_2008class(union ieee754dp x)
{
COMPXDP;
EXPLODEXDP;
/*
* 10 bit mask as follows:
*
* bit0 = SNAN
* bit1 = QNAN
* bit2 = -INF
* bit3 = -NORM
* bit4 = -DNORM
* bit5 = -ZERO
* bit6 = INF
* bit7 = NORM
* bit8 = DNORM
* bit9 = ZERO
*/
switch(xc) {
case IEEE754_CLASS_SNAN:
return 0x01;
case IEEE754_CLASS_QNAN:
return 0x02;
case IEEE754_CLASS_INF:
return 0x04 << (xs ? 0 : 4);
case IEEE754_CLASS_NORM:
return 0x08 << (xs ? 0 : 4);
case IEEE754_CLASS_DNORM:
return 0x10 << (xs ? 0 : 4);
case IEEE754_CLASS_ZERO:
return 0x20 << (xs ? 0 : 4);
default:
pr_err("Unknown class: %d\n", xc);
return 0;
}
}
Annotation
- Immediate include surface: `ieee754dp.h`.
- Detected declarations: `function Copyright`.
- Atlas domain: Architecture Layer / arch/mips.
- Implementation status: source implementation candidate.
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.