blob: 9a193ef363153e0750f4b98f5027b46eb21df4fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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;
}
|