#include "SDCCglobl.h"
#include "newalloc.h"
-#if defined(_MSC_VER)
-#define __FUNCTION__ __FILE__
-#endif
-
#ifdef HAVE_SYS_ISA_DEFS_H
#include <sys/isa_defs.h>
#else
DEBUGpic14_emitcode(";","%s %d",__FUNCTION__,__LINE__);
for (;;) {
if (ic->op == '+')
- val += operandLitValue(IC_RIGHT(ic));
+ val += (int) operandLitValue(IC_RIGHT(ic));
else if (ic->op == '-')
- val -= operandLitValue(IC_RIGHT(ic));
+ val -= (int) operandLitValue(IC_RIGHT(ic));
else
break;
}
if (sym->ruonly ) {
- int i;
+ unsigned i;
aop = op->aop = sym->aop = newAsmop(AOP_STR);
aop->size = getSize(sym->type);
for ( i = 0 ; i < fReturnSizePic ; i++ )
sprintf(buffer,"%s",l);
if (AOP_TYPE(right) == AOP_LIT) {
- unsigned int lit = floatFromVal (AOP(IC_RIGHT(ic))->aopu.aop_lit);
+ unsigned int lit = (unsigned int) floatFromVal (AOP(IC_RIGHT(ic))->aopu.aop_lit);
lit = lit >> (8*offset);
if(lit&0xff) {
pic14_emitcode("movlw","%d",lit);
} else {
if (AOP_TYPE(right) == AOP_LIT) {
- unsigned int lit = floatFromVal (AOP(IC_RIGHT(ic))->aopu.aop_lit);
+ unsigned int lit = (unsigned int) floatFromVal (AOP(IC_RIGHT(ic))->aopu.aop_lit);
if(lit) {
pic14_emitcode("movlw","%s",l);
pic14_emitcode("movwf","indf ;2");
#include "pcode.h"
#include "gen.h"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
/*-----------------------------------------------------------------*/
/* genPlusIncr :- does addition with increment if possible */
/*-----------------------------------------------------------------*/
DEBUGpic14_emitcode ("; ","%s %d",__FUNCTION__,__LINE__);
/* if the literal value of the right hand side
is greater than 1 then it is faster to add */
- if ((icount = floatFromVal (AOP(IC_RIGHT(ic))->aopu.aop_lit)) > 2)
+ if ((icount = (unsigned int) floatFromVal (AOP(IC_RIGHT(ic))->aopu.aop_lit)) > 2)
return FALSE ;
/* if increment 16 bits in register */
if(AOP(IC_RIGHT(ic))->type == AOP_LIT) {
/* Add a literal to something else */
bool know_W=0;
- unsigned lit = floatFromVal(AOP(IC_RIGHT(ic))->aopu.aop_lit);
+ unsigned lit = (unsigned) floatFromVal(AOP(IC_RIGHT(ic))->aopu.aop_lit);
unsigned l1=0;
offset = 0;
/* if it is a float then it gets tricky */
/* otherwise it is fairly simple */
if (!IS_FLOAT(val->type)) {
- unsigned long v = floatFromVal(val);
+ unsigned long v = (unsigned long) floatFromVal(val);
//v >>= (offset * 8);
return ( (v >> (offset * 8)) & 0xff);
#include "pcode.h"
#include "gen.h"
-#if defined(_MSC_VER)
-#define __FUNCTION__ __FILE__
-#endif
-
/*-----------------------------------------------------------------*/
/* At this point we start getting processor specific although */
/* some routines are non-processor specific & can be reused when */
/* if we need ptr regs for the right side
then mark it */
if (POINTER_GET (ic) && getSize (OP_SYMBOL (IC_LEFT (ic))->type)
- <= PTRSIZE)
+ <= (unsigned) PTRSIZE)
{
pic14_ptrRegReq++;
ptrRegSet = 1;