git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@830
4a8a32a2-be11-0410-ad9d-
d568d2c75423
- long i = operandLitValue (left);
+ long i = (long) operandLitValue (left);
retval = operandFromLit ((i >> (getSize (operandType (left)) * 8 - 1)) |
(i << 1));
retval = operandFromLit ((i >> (getSize (operandType (left)) * 8 - 1)) |
(i << 1));
- long i = operandLitValue (left);
+ long i = (long) operandLitValue (left);
retval = operandFromLit ((i << (getSize (operandType (left)) * 8 - 1)) |
(i >> 1));
retval = operandFromLit ((i << (getSize (operandType (left)) * 8 - 1)) |
(i >> 1));
/* operandFromLit - makes an operand from a literal value */
/*-----------------------------------------------------------------*/
operand *
/* operandFromLit - makes an operand from a literal value */
/*-----------------------------------------------------------------*/
operand *
-operandFromLit (float i)
+operandFromLit (double i)
{
return operandFromValue (valueFromLit (i));
}
{
return operandFromValue (valueFromLit (i));
}
{
if (IS_INTEGRAL (operandType (op)))
{
{
if (IS_INTEGRAL (operandType (op)))
{
- if (getSize (operandType (op)) < INTSIZE)
+ if (getSize (operandType (op)) < (unsigned int) INTSIZE)
{
/* Widen to int. */
return geniCodeCast (INTTYPE, op, TRUE);
{
/* Widen to int. */
return geniCodeCast (INTTYPE, op, TRUE);
if (IS_INTEGRAL (ltype) && IS_LITERAL (rtype))
{
int nbits = bitsForType (ltype);
if (IS_INTEGRAL (ltype) && IS_LITERAL (rtype))
{
int nbits = bitsForType (ltype);
- long v = operandLitValue (right);
+ long v = (long) operandLitValue (right);
if (v > ((LONG_LONG) 1 << nbits) && v > 0)
werror (W_CONST_RANGE, " compare operation ");
if (v > ((LONG_LONG) 1 << nbits) && v > 0)
werror (W_CONST_RANGE, " compare operation ");
if (IS_INTEGRAL (ltype) && right->type == VALUE && IS_LITERAL (rtype))
{
int nbits = bitsForType (ltype);
if (IS_INTEGRAL (ltype) && right->type == VALUE && IS_LITERAL (rtype))
{
int nbits = bitsForType (ltype);
- long v = operandLitValue (right);
+ long v = (long) operandLitValue (right);
if (v > ((LONG_LONG) 1 << nbits) && v > 0)
werror (W_CONST_RANGE, " = operation");
if (v > ((LONG_LONG) 1 << nbits) && v > 0)
werror (W_CONST_RANGE, " = operation");
int isOperandLiteral (operand *);
operand *operandOperation (operand *, operand *, int, sym_link *);
double operandLitValue (operand *);
int isOperandLiteral (operand *);
operand *operandOperation (operand *, operand *, int, sym_link *);
double operandLitValue (operand *);
-operand *operandFromLit (float);
+operand *operandFromLit (double);
operand *operandFromOperand (operand *);
int isParameterToCall (value *, operand *);
iCode *newiCodeLabelGoto (int, symbol *);
operand *operandFromOperand (operand *);
int isParameterToCall (value *, operand *);
iCode *newiCodeLabelGoto (int, symbol *);
continue;
aSym = (IS_OP_LITERAL (IC_RIGHT (dic)) ?
continue;
aSym = (IS_OP_LITERAL (IC_RIGHT (dic)) ?
- (litValue = operandLitValue (IC_RIGHT (dic)), IC_LEFT (dic)) :
- (litValue = operandLitValue (IC_LEFT (dic)), IC_RIGHT (dic)));
+ (litValue = (unsigned long) operandLitValue (IC_RIGHT (dic)), IC_LEFT (dic)) :
+ (litValue = (unsigned long) operandLitValue (IC_LEFT (dic)), IC_RIGHT (dic)));
if (!isOperandEqual (IC_RESULT (ic), aSym) &&
!isOperandEqual (IC_RIGHT (ic), aSym))
if (!isOperandEqual (IC_RESULT (ic), aSym) &&
!isOperandEqual (IC_RIGHT (ic), aSym))
continue;
aSym = (IS_SYMOP (IC_LEFT (ic)) ?
continue;
aSym = (IS_SYMOP (IC_LEFT (ic)) ?
- (lr = 1, litVal = operandLitValue (IC_RIGHT (ic)), IC_LEFT (ic)) :
- (litVal = operandLitValue (IC_LEFT (ic)), IC_RIGHT (ic)));
+ (lr = 1, litVal = (unsigned long) operandLitValue (IC_RIGHT (ic)), IC_LEFT (ic)) :
+ (litVal = (unsigned long) operandLitValue (IC_LEFT (ic)), IC_RIGHT (ic)));
ip = NULL;
/* check if this is an induction variable */
ip = NULL;
/* check if this is an induction variable */
/* ask port for size not worth if native instruction
exist for multiply & divide */
/* ask port for size not worth if native instruction
exist for multiply & divide */
- if (getSize (operandType (IC_LEFT (ic))) <= port->muldiv.native_below ||
- getSize (operandType (IC_RIGHT (ic))) <= port->muldiv.native_below)
+ if (getSize (operandType (IC_LEFT (ic))) <= (unsigned long) port->muldiv.native_below ||
+ getSize (operandType (IC_RIGHT (ic))) <= (unsigned long) port->muldiv.native_below)
continue;
/* if this is a division then the remainder should be zero
continue;
/* if this is a division then the remainder should be zero
value *valBitwise (value *, value *, int);
value *valLogicAndOr (value *, value *, int);
value *valCastLiteral (sym_link *, double);
value *valBitwise (value *, value *, int);
value *valLogicAndOr (value *, value *, int);
value *valCastLiteral (sym_link *, double);
-value *valueFromLit (float);
+value *valueFromLit (double);
initList *newiList (int, void *);
initList *revinit (initList *);
initList *copyIlist (initList *);
initList *newiList (int, void *);
initList *revinit (initList *);
initList *copyIlist (initList *);
void printIval (symbol *, sym_link *, initList *, FILE *);
extern int noAlloc;
extern set *publics;
void printIval (symbol *, sym_link *, initList *, FILE *);
extern int noAlloc;
extern set *publics;
-extern int maxInterrupts;
+extern unsigned maxInterrupts;
extern int maxRegBank;
extern symbol *mainf;
extern char *VersionString;
extern int maxRegBank;
extern symbol *mainf;
extern char *VersionString;
static void
pic14createInterruptVect (FILE * vFile)
{
static void
pic14createInterruptVect (FILE * vFile)
{
mainf = newSymbol ("main", 0);
mainf->block = 0;
mainf = newSymbol ("main", 0);
mainf->block = 0;
/** One more than the smallest
mul/div operation the processor can do nativley
Eg if the processor has an 8 bit mul, nativebelow is 2 */
/** One more than the smallest
mul/div operation the processor can do nativley
Eg if the processor has an 8 bit mul, nativebelow is 2 */
/** The mul/div/mod functions will be made to use regparams
for sizeof(param) < log2(force_reg)
i.e. Use 2 for WORD and BYTE, 0 for none. */
/** The mul/div/mod functions will be made to use regparams
for sizeof(param) < log2(force_reg)
i.e. Use 2 for WORD and BYTE, 0 for none. */