From: uz Date: Wed, 6 Jun 2012 21:52:09 +0000 (+0000) Subject: Don't emit special code because it doesn't work well with the optimizer. X-Git-Tag: V2.14~379 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fa69f3198276011816bc34af62b4258d0a236a3a;p=cc65 Don't emit special code because it doesn't work well with the optimizer. git-svn-id: svn://svn.cc65.org/cc65/trunk@5689 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/codegen.c b/src/cc65/codegen.c index de3b55848..fc32b6c14 100644 --- a/src/cc65/codegen.c +++ b/src/cc65/codegen.c @@ -1833,26 +1833,6 @@ void g_addeqind (unsigned flags, unsigned offs, unsigned long val) break; case CF_INT: - if (IS_Get (&CodeSizeFactor) >= 200) { - /* Lots of code, use only if size is not important */ - AddCodeLine ("sta ptr1"); - AddCodeLine ("stx ptr1+1"); - AddCodeLine ("ldy #$%02X", offs); - AddCodeLine ("lda #$%02X", (int)(val & 0xFF)); - AddCodeLine ("clc"); - AddCodeLine ("adc (ptr1),y"); - AddCodeLine ("sta (ptr1),y"); - AddCodeLine ("pha"); - AddCodeLine ("iny"); - AddCodeLine ("lda #$%02X", (unsigned char)(val >> 8)); - AddCodeLine ("adc (ptr1),y"); - AddCodeLine ("sta (ptr1),y"); - AddCodeLine ("tax"); - AddCodeLine ("pla"); - break; - } - /* FALL THROUGH */ - case CF_LONG: AddCodeLine ("jsr pushax"); /* Push the address */ push (CF_PTR); /* Correct the internal sp */ @@ -2049,26 +2029,6 @@ void g_subeqind (unsigned flags, unsigned offs, unsigned long val) break; case CF_INT: - if (IS_Get (&CodeSizeFactor) >= 200) { - /* Lots of code, use only if size is not important */ - AddCodeLine ("sta ptr1"); - AddCodeLine ("stx ptr1+1"); - AddCodeLine ("ldy #$%02X", offs); - AddCodeLine ("lda (ptr1),y"); - AddCodeLine ("sec"); - AddCodeLine ("sbc #$%02X", (unsigned char)val); - AddCodeLine ("sta (ptr1),y"); - AddCodeLine ("pha"); - AddCodeLine ("iny"); - AddCodeLine ("lda (ptr1),y"); - AddCodeLine ("sbc #$%02X", (unsigned char)(val >> 8)); - AddCodeLine ("sta (ptr1),y"); - AddCodeLine ("tax"); - AddCodeLine ("pla"); - break; - } - /* FALL THROUGH */ - case CF_LONG: AddCodeLine ("jsr pushax"); /* Push the address */ push (CF_PTR); /* Correct the internal sp */