From: johanknol Date: Mon, 15 Oct 2001 10:22:27 +0000 (+0000) Subject: fixed a regression bug, although it doesn't fix the regression X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=281fcca9d91cfb6c9ad116c93011101aa0b69eee;p=fw%2Fsdcc fixed a regression bug, although it doesn't fix the regression git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1403 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/ds390/gen.c b/src/ds390/gen.c index a8c10129..7b421978 100644 --- a/src/ds390/gen.c +++ b/src/ds390/gen.c @@ -9263,6 +9263,7 @@ genArrayInit (iCode * ic) int elementSize = 0, eIndex; unsigned val, lastVal; sym_link *type; + operand *left=IC_LEFT(ic); D (emitcode (";", "genArrayInit ");); @@ -9276,9 +9277,17 @@ genArrayInit (iCode * ic) } else if (AOP_TYPE(IC_LEFT(ic)) != AOP_DPTR) { - werror (E_INTERNAL_ERROR, __FILE__, __LINE__, - "Unexpected operand to genArrayInit.\n"); - exit(1); +#if 0 + werror (E_INTERNAL_ERROR, __FILE__, __LINE__, + "Unexpected operand to genArrayInit.\n"); + exit(1); +#else + // a regression because of SDCCcse.c:1.52 + 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)); +#endif } type = operandType(IC_LEFT(ic));