Mercurial > hg > CbC > old > device
comparison mc-parse.c @ 276:ebaec1ae566e
MIPS double/longlong lib operand register conflict
author | kono |
---|---|
date | Fri, 21 May 2004 18:59:56 +0900 |
parents | 8f09f8bbc494 |
children | 5b50813d0c45 |
comparison
equal
deleted
inserted
replaced
275:8f09f8bbc494 | 276:ebaec1ae566e |
---|---|
2119 int_value(int e2,int type) | 2119 int_value(int e2,int type) |
2120 { | 2120 { |
2121 if(scalar(type)) return e2; | 2121 if(scalar(type)) return e2; |
2122 #if FLOAT_CODE | 2122 #if FLOAT_CODE |
2123 if (car(e2)==DCONST||car(e2)==FCONST) return list2(CONST,(int)dcadr(e2)); | 2123 if (car(e2)==DCONST||car(e2)==FCONST) return list2(CONST,(int)dcadr(e2)); |
2124 if(type==FLOAT||type==DOUBLE) return list3(CONV,rvalue_t(e2,type),D2I); | 2124 if(type==FLOAT) return list3(CONV,rvalue_t(e2,type),F2I); |
2125 if(type==DOUBLE) return list3(CONV,rvalue_t(e2,type),D2I); | |
2125 #endif | 2126 #endif |
2126 #if LONGLONG_CODE | 2127 #if LONGLONG_CODE |
2127 if (car(e2)==LCONST) return list2(CONST,(int)lcadr(e2)); | 2128 if (car(e2)==LCONST) return list2(CONST,(int)lcadr(e2)); |
2128 if(type==LONGLONG) return list3(CONV,rvalue_t(e2,type),LL2I); | 2129 if(type==LONGLONG) return list3(CONV,rvalue_t(e2,type),LL2I); |
2129 if(type==ULONGLONG) return list3(CONV,rvalue_t(e2,type),ULL2I); | 2130 if(type==ULONGLONG) return list3(CONV,rvalue_t(e2,type),ULL2I); |
2136 unsigned_value(int e2,int type) | 2137 unsigned_value(int e2,int type) |
2137 { | 2138 { |
2138 if(scalar(type)) return e2; | 2139 if(scalar(type)) return e2; |
2139 #if FLOAT_CODE | 2140 #if FLOAT_CODE |
2140 if (car(e2)==DCONST||car(e2)==FCONST) return list2(CONST,(unsigned)dcadr(e2)); | 2141 if (car(e2)==DCONST||car(e2)==FCONST) return list2(CONST,(unsigned)dcadr(e2)); |
2141 if(type==FLOAT||type==DOUBLE) return list3(CONV,rvalue_t(e2,type),D2U); | 2142 if(type==FLOAT) return list3(CONV,rvalue_t(e2,type),F2U); |
2143 if(type==DOUBLE) return list3(CONV,rvalue_t(e2,type),D2U); | |
2142 #endif | 2144 #endif |
2143 #if LONGLONG_CODE | 2145 #if LONGLONG_CODE |
2144 if(type==LONGLONG) return list3(CONV,rvalue_t(e2,type),LL2U); | 2146 if(type==LONGLONG) return list3(CONV,rvalue_t(e2,type),LL2U); |
2145 if(type==ULONGLONG) return list3(CONV,rvalue_t(e2,type),ULL2U); | 2147 if(type==ULONGLONG) return list3(CONV,rvalue_t(e2,type),ULL2U); |
2146 #endif | 2148 #endif |
2245 conv->op_(sym); | 2247 conv->op_(sym); |
2246 lcheck(e1); | 2248 lcheck(e1); |
2247 t=type; | 2249 t=type; |
2248 getsym(0); | 2250 getsym(0); |
2249 e2=rvalue(expr1()); | 2251 e2=rvalue(expr1()); |
2250 return assign_expr(e1,e2,t,type); | 2252 e1 = assign_expr(e1,e2,t,type); |
2253 type = t; | |
2254 return e1; | |
2251 case RSHIFT+AS: case LSHIFT+AS: case BAND+AS: | 2255 case RSHIFT+AS: case LSHIFT+AS: case BAND+AS: |
2252 case EOR+AS: case BOR+AS: case MOD+AS: | 2256 case EOR+AS: case BOR+AS: case MOD+AS: |
2253 no_float = 1; | 2257 no_float = 1; |
2254 case ADD+AS: case SUB+AS: case MUL+AS: case DIV+AS: | 2258 case ADD+AS: case SUB+AS: case MUL+AS: case DIV+AS: |
2255 conv->op_(sym); | 2259 conv->op_(sym); |