common/
[deliverable/binutils-gdb.git] / sim / common / cgen-accfp.c
index e9175225a87b5ee4b7694640c6be502dc96c6637..afbca6d582c1b7e3bfc8ce2df628f85da1fadf04 100644 (file)
@@ -284,8 +284,32 @@ gesf (CGEN_FPU* fpu, SF x, SF y)
   return sim_fpu_is_ge (&op1, &op2);
 }
 
+static DF
+fextsfdf (CGEN_FPU* fpu, int how UNUSED, SF x)
+{
+  sim_fpu op1;
+  unsigned64 res;
+
+  sim_fpu_32to (&op1, x);
+  sim_fpu_to64 (&res, &op1);
+
+  return res;
+}
+
+static SF
+ftruncdfsf (CGEN_FPU* fpu, int how UNUSED, DF x)
+{
+  sim_fpu op1;
+  unsigned32 res;
+
+  sim_fpu_64to (&op1, x);
+  sim_fpu_to32 (&res, &op1);
+
+  return res;
+}
+
 static SF
-floatsisf (CGEN_FPU* fpu, SI x)
+floatsisf (CGEN_FPU* fpu, int how UNUSED, SI x)
 {
   sim_fpu ans;
   unsigned32 res;
@@ -296,7 +320,7 @@ floatsisf (CGEN_FPU* fpu, SI x)
 }
 
 static DF
-floatsidf (CGEN_FPU* fpu, SI x)
+floatsidf (CGEN_FPU* fpu, int how UNUSED, SI x)
 {
   sim_fpu ans;
   unsigned64 res;
@@ -307,7 +331,7 @@ floatsidf (CGEN_FPU* fpu, SI x)
 }
 
 static SF
-ufloatsisf (CGEN_FPU* fpu, USI x)
+ufloatsisf (CGEN_FPU* fpu, int how UNUSED, USI x)
 {
   sim_fpu ans;
   unsigned32 res;
@@ -318,7 +342,7 @@ ufloatsisf (CGEN_FPU* fpu, USI x)
 }
 
 static SI
-fixsfsi (CGEN_FPU* fpu, SF x)
+fixsfsi (CGEN_FPU* fpu, int how UNUSED, SF x)
 {
   sim_fpu op1;
   unsigned32 res;
@@ -329,7 +353,7 @@ fixsfsi (CGEN_FPU* fpu, SF x)
 }
 
 static SI
-fixdfsi (CGEN_FPU* fpu, DF x)
+fixdfsi (CGEN_FPU* fpu, int how UNUSED, DF x)
 {
   sim_fpu op1;
   unsigned32 res;
@@ -340,7 +364,7 @@ fixdfsi (CGEN_FPU* fpu, DF x)
 }
 
 static USI
-ufixsfsi (CGEN_FPU* fpu, SF x)
+ufixsfsi (CGEN_FPU* fpu, int how UNUSED, SF x)
 {
   sim_fpu op1;
   unsigned32 res;
@@ -671,6 +695,8 @@ cgen_init_accurate_fpu (SIM_CPU* cpu, CGEN_FPU* fpu, CGEN_FPU_ERROR_FN* error)
   o->ledf = ledf;
   o->gtdf = gtdf;
   o->gedf = gedf;
+  o->fextsfdf = fextsfdf;
+  o->ftruncdfsf = ftruncdfsf;
   o->floatsisf = floatsisf;
   o->floatsidf = floatsidf;
   o->ufloatsisf = ufloatsisf;
This page took 0.024955 seconds and 4 git commands to generate.