1 #include "cc.h" 2 3 /* 4 * this is machine depend, but it is totally 5 * common on all of the 64-bit symulating machines. 6 */ 7 8 /* 9 * more machine depend stuff. 10 * this is common for 8,16,32,64 bit machines. 11 * this is common for ieee machines. 12 */ 13 double 14 convvtof(vlong v) 15 { 16 double d; 17 18 d = v; /* BOTCH */ 19 return d; 20 } 21 22 vlong 23 convftov(double d) 24 { 25 vlong v; 26 27 28 v = d; /* BOTCH */ 29 return v; 30 } 31 32 double 33 convftox(double d, int et) 34 { 35 36 if(!typefd[et]) 37 diag(Z, "bad type in castftox %s", tnames[et]); 38 return d; 39 } 40 41 vlong 42 convvtox(vlong c, int et) 43 { 44 int n; 45 46 n = 8 * ewidth[et]; 47 c &= MASK(n); 48 if(!typeu[et]) 49 if(c & SIGN(n)) 50 c |= ~MASK(n); 51 return c; 52 } 53