Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Variables
fp_emu.h File Reference
#include <asm/math-emu.h>

Go to the source code of this file.

Macros

#define IS_INF(a)   ((a)->exp == 0x7fff)
 
#define IS_ZERO(a)   ((a)->mant.m64 == 0)
 
#define fp_set_sr(bit)
 
#define fp_set_quotient(quotient)
 
#define fp_normalize_ext(fpreg)
 
#define fp_copy_ext(dest, src)
 
#define fp_monadic_check(dest, src)
 
#define fp_dyadic_check(dest, src)
 
#define fp_set_nan(dest)
 
#define fp_set_ovrflw(dest)
 
#define fp_conv_ext2long(src)
 
#define fp_conv_long2ext(dest, src)
 

Variables

struct fp_ext fp_QNaN
 
struct fp_ext fp_Inf
 

Macro Definition Documentation

#define fp_conv_ext2long (   src)
Value:
({ \
register struct fp_ext *__src asm ("a0") = src; \
register int __res asm ("d0"); \
\
asm volatile ("jsr fp_conv_ext2long" \
: "=d" (__res) : "a" (__src) \
: "a1", "d1", "d2", "memory"); \
__res; \
})

Definition at line 108 of file fp_emu.h.

#define fp_conv_long2ext (   dest,
  src 
)
Value:
({ \
register struct fp_ext *__dest asm ("a0") = dest; \
register int __src asm ("d0") = src; \
\
asm volatile ("jsr fp_conv_ext2long" \
: : "d" (__src), "a" (__dest) \
: "a1", "d1", "d2", "memory"); \
})

Definition at line 118 of file fp_emu.h.

#define fp_copy_ext (   dest,
  src 
)
Value:
({ \
*dest = *src; \
})

Definition at line 74 of file fp_emu.h.

#define fp_dyadic_check (   dest,
  src 
)
Value:
({ \
return dest; \
if (!fp_normalize_ext(src)) { \
fp_copy_ext(dest, src); \
return dest; \
} \
})

Definition at line 84 of file fp_emu.h.

#define fp_monadic_check (   dest,
  src 
)
Value:
({ \
fp_copy_ext(dest, src); \
return dest; \
})

Definition at line 78 of file fp_emu.h.

#define fp_normalize_ext (   fpreg)
Value:
({ \
register struct fp_ext *reg asm ("a0") = fpreg; \
register int res asm ("d0"); \
\
asm volatile ("jsr fp_conv_ext2ext" \
: "=d" (res) : "a" (reg) \
: "a1", "d1", "d2", "memory"); \
res; \
})

Definition at line 64 of file fp_emu.h.

#define fp_set_nan (   dest)
Value:
({ \
fp_set_sr(FPSR_EXC_OPERR); \
*dest = fp_QNaN; \
})

Definition at line 96 of file fp_emu.h.

#define fp_set_ovrflw (   dest)
Value:
({ \
fp_set_sr(FPSR_EXC_OVFL); \
dest->exp = 0x7fff; \
dest->mant.m64 = 0; \
})

Definition at line 102 of file fp_emu.h.

#define fp_set_quotient (   quotient)
Value:
({ \
FPDATA->fpsr &= 0xff00ffff; \
FPDATA->fpsr |= ((quotient) & 0xff) << 16; \
})

Definition at line 56 of file fp_emu.h.

#define fp_set_sr (   bit)
Value:
({ \
FPDATA->fpsr |= 1 << (bit); \
})

Definition at line 52 of file fp_emu.h.

#define IS_INF (   a)    ((a)->exp == 0x7fff)

Definition at line 48 of file fp_emu.h.

#define IS_ZERO (   a)    ((a)->mant.m64 == 0)

Definition at line 49 of file fp_emu.h.

Variable Documentation

struct fp_ext fp_Inf

Definition at line 26 of file fp_arith.c.

struct fp_ext fp_QNaN

Definition at line 20 of file fp_arith.c.