return aop;
}
+/* #define DPS_OPT */ /* turn this on after some more testing. */
+
+static int _currentDPS;
+static int _desiredDPS;
+static int _lazyDPS = 0;
+
static void genSetDPTR(int n)
{
+#ifdef DPS_OPT
+ if (_lazyDPS)
+ {
+ _desiredDPS = n;
+ /* emitcode(";", "_desiredDPS = %d", n); */
+ return;
+ }
+#endif
+
if (!n)
{
emitcode("mov", "dps, #0x00");
}
}
+static void _startAopGetLoop(void)
+{
+ _currentDPS = 0;
+ _desiredDPS = 0;
+ _lazyDPS = 1;
+}
+
+static void _endAopGetLoop(void)
+{
+ _lazyDPS = 0;
+ if (_currentDPS)
+ {
+ genSetDPTR(0);
+ }
+ _currentDPS = 0;
+ _desiredDPS = 0;
+}
+
+static void _aopFlushDPS(void)
+{
+ if (!_lazyDPS)
+ {
+ return;
+ }
+ if (_desiredDPS != _currentDPS)
+ {
+ if (_desiredDPS)
+ {
+ emitcode("inc", "dps");
+ }
+ else
+ {
+ emitcode("dec", "dps");
+ }
+ _currentDPS = _desiredDPS;
+ /* emitcode(";", "_currentDPS = _desiredDPS = %d", _currentDPS); */
+ }
+}
+
/*-----------------------------------------------------------------*/
/* pointerCode - returns the code for a pointer type */
/*-----------------------------------------------------------------*/
if (useDP2)
{
- genSetDPTR(1);
+ /* genSetDPTR(1); */
emitcode ("mov","dpx1,#0x40");
emitcode ("mov","dph1,#0x00");
emitcode ("mov","dpl1, a");
- genSetDPTR(0);
+ /* genSetDPTR(0); */
}
else
{
if (useDP2)
{
genSetDPTR(1);
- emitcode ("mov","dptr,#%s", sym->rname);
+ _aopFlushDPS();
+ emitcode ("mov","dptr,#%s", sym->rname);
genSetDPTR(0);
}
else
case AOP_DPTR:
case AOP_DPTR2:
- if (aop->type == AOP_DPTR2)
- {
- genSetDPTR(1);
+ if (aop->type == AOP_DPTR2)
+ {
+ genSetDPTR(1);
#ifndef KEVIN_BROKE_IT
- if (!canClobberACC)
+ if (!canClobberACC)
#endif
- {
- emitcode("xch", "a, ap");
- }
- }
+ {
+ emitcode("xch", "a, ap");
+ }
+ }
+
+ _aopFlushDPS();
while (offset > aop->coff) {
emitcode ("inc","dptr");
emitcode("clr","a");
emitcode("movc","a,@a+dptr");
}
- else {
+ else {
emitcode("movx","a,@dptr");
- }
+ }
- if (aop->type == AOP_DPTR2)
- {
- genSetDPTR(0);
+ if (aop->type == AOP_DPTR2)
+ {
+ genSetDPTR(0);
#ifndef KEVIN_BROKE_IT
- if (!canClobberACC)
+ if (!canClobberACC)
#endif
- {
- emitcode("xch", "a, ap");
- return "ap";
- }
- }
+ {
+ emitcode("xch", "a, ap");
+ return "ap";
+ }
+ }
- return (dname ? "acc" : "a");
-
+ return (dname ? "acc" : "a");
case AOP_IMMD:
if (bit16)
case AOP_DPTR:
case AOP_DPTR2:
- if (aop->type == AOP_DPTR2)
- {
- genSetDPTR(1);
- }
+ if (aop->type == AOP_DPTR2)
+ {
+ genSetDPTR(1);
+ }
+ _aopFlushDPS();
if (aop->code) {
werror(E_INTERNAL_ERROR,__FILE__,__LINE__,
emitcode ("movx","@dptr,a");
- if (aop->type == AOP_DPTR2)
- {
- genSetDPTR(0);
- }
+ if (aop->type == AOP_DPTR2)
+ {
+ genSetDPTR(0);
+ }
break;
case AOP_R0:
if (aop->type == AOP_DPTR2)
{
genSetDPTR(1);
+ _aopFlushDPS();
}
while (size--)
{
size = AOP_SIZE(op) - 1;
offset = 1;
+ _startAopGetLoop();
l = aopGet(op->aop,offset++,FALSE,FALSE,TRUE);
MOVA(l);
aopGet(op->aop,
offset++,FALSE,FALSE,FALSE));
}
+ _endAopGetLoop();
tlbl = newiTempLabel(NULL);
tlbl = newiTempLabel(NULL);
size--;
}
+ _startAopGetLoop();
if (AOP_NEEDSACC(oper))
{
emitcode("push", "b");
}
else
{
- emitcode("orl","a,%s",aopGet(AOP(oper),offset++,FALSE,FALSE,FALSE));
-}
+ emitcode("orl","a,%s",aopGet(AOP(oper),offset++,FALSE,FALSE,FALSE));
+ }
}
+ _endAopGetLoop();
if (AOP_NEEDSACC(oper))
{
}
size = AOP_SIZE(IC_RESULT(ic));
+ _startAopGetLoop();
while (size--) {
char *l = aopGet(AOP(IC_LEFT(ic)),offset,FALSE,FALSE,TRUE);
MOVA(l);
emitcode("cpl","a");
aopPut(AOP(IC_RESULT(ic)),"a",offset++);
}
+ _endAopGetLoop();
release:
first it then copy the rest in place */
D(emitcode(";", "genUminusFloat"););
+ _startAopGetLoop();
size = AOP_SIZE(op) - 1;
l = aopGet(AOP(op),3,FALSE,FALSE,TRUE);
MOVA(l);
aopGet(AOP(op),offset,FALSE,FALSE,FALSE),
offset);
offset++;
- }
+ }
+ _endAopGetLoop();
}
/*-----------------------------------------------------------------*/
size = AOP_SIZE(IC_LEFT(ic));
offset = 0 ;
//CLRC ;
+ _startAopGetLoop();
while(size--) {
char *l = aopGet(AOP(IC_LEFT(ic)),offset,FALSE,FALSE,TRUE);
if (!strcmp(l,"a")) {
}
aopPut(AOP(IC_RESULT(ic)),"a",offset++);
}
+ _endAopGetLoop();
/* if any remaining bytes in the result */
/* we just need to propagate the sign */
static void pushSide(operand * oper, int size)
{
int offset = 0;
+ _startAopGetLoop();
while (size--) {
char *l = aopGet(AOP(oper),offset++,FALSE,TRUE,FALSE);
if (AOP_TYPE(oper) != AOP_REG &&
} else
emitcode("push","%s",l);
}
+ _endAopGetLoop();
}
/*-----------------------------------------------------------------*/
emitcode("mov","%s,_spx",r->name);
size = AOP_SIZE(IC_LEFT(ic));
+ _startAopGetLoop();
while(size--) {
char *l = aopGet(AOP(IC_LEFT(ic)),
emitcode("inc","%s",r->name);
}
+ _endAopGetLoop();
emitcode("mov","_spx,%s",r->name);
aopOp(IC_LEFT(ic),ic,FALSE, FALSE);
size = AOP_SIZE(IC_LEFT(ic));
/* push it on the stack */
+ _startAopGetLoop();
while(size--) {
l = aopGet(AOP(IC_LEFT(ic)),offset++,FALSE,TRUE,TRUE);
if (*l == '#') {
}
emitcode("push","%s",l);
}
+ _endAopGetLoop();
return ;
}
// pushSide(IC_LEFT(ic), AOP_SIZE(IC_LEFT(ic)));
size = AOP_SIZE(IC_LEFT(ic));
+ _startAopGetLoop();
while (size--) {
l = aopGet(AOP(IC_LEFT(ic)),offset++,FALSE,TRUE,FALSE);
if (AOP_TYPE(IC_LEFT(ic)) != AOP_REG &&
emitcode("push","acc");
} else
emitcode("push","%s",l);
- }
+ }
+ _endAopGetLoop();
freeAsmop(IC_LEFT(ic),NULL,ic,TRUE);
}
aopOp(IC_LEFT(ic),ic,FALSE, FALSE);
size = AOP_SIZE(IC_LEFT(ic));
offset = (size-1);
- while (size--)
+ _startAopGetLoop();
+ while (size--)
+ {
emitcode("pop","%s",aopGet(AOP(IC_LEFT(ic)),offset--,
FALSE,TRUE,TRUE));
+ }
+ _endAopGetLoop();
freeAsmop(IC_LEFT(ic),NULL,ic,TRUE);
}
iCode *sic ;
for (sic = setFirstItem(_G.sendSet) ; sic ;
- sic = setNextItem(_G.sendSet)) {
+ sic = setNextItem(_G.sendSet))
+ {
int size, offset = 0;
- aopOp(IC_LEFT(sic),sic,FALSE, TRUE);
+
+ aopOp(IC_LEFT(sic),sic,FALSE, TRUE);
size = AOP_SIZE(IC_LEFT(sic));
+
+ _startAopGetLoop();
while (size--) {
char *l = aopGet(AOP(IC_LEFT(sic)),offset,
- FALSE, FALSE, FALSE);
+ FALSE, FALSE, TRUE);
if (strcmp(l,fReturn[offset]))
emitcode("mov","%s,%s",
fReturn[offset],
l);
offset++;
}
+ _endAopGetLoop();
freeAsmop (IC_LEFT(sic),NULL,sic,TRUE);
}
_G.sendSet = NULL;
iCode *sic ;
for (sic = setFirstItem(_G.sendSet) ; sic ;
- sic = setNextItem(_G.sendSet)) {
- int size, offset = 0;
- aopOp(IC_LEFT(sic),sic,FALSE, FALSE);
- size = AOP_SIZE(IC_LEFT(sic));
- while (size--) {
- char *l = aopGet(AOP(IC_LEFT(sic)),offset,
- FALSE,FALSE,FALSE);
- if (strcmp(l,fReturn[offset]))
- emitcode("mov","%s,%s",
- fReturn[offset],
- l);
- offset++;
+ sic = setNextItem(_G.sendSet))
+ {
+ int size, offset = 0;
+
+ aopOp(IC_LEFT(sic),sic,FALSE, FALSE);
+ size = AOP_SIZE(IC_LEFT(sic));
+ _startAopGetLoop();
+ while (size--)
+ {
+ char *l = aopGet(AOP(IC_LEFT(sic)),offset,
+ FALSE,FALSE,TRUE);
+ if (strcmp(l,fReturn[offset]))
+ {
+ emitcode("mov","%s,%s",
+ fReturn[offset],
+ l);
+ }
+ offset++;
+ }
+ _endAopGetLoop();
+ freeAsmop (IC_LEFT(sic),NULL,sic,TRUE);
}
- freeAsmop (IC_LEFT(sic),NULL,sic,TRUE);
- }
- _G.sendSet = NULL;
+ _G.sendSet = NULL;
}
emitcode("ret","");
aopOp(IC_LEFT(ic),ic,FALSE, TRUE);
size = AOP_SIZE(IC_LEFT(ic));
+ _startAopGetLoop();
while (size--) {
char *l ;
if (AOP_TYPE(IC_LEFT(ic)) == AOP_DPTR) {
if (strcmp(fReturn[offset],l))
emitcode("mov","%s,%s",fReturn[offset++],l);
}
- }
+ }
+ _endAopGetLoop();
if (pushed) {
while(pushed) {
aopPut(AOP(IC_RESULT(ic)),"a",0);
} else {
+ _startAopGetLoop();
while (icount--)
+ {
emitcode ("inc","%s",aopGet(AOP(IC_LEFT(ic)),0,FALSE,FALSE,FALSE));
+ }
+ _endAopGetLoop();
}
return TRUE ;
outBitC(IC_RESULT(ic));
} else {
size = getDataSize(IC_RESULT(ic));
+ _startAopGetLoop();
while (size--) {
MOVA(aopGet(AOP(IC_RIGHT(ic)),offset,FALSE,FALSE,TRUE));
emitcode("addc","a,#00");
aopPut(AOP(IC_RESULT(ic)),"a",offset++);
}
+ _endAopGetLoop();
}
goto release ;
}
}
size = getDataSize(pushResult ? IC_LEFT(ic) : IC_RESULT(ic));
- while(size--){
- if (AOP_TYPE(IC_LEFT(ic)) == AOP_ACC) {
+ _startAopGetLoop();
+ while(size--)
+ {
+ if (AOP_TYPE(IC_LEFT(ic)) == AOP_ACC)
+ {
MOVA(aopGet(AOP(IC_LEFT(ic)),offset,FALSE,FALSE,TRUE));
if(offset == 0)
emitcode("add","a,%s",
}
offset++;
}
-
+ _endAopGetLoop();
+
if (pushResult)
{
aopOp (IC_RESULT(ic),ic,TRUE, FALSE);
AOP_TYPE(IC_RESULT(ic)) == AOP_REG &&
sameRegs(AOP(IC_LEFT(ic)), AOP(IC_RESULT(ic)))) {
+ _startAopGetLoop();
while (icount--)
+ {
emitcode ("dec","%s",aopGet(AOP(IC_RESULT(ic)),0,FALSE,FALSE,FALSE));
+ }
+ _endAopGetLoop();
return TRUE ;
}
/* if literal, add a,#-lit, else normal subb */
+ _startAopGetLoop();
while (size--) {
MOVA(aopGet(AOP(IC_LEFT(ic)),offset,FALSE,FALSE,TRUE));
if (AOP_TYPE(IC_RIGHT(ic)) != AOP_LIT)
}
offset++;
}
+ _endAopGetLoop();
if (pushResult)
{
else if (AOP_TYPE(right) == AOP_REG ||
AOP_TYPE(right) == AOP_DIR ||
(AOP_TYPE(left) == AOP_DIR && AOP_TYPE(right) == AOP_LIT) ||
- (IS_AOP_PREG(left) && !IS_AOP_PREG(right))) {
- while (size--) {
+ (IS_AOP_PREG(left) && !IS_AOP_PREG(right)))
+ {
+ while (size--)
+ {
MOVA(aopGet(AOP(left),offset,FALSE,FALSE,TRUE));
if((AOP_TYPE(left) == AOP_DIR && AOP_TYPE(right) == AOP_LIT) &&
((unsigned int)((lit >> (offset*8)) & 0x0FFL) == 0))
size = AOP_SIZE(result);
offset = size - 1 ;
CLRC;
+
+ _startAopGetLoop();
while (size--) {
l = aopGet(AOP(left),offset,FALSE,FALSE,TRUE);
MOVA(l);
if (AOP_SIZE(result) > 1)
aopPut(AOP(result),"a",offset--);
}
+ _endAopGetLoop();
+
/* now we need to put the carry into the
highest order byte of the result */
if (AOP_SIZE(result) > 1) {
MOVA(l);
emitcode("add","a,acc");
if (AOP_SIZE(result) > 1)
+ {
aopPut(AOP(result),"a",offset++);
+ }
+
+ _startAopGetLoop();
while (size--) {
l = aopGet(AOP(left),offset,FALSE,FALSE,TRUE);
MOVA(l);
if (AOP_SIZE(result) > 1)
aopPut(AOP(result),"a",offset++);
}
+ _endAopGetLoop();
}
/* now we need to put the carry into the
highest order byte of the result */
size = AOP_SIZE(result);
offset=0;
+ _startAopGetLoop();
while (size--) {
l = aopGet(AOP(left),offset,FALSE,TRUE,FALSE);
if (*l == '@' && (IS_AOP_PREG(result))) {
aopPut(AOP(result),l,offset);
offset++;
}
+ _endAopGetLoop();
}
tlbl = newiTempLabel(NULL);
MOVA(l);
emitcode("add","a,acc");
aopPut(AOP(result),"a",offset++);
+ _startAopGetLoop();
while (--size) {
l = aopGet(AOP(result),offset,FALSE,FALSE,TRUE);
MOVA(l);
emitcode("rlc","a");
aopPut(AOP(result),"a",offset++);
}
+ _endAopGetLoop();
reAdjustPreg(AOP(result));
emitcode("","%05d$:",tlbl1->key+100);
size = AOP_SIZE(result);
offset=0;
+ _startAopGetLoop();
while (size--) {
l = aopGet(AOP(left),offset,FALSE,TRUE,FALSE);
if (*l == '@' && IS_AOP_PREG(result)) {
aopPut(AOP(result),l,offset);
offset++;
}
+ _endAopGetLoop();
}
/* mov the highest order bit to OVR */
emitcode("sjmp","%05d$",tlbl1->key+100);
emitcode("","%05d$:",tlbl->key+100);
emitcode("mov","c,ov");
+ _startAopGetLoop();
while (size--) {
l = aopGet(AOP(result),offset,FALSE,FALSE,TRUE);
MOVA(l);
emitcode("rrc","a");
aopPut(AOP(result),"a",offset--);
}
+ _endAopGetLoop();
reAdjustPreg(AOP(result));
emitcode("","%05d$:",tlbl1->key+100);
emitcode("djnz","b,%05d$",tlbl->key+100);
size = AOP_SIZE(result);
offset=0;
+ _startAopGetLoop();
while (size--) {
l = aopGet(AOP(left),offset,FALSE,TRUE,FALSE);
if (*l == '@' && IS_AOP_PREG(result)) {
aopPut(AOP(result),l,offset);
offset++;
}
+ _endAopGetLoop();
}
tlbl = newiTempLabel(NULL);
emitcode("sjmp","%05d$",tlbl1->key+100);
emitcode("","%05d$:",tlbl->key+100);
CLRC;
+ _startAopGetLoop();
while (size--) {
l = aopGet(AOP(result),offset,FALSE,FALSE,TRUE);
MOVA(l);
emitcode("rrc","a");
aopPut(AOP(result),"a",offset--);
}
+ _endAopGetLoop();
reAdjustPreg(AOP(result));
emitcode("","%05d$:",tlbl1->key+100);
/* get the string representation of the name */
l = aopGet(AOP(left),0,FALSE,TRUE,FALSE);
size = AOP_SIZE(result);
+ _startAopGetLoop();
while (size--) {
if (offset)
sprintf(buffer,"(%s + %d)",l+1,offset);
sprintf(buffer,"%s",l+1);
aopPut(AOP(result),buffer,offset++);
}
+ _endAopGetLoop();
freeAsmop(left,NULL,ic,TRUE);
freeAsmop(result,NULL,ic,TRUE);
else
{
/* we need to get it byte by byte */
+ _startAopGetLoop();
if (AOP_TYPE(left) != AOP_DPTR)
{
emitcode("mov","dpl,%s",aopGet(AOP(left),0,FALSE,FALSE,TRUE));
emitcode("mov","dph,%s",aopGet(AOP(left),1,FALSE,FALSE,TRUE));
- if (options.model == MODEL_FLAT24)
- {
- emitcode("mov", "dpx,%s",aopGet(AOP(left),2,FALSE,FALSE,TRUE));
- }
+ emitcode("mov","dpx,%s",aopGet(AOP(left),2,FALSE,FALSE,TRUE));
}
else
{
emitcode("pop", "dph");
emitcode("pop", "dpl");
}
+ _endAopGetLoop();
}
}
/* so dptr know contains the address */
if (AOP_TYPE(left) == AOP_IMMD)
emitcode("mov","dptr,%s",aopGet(AOP(left),0,TRUE,FALSE,FALSE));
else { /* we need to get it byte by byte */
+ _startAopGetLoop();
emitcode("mov","dpl,%s",aopGet(AOP(left),0,FALSE,FALSE,TRUE));
emitcode("mov","dph,%s",aopGet(AOP(left),1,FALSE,FALSE,TRUE));
- if (options.model == MODEL_FLAT24)
- {
- emitcode("mov", "dpx,%s",aopGet(AOP(left),2,FALSE,FALSE,TRUE));
- }
+ emitcode("mov","dpx,%s",aopGet(AOP(left),2,FALSE,FALSE,TRUE));
+ _endAopGetLoop();
}
}
/* so dptr know contains the address */
emitcode("mov","b,#%d",pointerCode(retype));
}
else { /* we need to get it byte by byte */
+ _startAopGetLoop();
emitcode("mov","dpl,%s",aopGet(AOP(left),0,FALSE,FALSE,TRUE));
emitcode("mov","dph,%s",aopGet(AOP(left),1,FALSE,FALSE,TRUE));
if (options.model == MODEL_FLAT24)
{
emitcode("mov","b,%s",aopGet(AOP(left),2,FALSE,FALSE,TRUE));
}
+ _endAopGetLoop();
}
}
/* so dptr know contains the address */
else
{
/* we need to get it byte by byte */
+ _startAopGetLoop();
if (AOP_TYPE(result) != AOP_DPTR)
{
emitcode("mov","dpl,%s",aopGet(AOP(result),0,FALSE,FALSE,TRUE));
emitcode("mov","dph,%s",aopGet(AOP(result),1,FALSE,FALSE,TRUE));
- if (options.model == MODEL_FLAT24)
- {
- emitcode("mov", "dpx,%s",aopGet(AOP(result),2,FALSE,FALSE,TRUE));
- }
+ emitcode("mov", "dpx,%s",aopGet(AOP(result),2,FALSE,FALSE,TRUE));
}
else
{
emitcode("pop", "dph");
emitcode("pop", "dpl");
}
+ _endAopGetLoop();
}
}
/* so dptr know contains the address */
size = AOP_SIZE(right);
offset = 0 ;
+ _startAopGetLoop();
while (size--) {
char *l = aopGet(AOP(right),offset++,FALSE,FALSE,TRUE);
MOVA(l);
if (size)
emitcode("inc","dptr");
}
+ _endAopGetLoop();
}
freeAsmop(right,NULL,ic,TRUE);
/* if the operand is already in dptr
then we do nothing else we move the value to dptr */
if (AOP_TYPE(result) != AOP_STR) {
+ _startAopGetLoop();
/* if this is remateriazable */
if (AOP_TYPE(result) == AOP_IMMD) {
emitcode("mov","dptr,%s",aopGet(AOP(result),0,TRUE,FALSE,FALSE));
else { /* we need to get it byte by byte */
emitcode("mov","dpl,%s",aopGet(AOP(result),0,FALSE,FALSE,TRUE));
emitcode("mov","dph,%s",aopGet(AOP(result),1,FALSE,FALSE,TRUE));
- if (options.model == MODEL_FLAT24)
- {
- emitcode("mov", "dpx,%s",aopGet(AOP(result),2,FALSE,FALSE,TRUE));
- emitcode("mov","b,%s",aopGet(AOP(result),3,FALSE,FALSE,TRUE));
- }
- else
- {
- emitcode("mov","b,%s",aopGet(AOP(result),2,FALSE,FALSE,TRUE));
- }
+ emitcode("mov","dpx,%s",aopGet(AOP(result),2,FALSE,FALSE,TRUE));
+ emitcode("mov","b,%s",aopGet(AOP(result),3,FALSE,FALSE,TRUE));
}
+ _endAopGetLoop();
}
/* so dptr know contains the address */
freeAsmop(result,NULL,ic,TRUE);
int size = AOP_SIZE(right);
int offset = 0;
char *l ;
+
+ D(emitcode(";", "genFarFarAssign "););
+
/* first push the right side on to the stack */
+ _startAopGetLoop();
while (size--) {
l = aopGet(AOP(right),offset++,FALSE,FALSE,TRUE);
MOVA(l);
emitcode ("push","acc");
}
-
- D(emitcode(";", "genFarFarAssign "););
freeAsmop(right,NULL,ic,FALSE);
/* now assign DPTR to result */
aopPut(AOP(result),"a",--offset);
}
freeAsmop(result,NULL,ic,FALSE);
+ _endAopGetLoop();
}
!IS_FLOAT(operandType(right)) &&
(lit < 256L)){
emitcode("clr","a");
- while (size--) {
+
+ _startAopGetLoop();
+ while (size--)
+ {
if((unsigned int)((lit >> (size*8)) & 0x0FFL)== 0)
aopPut(AOP(result),"a",size);
else
aopGet(AOP(right),size,FALSE,FALSE,FALSE),
size);
}
+ _endAopGetLoop();
} else {
- while (size--) {
+ _startAopGetLoop();
+ while (size--)
+ {
aopPut(AOP(result),
aopGet(AOP(right),offset,FALSE,FALSE,FALSE),
offset);
offset++;
}
+ _endAopGetLoop();
}
release:
}
/*-----------------------------------------------------------------*/
-/* genJumpTab - genrates code for jump table */
+/* genJumpTab - generates code for jump table */
/*-----------------------------------------------------------------*/
static void genJumpTab (iCode *ic)
{
/* if they in different places then copy */
size = AOP_SIZE(result);
offset = 0 ;
+ _startAopGetLoop();
while (size--) {
aopPut(AOP(result),
aopGet(AOP(right),offset,FALSE,FALSE,FALSE),
offset);
offset++;
}
+ _endAopGetLoop();
goto release;
}
/* the first two bytes are known */
size = GPTRSIZE - 1;
offset = 0 ;
+ _startAopGetLoop();
while (size--) {
aopPut(AOP(result),
aopGet(AOP(right),offset,FALSE,FALSE,FALSE),
offset);
offset++;
}
+ _endAopGetLoop();
/* the last byte depending on type */
switch (p_type) {
/* just copy the pointers */
size = AOP_SIZE(result);
offset = 0 ;
+ _startAopGetLoop();
while (size--) {
aopPut(AOP(result),
aopGet(AOP(right),offset,FALSE,FALSE,FALSE),
offset);
offset++;
}
+ _endAopGetLoop();
goto release ;
}
/* we move to result for the size of source */
size = AOP_SIZE(right);
offset = 0 ;
+ _startAopGetLoop();
while (size--) {
aopPut(AOP(result),
aopGet(AOP(right),offset,FALSE,FALSE,FALSE),
offset);
offset++;
}
+ _endAopGetLoop();
/* now depending on the sign of the source && destination */
size = AOP_SIZE(result) - AOP_SIZE(right);