projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* src/pic16/devices.inc,
[fw/sdcc]
/
src
/
pic16
/
gen.h
diff --git
a/src/pic16/gen.h
b/src/pic16/gen.h
index 4dbf236590ba48a89efe201b9897d1abb94177d9..9411174bc0182833281ded7314549ece0d480728 100644
(file)
--- a/
src/pic16/gen.h
+++ b/
src/pic16/gen.h
@@
-34,18
+34,10
@@
enum
AOP_LIT = 1,
AOP_REG,
AOP_DIR,
AOP_LIT = 1,
AOP_REG,
AOP_DIR,
- AOP_DPTR,
- AOP_DPTR2,
- AOP_R0,
- AOP_R1,
AOP_STK,
AOP_STK,
- AOP_IMMD,
AOP_STR,
AOP_CRY,
AOP_ACC,
AOP_STR,
AOP_CRY,
AOP_ACC,
- AOP_FSR0,
- AOP_FSR1,
- AOP_FSR2,
AOP_PCODE,
AOP_STA // asmop on stack
};
AOP_PCODE,
AOP_STA // asmop on stack
};
@@
-60,12
+52,8
@@
typedef struct asmop
AOP_LIT - operand is a literal value
AOP_REG - is in registers
AOP_DIR - direct just a name
AOP_LIT - operand is a literal value
AOP_REG - is in registers
AOP_DIR - direct just a name
- AOP_DPTR - dptr contains address of operand
- AOP_DPTR2 - dptr2 contains address of operand (DS80C390 only).
- AOP_R0/R1 - r0/r1 contains address of operand
AOP_STK - should be pushed on stack this
can happen only for the result
AOP_STK - should be pushed on stack this
can happen only for the result
- AOP_IMMD - immediate value for eg. remateriazable
AOP_CRY - carry contains the value of this
AOP_STR - array of strings
AOP_ACC - result is in the acc:b pair
AOP_CRY - carry contains the value of this
AOP_STR - array of strings
AOP_ACC - result is in the acc:b pair
@@
-81,7
+69,6
@@
typedef struct asmop
regs *aop_reg[4]; /* array of registers */
char *aop_dir; /* if direct */
regs *aop_ptr; /* either -> to r0 or r1 */
regs *aop_reg[4]; /* array of registers */
char *aop_dir; /* if direct */
regs *aop_ptr; /* either -> to r0 or r1 */
- 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 */
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 */
@@
-103,17
+90,10
@@
extern unsigned pic16_fReturnSizePic;
#define AOP(op) op->aop
#define AOP_TYPE(op) AOP(op)->type
#define AOP_SIZE(op) AOP(op)->size
#define AOP(op) op->aop
#define AOP_TYPE(op) AOP(op)->type
#define AOP_SIZE(op) AOP(op)->size
-#define IS_AOP_PREG(x) (AOP(x) && (AOP_TYPE(x) == AOP_R1 || \
- AOP_TYPE(x) == AOP_R0))
#define AOP_NEEDSACC(x) (AOP(x) && (AOP_TYPE(x) == AOP_CRY || \
#define AOP_NEEDSACC(x) (AOP(x) && (AOP_TYPE(x) == AOP_CRY || \
- AOP_TYPE(x) == AOP_DPTR || AOP_TYPE(x) == AOP_DPTR2 || \
AOP(x)->paged))
AOP(x)->paged))
-#define AOP_INPREG(x) (x && (x->type == AOP_REG && \
- (x->aopu.aop_reg[0] == pic16_regWithIdx(R0_IDX) || \
- x->aopu.aop_reg[0] == pic16_regWithIdx(R1_IDX) )))
-
#define RESULTONSTACK(x) \
(IC_RESULT(x) && IC_RESULT(x)->aop && \
IC_RESULT(x)->aop->type == AOP_STK )
#define RESULTONSTACK(x) \
(IC_RESULT(x) && IC_RESULT(x)->aop && \
IC_RESULT(x)->aop->type == AOP_STK )
@@
-206,6
+186,9
@@
int pic16_my_powof2 (unsigned long num);
void pic16_mov2w (asmop *aop, int offset);
void pic16_mov2f(asmop *dst, asmop *src, int offset);
void pic16_mov2w (asmop *aop, int offset);
void pic16_mov2f(asmop *dst, asmop *src, int offset);
+bool pic16_isLitOp(operand *op);
+bool pic16_isLitAop(asmop *aop);
+
void dumpiCode(iCode *lic);
int inWparamList(char *s);
void dumpiCode(iCode *lic);
int inWparamList(char *s);