PO_GPR_REGISTER, // A general purpose register
PO_GPR_BIT, // A bit of a general purpose register
PO_GPR_TEMP, // A general purpose temporary register
+ PO_GPR_POINTER, // A general purpose pointer
PO_SFR_REGISTER, // A special function register (e.g. PORTA)
PO_PCL, // Program counter Low register
PO_PCLATH, // Program counter Latch high register
typedef struct pCodeOpImmd
{
pCodeOp pcop;
- int offset; /* low,med, or high byte of immediat value */
+ int offset; /* low,med, or high byte of immediate value */
int index; /* add this to the immediate value */
unsigned _const:1; /* is in code space */
+ unsigned _function:1; /* is a (pointer to a) function */
int rIdx; /* If this immd points to a register */
struct regs *r; /* then this is the reg. */
} pCodeOpRegBit;
+typedef struct pCodeOpRegPtr
+{
+ pCodeOpReg pcor; // The Register containing this bit
+
+ // PIC_OPTYPE subtype; // The type of this register.
+ // unsigned int inBitSpace: 1; /* True if in bit space, else
+
+} pCodeOpRegPtr;
+
typedef struct pCodeOpWild
{
pCodeOp pcop;
unsigned int isBitInst: 1; /* e.g. BCF */
unsigned int isBranch: 1; /* True if this is a branching instruction */
unsigned int isSkip: 1; /* True if this is a skip instruction */
+ unsigned int isLit: 1; /* True if this instruction has an literal operand */
PIC_OPCODE inverted_op; /* Opcode of instruction that's the opposite of this one */
unsigned int inCond; // Input conditions for this instruction
#define isPCI(x) ((PCODE(x)->type == PC_OPCODE))
#define isPCI_BRANCH(x) ((PCODE(x)->type == PC_OPCODE) && PCI(x)->isBranch)
#define isPCI_SKIP(x) ((PCODE(x)->type == PC_OPCODE) && PCI(x)->isSkip)
+#define isPCI_LIT(x) ((PCODE(x)->type == PC_OPCODE) && PCI(x)->isLit)
#define isPCI_BITSKIP(x)((PCODE(x)->type == PC_OPCODE) && PCI(x)->isSkip && PCI(x)->isBitInst)
#define isPCFL(x) ((PCODE(x)->type == PC_FLOW))
#define isPCF(x) ((PCODE(x)->type == PC_FUNCTION))
void pBlockConvert2ISR(pBlock *pb);
pCodeOp *newpCodeOpLabel(char *name, int key);
-pCodeOp *newpCodeOpImmd(char *name, int offset, int index, int code_space);
+pCodeOp *newpCodeOpImmd(char *name, int offset, int index, int code_space,int is_func);
pCodeOp *newpCodeOpLit(int lit);
pCodeOp *newpCodeOpBit(char *name, int bit,int inBitSpace);
pCodeOp *newpCodeOpRegFromStr(char *name);