arch/parisc/math-emu/sgl_float.h
Source file repositories/reference/linux-study-clean/arch/parisc/math-emu/sgl_float.h
File Facts
- System
- Linux kernel
- Corpus path
arch/parisc/math-emu/sgl_float.h- Extension
.h- Size
- 18946 bytes
- Lines
- 474
- Domain
- Architecture Layer
- Bucket
- arch/parisc
- 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
- No C-style include directives detected by the generator.
Detected Declarations
function Sall
Annotated Snippet
if (shift < 32) { \
Extall(extent) = Sall(srcdst) << (32-(shift)); \
Sall(srcdst) >>= shift; \
} \
else { \
Extall(extent) = Sall(srcdst); \
Sall(srcdst) = 0; \
}
#define Sgl_hiddenhigh3mantissa(sgl_value) Shiddenhigh3mantissa(sgl_value)
#define Sgl_hidden(sgl_value) Shidden(sgl_value)
#define Sgl_lowmantissa(sgl_value) Slow(sgl_value)
/* The left argument is never smaller than the right argument */
#define Sgl_subtract(sgl_left,sgl_right,sgl_result) \
Sall(sgl_result) = Sall(sgl_left) - Sall(sgl_right)
/* Subtract right augmented with extension from left augmented with zeros and
* store into result and extension. */
#define Sgl_subtract_withextension(left,right,extent,result) \
/* sgl_floating_point left,right,result; extension extent */ \
Sgl_subtract(left,right,result); \
if((Extall(extent) = 0-Extall(extent))) \
Sall(result) = Sall(result)-1
#define Sgl_addition(sgl_left,sgl_right,sgl_result) \
Sall(sgl_result) = Sall(sgl_left) + Sall(sgl_right)
#define Sgl_xortointp1(left,right,result) \
result = Sall(left) XOR Sall(right);
#define Sgl_xorfromintp1(left,right,result) \
Sall(result) = left XOR Sall(right)
/* Need to Initialize */
#define Sgl_makequietnan(dest) \
Sall(dest) = ((SGL_EMAX+SGL_BIAS)+1)<< (32-(1+SGL_EXP_LENGTH)) \
| (1<<(32-(1+SGL_EXP_LENGTH+2)))
#define Sgl_makesignalingnan(dest) \
Sall(dest) = ((SGL_EMAX+SGL_BIAS)+1)<< (32-(1+SGL_EXP_LENGTH)) \
| (1<<(32-(1+SGL_EXP_LENGTH+1)))
#define Sgl_normalize(sgl_opnd,exponent) \
while(Sgl_iszero_hiddenhigh7mantissa(sgl_opnd)) { \
Sgl_leftshiftby8(sgl_opnd); \
exponent -= 8; \
} \
if(Sgl_iszero_hiddenhigh3mantissa(sgl_opnd)) { \
Sgl_leftshiftby4(sgl_opnd); \
exponent -= 4; \
} \
while(Sgl_iszero_hidden(sgl_opnd)) { \
Sgl_leftshiftby1(sgl_opnd); \
exponent -= 1; \
}
#define Sgl_setoverflow(sgl_opnd) \
/* set result to infinity or largest number */ \
switch (Rounding_mode()) { \
case ROUNDPLUS: \
if (Sgl_isone_sign(sgl_opnd)) { \
Sgl_setlargestnegative(sgl_opnd); \
} \
else { \
Sgl_setinfinitypositive(sgl_opnd); \
} \
break; \
case ROUNDMINUS: \
if (Sgl_iszero_sign(sgl_opnd)) { \
Sgl_setlargestpositive(sgl_opnd); \
} \
else { \
Sgl_setinfinitynegative(sgl_opnd); \
} \
break; \
case ROUNDNEAREST: \
Sgl_setinfinity_exponentmantissa(sgl_opnd); \
break; \
case ROUNDZERO: \
Sgl_setlargest_exponentmantissa(sgl_opnd); \
}
#define Sgl_denormalize(opnd,exponent,guard,sticky,inexact) \
Sgl_clear_signexponent_set_hidden(opnd); \
if (exponent >= (1 - SGL_P)) { \
guard = (Sall(opnd) >> -exponent) & 1; \
if (exponent < 0) sticky |= Sall(opnd) << (32+exponent); \
inexact = guard | sticky; \
Sall(opnd) >>= (1-exponent); \
} \
else { \
Annotation
- Detected declarations: `function Sall`.
- Atlas domain: Architecture Layer / arch/parisc.
- 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.