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
04ae9e4c
Commit
04ae9e4c
authored
May 16, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(ereal_from_float, .._double): Change arg from long to HOST_WIDE_INT
and unpack the HOST_WIDE_INTs. From-SVN: r7312
parent
403cd5d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
10 deletions
+28
-10
gcc/real.c
+28
-10
No files found.
gcc/real.c
View file @
04ae9e4c
...
@@ -5489,7 +5489,7 @@ make_nan (nan, sign, mode)
...
@@ -5489,7 +5489,7 @@ make_nan (nan, sign, mode)
REAL_VALUE_TYPE
REAL_VALUE_TYPE
ereal_from_float
(
f
)
ereal_from_float
(
f
)
unsigned
long
f
;
HOST_WIDE_INT
f
;
{
{
REAL_VALUE_TYPE
r
;
REAL_VALUE_TYPE
r
;
unsigned
EMUSHORT
s
[
2
];
unsigned
EMUSHORT
s
[
2
];
...
@@ -5516,31 +5516,49 @@ ereal_from_float (f)
...
@@ -5516,31 +5516,49 @@ ereal_from_float (f)
This is the inverse of the function `etardouble' invoked by
This is the inverse of the function `etardouble' invoked by
REAL_VALUE_TO_TARGET_DOUBLE.
REAL_VALUE_TO_TARGET_DOUBLE.
The DFmode is stored as an array of
long int
s
The DFmode is stored as an array of
HOST_WIDE_INT in the target'
s
with 32 bits of the value per each lo
ng. The first element
data format, with no holes in the bit packi
ng. The first element
of the input array holds the bits that would come first in the
of the input array holds the bits that would come first in the
target computer's memory. */
target computer's memory. */
REAL_VALUE_TYPE
REAL_VALUE_TYPE
ereal_from_double
(
d
)
ereal_from_double
(
d
)
unsigned
long
d
[];
HOST_WIDE_INT
d
[];
{
{
REAL_VALUE_TYPE
r
;
REAL_VALUE_TYPE
r
;
unsigned
EMUSHORT
s
[
4
];
unsigned
EMUSHORT
s
[
4
];
unsigned
EMUSHORT
e
[
NE
];
unsigned
EMUSHORT
e
[
NE
];
/* Convert array of 32 bit pieces to equivalent array of 16 bit pieces.
/* Convert array of HOST_WIDE_INT to equivalent array of 16-bit pieces. */
This is the inverse of `endian'. */
#if FLOAT_WORDS_BIG_ENDIAN
#if FLOAT_WORDS_BIG_ENDIAN
s
[
0
]
=
(
unsigned
EMUSHORT
)
(
d
[
0
]
>>
16
);
s
[
0
]
=
(
unsigned
EMUSHORT
)
(
d
[
0
]
>>
16
);
s
[
1
]
=
(
unsigned
EMUSHORT
)
d
[
0
];
s
[
1
]
=
(
unsigned
EMUSHORT
)
d
[
0
];
s
[
2
]
=
(
unsigned
EMUSHORT
)
(
d
[
1
]
>>
16
);
if
(
HOST_BITS_PER_WIDE_INT
>=
64
)
s
[
3
]
=
(
unsigned
EMUSHORT
)
d
[
1
];
{
/* In this case the entire target double is contained in the
first array element. The second element of the input is ignored. */
s
[
2
]
=
(
unsigned
EMUSHORT
)
(
d
[
0
]
>>
48
);
s
[
3
]
=
(
unsigned
EMUSHORT
)
(
d
[
0
]
>>
32
);
}
else
{
s
[
2
]
=
(
unsigned
EMUSHORT
)
(
d
[
1
]
>>
16
);
s
[
3
]
=
(
unsigned
EMUSHORT
)
d
[
1
];
}
#else
#else
/* Target float words are little-endian. */
s
[
0
]
=
(
unsigned
EMUSHORT
)
d
[
0
];
s
[
0
]
=
(
unsigned
EMUSHORT
)
d
[
0
];
s
[
1
]
=
(
unsigned
EMUSHORT
)
(
d
[
0
]
>>
16
);
s
[
1
]
=
(
unsigned
EMUSHORT
)
(
d
[
0
]
>>
16
);
s
[
2
]
=
(
unsigned
EMUSHORT
)
d
[
1
];
if
(
HOST_BITS_PER_WIDE_INT
>=
64
)
s
[
3
]
=
(
unsigned
EMUSHORT
)
(
d
[
1
]
>>
16
);
{
s
[
2
]
=
(
unsigned
EMUSHORT
)
(
d
[
0
]
>>
32
);
s
[
3
]
=
(
unsigned
EMUSHORT
)
(
d
[
0
]
>>
48
);
}
else
{
s
[
2
]
=
(
unsigned
EMUSHORT
)
d
[
1
];
s
[
3
]
=
(
unsigned
EMUSHORT
)
(
d
[
1
]
>>
16
);
}
#endif
#endif
/* Convert target double to E-type. */
/* Convert target double to E-type. */
e53toe
(
s
,
e
);
e53toe
(
s
,
e
);
...
...
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