{
iCode *ic = sym->rematiCode;
asmop *aop = newAsmop (AOP_IMMD);
- int ptr_type ;
+ int ptr_type=0 ;
int val = 0;
for (;;)
unsigned int icount;
unsigned int size = getDataSize (IC_RESULT (ic));
- D(emitcode (";", "genPlusIncr"));
-
/* will try to generate an increment */
/* if the right side is not a literal
we cannot */
if ((icount = (unsigned int) floatFromVal (AOP (IC_RIGHT (ic))->aopu.aop_lit)) > 4)
return FALSE;
+ D(emitcode (";", "genPlusIncr"));
+
/* if increment 16 bits in register */
if (sameRegs (AOP (IC_LEFT (ic)), AOP (IC_RESULT (ic))) &&
(size > 1) &&
static void
genPlusBits (iCode * ic)
{
+ D(emitcode (";", "genPlusBits"));
+
if (AOP_TYPE (IC_RESULT (ic)) == AOP_CRY)
{
symbol *lbl = newiTempLabel (NULL);
unsigned int icount;
unsigned int size = getDataSize (IC_RESULT (ic));
- D(emitcode (";", "genMinusDec"));
-
/* will try to generate an increment */
/* if the right side is not a literal
we cannot */
if ((icount = (unsigned int) floatFromVal (AOP (IC_RIGHT (ic))->aopu.aop_lit)) > 4)
return FALSE;
+ D(emitcode (";", "genMinusDec"));
+
/* if decrement 16 bits in register */
if (sameRegs (AOP (IC_LEFT (ic)), AOP (IC_RESULT (ic))) &&
(size > 1) &&
genMinusBits (iCode * ic)
{
symbol *lbl = newiTempLabel (NULL);
+
+ D(emitcode (";", "genMinusBits"));
+
if (AOP_TYPE (IC_RESULT (ic)) == AOP_CRY)
{
emitcode ("mov", "c,%s", AOP (IC_LEFT (ic))->aopu.aop_dir);
int size, offset = 0;
unsigned long lit = 0L;
+ D(emitcode (";", "genMinus"));
+
aopOp (IC_LEFT (ic), ic, FALSE);
aopOp (IC_RIGHT (ic), ic, FALSE);
aopOp (IC_RESULT (ic), ic, TRUE);
operand * right,
operand * result)
{
+ D(emitcode (";", "genMultbits"));
+
emitcode ("mov", "c,%s", AOP (left)->aopu.aop_dir);
emitcode ("anl", "c,%s", AOP (right)->aopu.aop_dir);
outBitC (result);
symbol *lbl;
int size=AOP_SIZE(result);
+ D(emitcode (";", "genMultOneByte"));
+
if (size<1 || size>2) {
// this should never happen
fprintf (stderr, "size!=1||2 (%d) in %s at line:%d \n",
operand *right = IC_RIGHT (ic);
operand *result = IC_RESULT (ic);
+ D(emitcode (";", "genMult"));
+
/* assign the amsops */
aopOp (left, ic, FALSE);
aopOp (right, ic, FALSE);
char *l;
+ D(emitcode (";", "genDivbits"));
+
/* the result must be bit */
emitcode ("mov", "b,%s", aopGet (AOP (right), 0, FALSE, FALSE));
l = aopGet (AOP (left), 0, FALSE, FALSE);
symbol *lbl;
int size, offset;
+ D(emitcode (";", "genDivOneByte"));
+
size = AOP_SIZE (result) - 1;
offset = 1;
/* signed or unsigned */
operand *right = IC_RIGHT (ic);
operand *result = IC_RESULT (ic);
+ D(emitcode (";", "genDiv"));
+
/* assign the amsops */
aopOp (left, ic, FALSE);
aopOp (right, ic, FALSE);
char *l;
+ D(emitcode (";", "genModbits"));
+
/* the result must be bit */
emitcode ("mov", "b,%s", aopGet (AOP (right), 0, FALSE, FALSE));
l = aopGet (AOP (left), 0, FALSE, FALSE);
char *l;
symbol *lbl;
+ D(emitcode (";", "genModOneByte"));
+
/* signed or unsigned */
if (SPEC_USIGN (opetype))
{
operand *right = IC_RIGHT (ic);
operand *result = IC_RESULT (ic);
+ D(emitcode (";", "genMod"));
+
/* assign the amsops */
aopOp (left, ic, FALSE);
aopOp (right, ic, FALSE);
symbol *tlbl = newiTempLabel (NULL);
char *inst;
+ D(emitcode (";", "genIfxJump"));
+
/* if true label then we jump if condition
supplied is true */
if (IC_TRUE (ic))
int size, offset = 0;
unsigned long lit = 0L;
+ D(emitcode (";", "genCmp"));
+
/* if left & right are bit variables */
if (AOP_TYPE (left) == AOP_CRY &&
AOP_TYPE (right) == AOP_CRY)
sym_link *letype, *retype;
int sign;
+ D(emitcode (";", "genCmpGt"));
+
left = IC_LEFT (ic);
right = IC_RIGHT (ic);
result = IC_RESULT (ic);
sym_link *letype, *retype;
int sign;
+ D(emitcode (";", "genCmpLt"));
+
left = IC_LEFT (ic);
right = IC_RIGHT (ic);
result = IC_RESULT (ic);
{
operand *left, *right, *result;
+ D(emitcode (";", "genCmpEq"));
+
aopOp ((left = IC_LEFT (ic)), ic, FALSE);
aopOp ((right = IC_RIGHT (ic)), ic, FALSE);
aopOp ((result = IC_RESULT (ic)), ic, TRUE);
operand *left, *right, *result;
symbol *tlbl;
+ D(emitcode (";", "genAndOp"));
+
/* note here that && operations that are in an
if statement are taken away by backPatchLabels
only those used in arthmetic operations remain */
operand *left, *right, *result;
symbol *tlbl;
+ D(emitcode (";", "genOrOp"));
+
/* note here that || operations that are in an
if statement are taken away by backPatchLabels
only those used in arthmetic operations remain */
int bytelit = 0;
char buffer[10];
+ D(emitcode (";", "genAnd"));
+
aopOp ((left = IC_LEFT (ic)), ic, FALSE);
aopOp ((right = IC_RIGHT (ic)), ic, FALSE);
aopOp ((result = IC_RESULT (ic)), ic, TRUE);
int size, offset = 0;
unsigned long lit = 0L;
+ D(emitcode (";", "genOr"));
+
aopOp ((left = IC_LEFT (ic)), ic, FALSE);
aopOp ((right = IC_RIGHT (ic)), ic, FALSE);
aopOp ((result = IC_RESULT (ic)), ic, TRUE);