summaryrefslogtreecommitdiff
path: root/sim/mips
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2002-07-29 23:17:10 +0000
committerMichael Snyder <msnyder@specifix.com>2002-07-29 23:17:10 +0000
commitfe57a53c932a1e8963c33ded036a38d3f2295ad6 (patch)
tree17ef327acd63d209f83fee41c7c5b159bf2d9176 /sim/mips
parent60c3f64e4ef0224063b685febd41bb3c838bdd8c (diff)
downloadgdb-fe57a53c932a1e8963c33ded036a38d3f2295ad6.tar.gz
2002-07-29 Michael Snyder <msnyder@redhat.com>
* cp1.c (fp_recip2): Modify initialization expression so that GCC will recognize it as constant.
Diffstat (limited to 'sim/mips')
-rw-r--r--sim/mips/ChangeLog5
-rw-r--r--sim/mips/cp1.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index 9b757823155..5ff1ef02a37 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,3 +1,8 @@
+2002-07-29 Michael Snyder <msnyder@redhat.com>
+
+ * cp1.c (fp_recip2): Modify initialization expression so that
+ GCC will recognize it as constant.
+
2002-06-18 Chris Demetriou <cgd@broadcom.com>
* mdmx.c (SD_): Delete.
diff --git a/sim/mips/cp1.c b/sim/mips/cp1.c
index 26249f00bfe..ea0f5998115 100644
--- a/sim/mips/cp1.c
+++ b/sim/mips/cp1.c
@@ -1235,7 +1235,7 @@ fp_recip2(sim_cpu *cpu,
{
static const unsigned64 one_single = UNSIGNED64 (0x3F800000);
static const unsigned64 one_double = UNSIGNED64 (0x3FF0000000000000);
- static const unsigned64 one_ps = (one_single << 32 | one_single);
+ static const unsigned64 one_ps = (UNSIGNED64 (0x3F800000) << 32 | UNSIGNED64 (0x3F800000));
unsigned64 one;
/* Implemented as nmsub fd, 1, fs, ft. */
@@ -1333,7 +1333,7 @@ fp_rsqrt2(sim_cpu *cpu,
{
static const unsigned64 half_single = UNSIGNED64 (0x3F000000);
static const unsigned64 half_double = UNSIGNED64 (0x3FE0000000000000);
- static const unsigned64 half_ps = (half_single << 32 | half_single);
+ static const unsigned64 half_ps = (UNSIGNED64 (0x3F000000) << 32 | UNSIGNED64 (0x3F000000));
unsigned64 half;
/* Implemented as (nmsub fd, 0.5, fs, ft)/2, where the divide is