Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
math.c File Reference
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <asm/uaccess.h>
#include <asm/lowcore.h>
#include <asm/sfp-util.h>
#include <math-emu/soft-fp.h>
#include <math-emu/single.h>
#include <math-emu/double.h>
#include <math-emu/quad.h>

Go to the source code of this file.

Data Structures

union  mathemu_ldcv
 

Macros

#define _FP_TO_FPINT_ROUND(fs, wc, X)
 
#define FP_TO_FPINT_ROUND_S(X)   _FP_TO_FPINT_ROUND(S,1,X)
 
#define FP_TO_FPINT_ROUND_D(X)   _FP_TO_FPINT_ROUND(D,2,X)
 
#define FP_TO_FPINT_ROUND_Q(X)   _FP_TO_FPINT_ROUND(Q,4,X)
 
#define mathemu_put_user(x, p)
 
#define mathemu_get_user(x, p)
 
#define mathemu_copy_from_user(d, s, n)
 
#define mathemu_copy_to_user(d, s, n)
 

Functions

int math_emu_b3 (__u8 *opcode, struct pt_regs *regs)
 
int math_emu_ed (__u8 *opcode, struct pt_regs *regs)
 
int math_emu_ldr (__u8 *opcode)
 
int math_emu_ler (__u8 *opcode)
 
int math_emu_ld (__u8 *opcode, struct pt_regs *regs)
 
int math_emu_le (__u8 *opcode, struct pt_regs *regs)
 
int math_emu_std (__u8 *opcode, struct pt_regs *regs)
 
int math_emu_ste (__u8 *opcode, struct pt_regs *regs)
 
int math_emu_lfpc (__u8 *opcode, struct pt_regs *regs)
 
int math_emu_stfpc (__u8 *opcode, struct pt_regs *regs)
 
int math_emu_srnm (__u8 *opcode, struct pt_regs *regs)
 
long long __negdi2 (long long u)
 

Macro Definition Documentation

#define _FP_TO_FPINT_ROUND (   fs,
  wc,
  X 
)
Value:
do { \
switch (X##_c) \
{ \
case FP_CLS_NORMAL: \
if (X##_e > _FP_FRACBITS_##fs + _FP_EXPBIAS_##fs) \
{ /* floating point number has no bits after the dot. */ \
} \
else if (X##_e <= _FP_FRACBITS_##fs + _FP_EXPBIAS_##fs && \
X##_e > _FP_EXPBIAS_##fs) \
{ /* some bits before the dot, some after it. */ \
_FP_FRAC_SRS_##wc(X, _FP_WFRACBITS_##fs, \
X##_e - _FP_EXPBIAS_##fs \
+ _FP_FRACBITS_##fs); \
_FP_ROUND(wc, X); \
_FP_FRAC_SLL_##wc(X, X##_e - _FP_EXPBIAS_##fs \
+ _FP_FRACBITS_##fs); \
} \
else \
{ /* all bits after the dot. */ \
FP_SET_EXCEPTION(FP_EX_INEXACT); \
X##_c = FP_CLS_ZERO; \
} \
break; \
case FP_CLS_NAN: \
case FP_CLS_INF: \
case FP_CLS_ZERO: \
break; \
} \
} while (0)

Definition at line 26 of file math.c.

#define FP_TO_FPINT_ROUND_D (   X)    _FP_TO_FPINT_ROUND(D,2,X)

Definition at line 58 of file math.c.

#define FP_TO_FPINT_ROUND_Q (   X)    _FP_TO_FPINT_ROUND(Q,4,X)

Definition at line 59 of file math.c.

#define FP_TO_FPINT_ROUND_S (   X)    _FP_TO_FPINT_ROUND(S,1,X)

Definition at line 57 of file math.c.

#define mathemu_copy_from_user (   d,
  s,
  n 
)
Value:
do { \
if (copy_from_user((d),(s),(n)) != 0) \
return SIGSEGV; \
} while (0)

Definition at line 85 of file math.c.

#define mathemu_copy_to_user (   d,
  s,
  n 
)
Value:
do { \
if (copy_to_user((d),(s),(n)) != 0) \
return SIGSEGV; \
} while (0)

Definition at line 91 of file math.c.

#define mathemu_get_user (   x,
  p 
)
Value:
do { \
if (get_user((x),(p))) \
return SIGSEGV; \
} while (0)

Definition at line 79 of file math.c.

#define mathemu_put_user (   x,
  p 
)
Value:
do { \
if (put_user((x),(p))) \
return SIGSEGV; \
} while (0)

Definition at line 73 of file math.c.

Function Documentation

long long __negdi2 ( long long  u)

Definition at line 2237 of file math.c.

int math_emu_b3 ( __u8 opcode,
struct pt_regs regs 
)

Definition at line 1613 of file math.c.

int math_emu_ed ( __u8 opcode,
struct pt_regs regs 
)

Definition at line 1887 of file math.c.

int math_emu_ld ( __u8 opcode,
struct pt_regs regs 
)

Definition at line 2144 of file math.c.

int math_emu_ldr ( __u8 opcode)

Definition at line 2084 of file math.c.

int math_emu_le ( __u8 opcode,
struct pt_regs regs 
)

Definition at line 2157 of file math.c.

int math_emu_ler ( __u8 opcode)

Definition at line 2114 of file math.c.

int math_emu_lfpc ( __u8 opcode,
struct pt_regs regs 
)

Definition at line 2198 of file math.c.

int math_emu_srnm ( __u8 opcode,
struct pt_regs regs 
)

Definition at line 2225 of file math.c.

int math_emu_std ( __u8 opcode,
struct pt_regs regs 
)

Definition at line 2171 of file math.c.

int math_emu_ste ( __u8 opcode,
struct pt_regs regs 
)

Definition at line 2184 of file math.c.

int math_emu_stfpc ( __u8 opcode,
struct pt_regs regs 
)

Definition at line 2213 of file math.c.