summaryrefslogtreecommitdiff
path: root/utils/c2l/com64.c
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2006-12-22 21:39:35 +0000
committerCharles.Forsyth <devnull@localhost>2006-12-22 21:39:35 +0000
commit74a4d8c26dd3c1e9febcb717cfd6cb6512991a7a (patch)
treec6e220ba61db3a6ea4052e6841296d829654e664 /utils/c2l/com64.c
parent46439007cf417cbd9ac8049bb4122c890097a0fa (diff)
20060303
Diffstat (limited to 'utils/c2l/com64.c')
-rw-r--r--utils/c2l/com64.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/utils/c2l/com64.c b/utils/c2l/com64.c
new file mode 100644
index 00000000..9a193ef3
--- /dev/null
+++ b/utils/c2l/com64.c
@@ -0,0 +1,52 @@
+#include "cc.h"
+
+/*
+ * this is machine depend, but it is totally
+ * common on all of the 64-bit symulating machines.
+ */
+
+/*
+ * more machine depend stuff.
+ * this is common for 8,16,32,64 bit machines.
+ * this is common for ieee machines.
+ */
+double
+convvtof(vlong v)
+{
+ double d;
+
+ d = v; /* BOTCH */
+ return d;
+}
+
+vlong
+convftov(double d)
+{
+ vlong v;
+
+
+ v = d; /* BOTCH */
+ return v;
+}
+
+double
+convftox(double d, int et)
+{
+
+ if(!typefd[et])
+ diag(Z, "bad type in castftox %s", tnames[et]);
+ return d;
+}
+
+vlong
+convvtox(vlong c, int et)
+{
+ int n;
+
+ n = 8 * ewidth[et];
+ c &= MASK(n);
+ if(!typeu[et])
+ if(c & SIGN(n))
+ c |= ~MASK(n);
+ return c;
+}