From: kvigor Date: Thu, 28 Sep 2000 00:15:02 +0000 (+0000) Subject: yet more work in progress: FarFarAssign optimizations X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=f5e9ec84a9ebe386f974042bf693db723ee1b839;p=fw%2Fsdcc yet more work in progress: FarFarAssign optimizations git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@412 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/ds390/gen.c b/src/ds390/gen.c index 7ece8206..e899101b 100644 --- a/src/ds390/gen.c +++ b/src/ds390/gen.c @@ -7723,8 +7723,33 @@ static void genFarFarAssign (operand *result, operand *right, iCode *ic) { int size = AOP_SIZE(right); int offset = 0; - char *l ; + char *l; + +#ifdef LAZY_DPS_OPT + if (size > 1) + { + /* This is a net loss for size == 1, but a big gain + * otherwise. + */ + D(emitcode(";", "genFarFarAssign (improved)");); + aopOp(result,ic,TRUE, TRUE); + + _startLazyDPSEvaluation(); + while (size--) + { + aopPut(AOP(result), + aopGet(AOP(right),offset,FALSE,FALSE,FALSE), + offset); + offset++; + } + _endLazyDPSEvaluation(); + freeAsmop(result,NULL,ic,FALSE); + freeAsmop(right,NULL,ic,FALSE); + } + else +#endif + { D(emitcode(";", "genFarFarAssign ");); /* first push the right side on to the stack */ @@ -7745,7 +7770,7 @@ static void genFarFarAssign (operand *result, operand *right, iCode *ic) } freeAsmop(result,NULL,ic,FALSE); _endLazyDPSEvaluation(); - + } } /*-----------------------------------------------------------------*/