Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
54f4eaf0
Commit
54f4eaf0
authored
Nov 15, 2012
by
Marcus Shawcroft
Committed by
Marcus Shawcroft
Nov 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
soft-fp updated from GLIBC upstream.
From-SVN: r193540
parent
59bdc31c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
29 deletions
+46
-29
libgcc/ChangeLog
+4
-0
libgcc/soft-fp/op-common.h
+17
-13
libgcc/soft-fp/soft-fp.h
+25
-16
No files found.
libgcc/ChangeLog
View file @
54f4eaf0
2012-11-15 Marcus Shawcroft <marcus.shawcroft@arm.com>
* soft-fp: Updated from glibc upstream.
2012-11-06 Ian Lance Taylor <iant@google.com>
2012-11-06 Ian Lance Taylor <iant@google.com>
* generic-morestack.c (__generic_morestack): Align the returned
* generic-morestack.c (__generic_morestack): Align the returned
...
...
libgcc/soft-fp/op-common.h
View file @
54f4eaf0
/* Software floating-point emulation. Common operations.
/* Software floating-point emulation. Common operations.
Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc.
Copyright (C) 1997,1998,1999,2006,2007
,2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
Jakub Jelinek (jj@ultra.linux.cz),
...
@@ -134,6 +134,12 @@ do { \
...
@@ -134,6 +134,12 @@ do { \
#define _FP_PACK_SEMIRAW(fs, wc, X) \
#define _FP_PACK_SEMIRAW(fs, wc, X) \
do { \
do { \
_FP_ROUND(wc, X); \
_FP_ROUND(wc, X); \
if (X##_e == 0 && !_FP_FRAC_ZEROP_##wc(X)) \
{ \
if ((FP_CUR_EXCEPTIONS & FP_EX_INEXACT) \
|| (FP_TRAPPING_EXCEPTIONS & FP_EX_UNDERFLOW)) \
FP_SET_EXCEPTION(FP_EX_UNDERFLOW); \
} \
if (_FP_FRAC_HIGH_##fs(X) \
if (_FP_FRAC_HIGH_##fs(X) \
& (_FP_OVERFLOW_##fs >> 1)) \
& (_FP_OVERFLOW_##fs >> 1)) \
{ \
{ \
...
@@ -143,20 +149,15 @@ do { \
...
@@ -143,20 +149,15 @@ do { \
_FP_OVERFLOW_SEMIRAW(fs, wc, X); \
_FP_OVERFLOW_SEMIRAW(fs, wc, X); \
} \
} \
_FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \
_FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \
if (
!_FP_EXP_NORMAL(fs, wc, X)
&& !_FP_FRAC_ZEROP_##wc(X)) \
if (
X##_e == _FP_EXPMAX_##fs
&& !_FP_FRAC_ZEROP_##wc(X)) \
{ \
{ \
if (X##_e == 0) \
if (!_FP_KEEPNANFRACP) \
FP_SET_EXCEPTION(FP_EX_UNDERFLOW); \
else \
{ \
{ \
if (!_FP_KEEPNANFRACP) \
_FP_FRAC_SET_##wc(X, _FP_NANFRAC_##fs); \
{ \
X##_s = _FP_NANSIGN_##fs; \
_FP_FRAC_SET_##wc(X, _FP_NANFRAC_##fs); \
X##_s = _FP_NANSIGN_##fs; \
} \
else \
_FP_FRAC_HIGH_RAW_##fs(X) |= _FP_QNANBIT_##fs; \
} \
} \
else \
_FP_FRAC_HIGH_RAW_##fs(X) |= _FP_QNANBIT_##fs; \
} \
} \
} while (0)
} while (0)
...
@@ -226,13 +227,16 @@ do { \
...
@@ -226,13 +227,16 @@ do { \
{ \
{ \
X##_e = 1; \
X##_e = 1; \
_FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \
_FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \
FP_SET_EXCEPTION(FP_EX_INEXACT); \
} \
} \
else \
else \
{ \
{ \
X##_e = 0; \
X##_e = 0; \
_FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \
_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 \
else \
{ \
{ \
...
...
libgcc/soft-fp/soft-fp.h
View file @
54f4eaf0
...
@@ -128,6 +128,13 @@
...
@@ -128,6 +128,13 @@
#define FP_CLEAR_EXCEPTIONS \
#define FP_CLEAR_EXCEPTIONS \
_fex = 0
_fex = 0
#define FP_CUR_EXCEPTIONS \
(_fex)
#ifndef FP_TRAPPING_EXCEPTIONS
#define FP_TRAPPING_EXCEPTIONS 0
#endif
#define _FP_ROUND_NEAREST(wc, X) \
#define _FP_ROUND_NEAREST(wc, X) \
do { \
do { \
if ((_FP_FRAC_LOW_##wc(X) & 15) != _FP_WORK_ROUND) \
if ((_FP_FRAC_LOW_##wc(X) & 15) != _FP_WORK_ROUND) \
...
@@ -151,22 +158,24 @@ do { \
...
@@ -151,22 +158,24 @@ do { \
#define _FP_ROUND(wc, X) \
#define _FP_ROUND(wc, X) \
do { \
do { \
if (_FP_FRAC_LOW_##wc(X) & 7) \
if (_FP_FRAC_LOW_##wc(X) & 7) \
FP_SET_EXCEPTION(FP_EX_INEXACT); \
{ \
switch (FP_ROUNDMODE) \
FP_SET_EXCEPTION(FP_EX_INEXACT); \
{ \
switch (FP_ROUNDMODE) \
case FP_RND_NEAREST: \
{ \
_FP_ROUND_NEAREST(wc,X); \
case FP_RND_NEAREST: \
break; \
_FP_ROUND_NEAREST(wc,X); \
case FP_RND_ZERO: \
break; \
_FP_ROUND_ZERO(wc,X); \
case FP_RND_ZERO: \
break; \
_FP_ROUND_ZERO(wc,X); \
case FP_RND_PINF: \
break; \
_FP_ROUND_PINF(wc,X); \
case FP_RND_PINF: \
break; \
_FP_ROUND_PINF(wc,X); \
case FP_RND_MINF: \
break; \
_FP_ROUND_MINF(wc,X); \
case FP_RND_MINF: \
break; \
_FP_ROUND_MINF(wc,X); \
} \
break; \
} \
} \
} while (0)
} while (0)
#define FP_CLS_NORMAL 0
#define FP_CLS_NORMAL 0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment