Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64087
b: refs/heads/master
c: 4058496
h: refs/heads/master
i:
  64085: a7b7742
  64083: 27704c9
  64079: bb9425e
v: v3
  • Loading branch information
David S. Miller committed Aug 17, 2007
1 parent 73a55ec commit c2a4cb8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8b224b813aad0231af62dc75d056aae83c9d4d12
refs/heads/master: 405849610fd96b4f34cd1875c4c033228fea6c0f
6 changes: 6 additions & 0 deletions trunk/include/asm-sparc/sfp-machine.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,10 @@ extern struct task_struct *last_task_used_math;
#define FP_INHIBIT_RESULTS ((last_task_used_math->thread.fsr >> 23) & _fex)
#endif

#ifdef CONFIG_SMP
#define FP_TRAPPING_EXCEPTIONS ((current->thread.fsr >> 23) & 0x1f)
#else
#define FP_TRAPPING_EXCEPTIONS ((last_task_used_math->thread.fsr >> 23) & 0x1f)
#endif

#endif
2 changes: 2 additions & 0 deletions trunk/include/asm-sparc64/sfp-machine.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,6 @@

#define FP_INHIBIT_RESULTS ((current_thread_info()->xfsr[0] >> 23) & _fex)

#define FP_TRAPPING_EXCEPTIONS ((current_thread_info()->xfsr[0] >> 23) & 0x1f)

#endif
5 changes: 4 additions & 1 deletion trunk/include/math-emu/op-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,16 @@ do { \
{ \
X##_e = 1; \
_FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \
FP_SET_EXCEPTION(FP_EX_INEXACT); \
} \
else \
{ \
X##_e = 0; \
_FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \
FP_SET_EXCEPTION(FP_EX_UNDERFLOW); \
} \
if ((FP_CUR_EXCEPTIONS & FP_EX_INEXACT) || \
(FP_TRAPPING_EXCEPTIONS & FP_EX_UNDERFLOW)) \
FP_SET_EXCEPTION(FP_EX_UNDERFLOW); \
} \
else \
{ \
Expand Down
7 changes: 7 additions & 0 deletions trunk/include/math-emu/soft-fp.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,19 @@
#define FP_INHIBIT_RESULTS 0
#endif

#ifndef FP_TRAPPING_EXCEPTIONS
#define FP_TRAPPING_EXCPETIONS 0
#endif

#define FP_SET_EXCEPTION(ex) \
_fex |= (ex)

#define FP_UNSET_EXCEPTION(ex) \
_fex &= ~(ex)

#define FP_CUR_EXCEPTIONS \
(_fex)

#define FP_CLEAR_EXCEPTIONS \
_fex = 0

Expand Down

0 comments on commit c2a4cb8

Please sign in to comment.