arch/arm/vfp/vfpdouble.c
Source file repositories/reference/linux-study-clean/arch/arm/vfp/vfpdouble.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/vfp/vfpdouble.c- Extension
.c- Size
- 29217 bytes
- Lines
- 1207
- Domain
- Architecture Layer
- Bucket
- arch/arm
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/bitops.hasm/div64.hasm/vfp.hvfpinstr.hvfp.h
Detected Declarations
function vfp_double_dumpfunction vfp_double_normalise_denormalfunction vfp_double_normaliseroundfunction vfp_propagate_nanfunction vfp_double_fabsfunction vfp_double_fcpyfunction vfp_double_fnegfunction vfp_double_fsqrtfunction vfp_comparefunction vfp_double_fcmpfunction vfp_double_fcmpefunction vfp_double_fcmpzfunction vfp_double_fcmpezfunction vfp_double_fcvtsfunction vfp_double_fuitofunction vfp_double_fsitofunction vfp_double_ftouifunction vfp_double_ftouizfunction vfp_double_ftosifunction vfp_double_ftosizfunction vfp_double_fadd_nonnumberfunction vfp_double_addfunction vfp_double_multiplyfunction vfp_double_multiply_accumulatefunction vfp_double_fmacfunction vfp_double_fnmacfunction vfp_double_fmscfunction vfp_double_fnmscfunction vfp_double_fmulfunction vfp_double_fnmulfunction vfp_double_faddfunction vfp_double_fsubfunction vfp_double_fdivfunction vfp_double_cpdo
Annotated Snippet
if (incr == 0) {
vd->exponent = 2045;
vd->significand = 0x7fffffffffffffffULL;
} else {
vd->exponent = 2047; /* infinity */
vd->significand = 0;
}
} else {
if (significand >> (VFP_DOUBLE_LOW_BITS + 1) == 0)
exponent = 0;
if (exponent || significand > 0x8000000000000000ULL)
underflow = 0;
if (underflow)
exceptions |= FPSCR_UFC;
vd->exponent = exponent;
vd->significand = significand >> 1;
}
pack:
vfp_double_dump("pack: final", vd);
{
s64 d = vfp_double_pack(vd);
pr_debug("VFP: %s: d(d%d)=%016llx exceptions=%08x\n", func,
dd, d, exceptions);
vfp_put_double(d, dd);
}
return exceptions;
}
/*
* Propagate the NaN, setting exceptions if it is signalling.
* 'n' is always a NaN. 'm' may be a number, NaN or infinity.
*/
static u32
vfp_propagate_nan(struct vfp_double *vdd, struct vfp_double *vdn,
struct vfp_double *vdm, u32 fpscr)
{
struct vfp_double *nan;
int tn, tm = 0;
tn = vfp_double_type(vdn);
if (vdm)
tm = vfp_double_type(vdm);
if (fpscr & FPSCR_DEFAULT_NAN)
/*
* Default NaN mode - always returns a quiet NaN
*/
nan = &vfp_double_default_qnan;
else {
/*
* Contemporary mode - select the first signalling
* NAN, or if neither are signalling, the first
* quiet NAN.
*/
if (tn == VFP_SNAN || (tm != VFP_SNAN && tn == VFP_QNAN))
nan = vdn;
else
nan = vdm;
/*
* Make the NaN quiet.
*/
nan->significand |= VFP_DOUBLE_SIGNIFICAND_QNAN;
}
*vdd = *nan;
/*
* If one was a signalling NAN, raise invalid operation.
*/
return tn == VFP_SNAN || tm == VFP_SNAN ? FPSCR_IOC : VFP_NAN_FLAG;
}
/*
* Extended operations
*/
static u32 vfp_double_fabs(int dd, int unused, int dm, u32 fpscr)
{
vfp_put_double(vfp_double_packed_abs(vfp_get_double(dm)), dd);
return 0;
}
static u32 vfp_double_fcpy(int dd, int unused, int dm, u32 fpscr)
{
vfp_put_double(vfp_get_double(dm), dd);
return 0;
}
static u32 vfp_double_fneg(int dd, int unused, int dm, u32 fpscr)
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/bitops.h`, `asm/div64.h`, `asm/vfp.h`, `vfpinstr.h`, `vfp.h`.
- Detected declarations: `function vfp_double_dump`, `function vfp_double_normalise_denormal`, `function vfp_double_normaliseround`, `function vfp_propagate_nan`, `function vfp_double_fabs`, `function vfp_double_fcpy`, `function vfp_double_fneg`, `function vfp_double_fsqrt`, `function vfp_compare`, `function vfp_double_fcmp`.
- Atlas domain: Architecture Layer / arch/arm.
- 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.