projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added to test bug 609628 ==> x = (x+1) & 0xf
[fw/sdcc]
/
src
/
pic
/
gen.h
diff --git
a/src/pic/gen.h
b/src/pic/gen.h
index f229cad6419e44132f38a971260136b6b454d6bd..36c5d15705a17a596054acc9f6a22c21c18d2899 100644
(file)
--- a/
src/pic/gen.h
+++ b/
src/pic/gen.h
@@
-26,13
+26,17
@@
#ifndef SDCCGENPIC14_H
#define SDCCGENPIC14_H
#ifndef SDCCGENPIC14_H
#define SDCCGENPIC14_H
+struct pCodeOp;
+
enum
{
AOP_LIT = 1,
AOP_REG, AOP_DIR,
AOP_DPTR, AOP_DPTR2, AOP_R0, AOP_R1,
AOP_STK, AOP_IMMD, AOP_STR,
enum
{
AOP_LIT = 1,
AOP_REG, AOP_DIR,
AOP_DPTR, AOP_DPTR2, AOP_R0, AOP_R1,
AOP_STK, AOP_IMMD, AOP_STR,
- AOP_CRY, AOP_ACC
+ AOP_CRY, AOP_ACC,
+ AOP_PCODE
+
};
/* type asmop : a homogenised type for
};
/* type asmop : a homogenised type for
@@
-69,6
+73,8
@@
typedef struct asmop
char *aop_immd; /* if immediate others are implied */
int aop_stk; /* stack offset when AOP_STK */
char *aop_str[4]; /* just a string array containing the location */
char *aop_immd; /* if immediate others are implied */
int aop_stk; /* stack offset when AOP_STK */
char *aop_str[4]; /* just a string array containing the location */
+/* regs *aop_alloc_reg; * points to a dynamically allocated register */
+ pCodeOp *pcop;
}
aopu;
}
}
aopu;
}
@@
-134,6
+140,7
@@
extern unsigned fReturnSizePic;
int pic14_getDataSize(operand *op);
void emitpcode(PIC_OPCODE poc, pCodeOp *pcop);
int pic14_getDataSize(operand *op);
void emitpcode(PIC_OPCODE poc, pCodeOp *pcop);
+void emitpLabel(int key);
void pic14_emitcode (char *inst,char *fmt, ...);
void DEBUGpic14_emitcode (char *inst,char *fmt, ...);
asmop *newAsmop (short type);
void pic14_emitcode (char *inst,char *fmt, ...);
void DEBUGpic14_emitcode (char *inst,char *fmt, ...);
asmop *newAsmop (short type);
@@
-156,8
+163,10
@@
pCodeOp *popCopyReg(pCodeOpReg *pc);
pCodeOp *popCopyGPR2Bit(pCodeOp *pc, int bitval);
pCodeOp *popGetLit(unsigned int lit);
pCodeOp *popGetWithString(char *str);
pCodeOp *popCopyGPR2Bit(pCodeOp *pc, int bitval);
pCodeOp *popGetLit(unsigned int lit);
pCodeOp *popGetWithString(char *str);
-pCodeOp *popRegFromString(char *str);
+pCodeOp *popRegFromString(char *str
, int size, int offset
);
pCodeOp *popGet (asmop *aop, int offset);//, bool bit16, bool dname);
pCodeOp *popGet (asmop *aop, int offset);//, bool bit16, bool dname);
+pCodeOp *popGetTempReg(void);
+void popReleaseTempReg(pCodeOp *pcop);
void aopPut (asmop *aop, char *s, int offset);
void aopPut (asmop *aop, char *s, int offset);
@@
-166,6
+175,8
@@
void aopOp (operand *op, iCode *ic, bool result);
void pic14_outBitC(operand *result);
void pic14_toBoolean(operand *oper);
void freeAsmop (operand *op, asmop *aaop, iCode *ic, bool pop);
void pic14_outBitC(operand *result);
void pic14_toBoolean(operand *oper);
void freeAsmop (operand *op, asmop *aaop, iCode *ic, bool pop);
+void mov2w (asmop *aop, int offset);
+const char *pCodeOpType( pCodeOp *pcop);