mirror of
https://github.com/cc65/cc65.git
synced 2025-01-27 09:33:42 +00:00
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
This commit is contained in:
parent
fe1c4cd46b
commit
fa69f31982
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user