diff --git a/Native.pas b/Native.pas index 6dba273..faf3543 100644 --- a/Native.pas +++ b/Native.pas @@ -1720,11 +1720,12 @@ var Remove(ns+3); end; {if} - m_dec_abs: + {disabled - can generate bad code} + {m_dec_abs: if npeep[ns+1].opcode = m_lda_abs then if name^ = npeep[ns+1].name^ then if npeep[ns+2].opcode = m_beq then - Remove(ns+1); + Remove(ns+1);} m_lda_abs: if npeep[ns+1].opcode = m_clc then begin @@ -2657,7 +2658,7 @@ yRegister.condition := regUnknown; lastRegOpcode := 0; {BRK} nnextspot := 1; nleadOpcodes := [m_asl_a,m_bcc,m_bcs,m_beq,m_bmi,m_bne,m_bpl,m_brl,{m_bvs,} - m_dec_abs,m_lda_abs,m_lda_dir,m_lda_imm,m_ldx_imm,m_sta_abs,m_sta_dir, + {m_dec_abs,}m_lda_abs,m_lda_dir,m_lda_imm,m_ldx_imm,m_sta_abs,m_sta_dir, m_pha,m_plb,{m_plx,}m_tax,m_tya,m_tyx,m_phy,m_pei_dir,m_ldy_imm,m_rep, m_ora_dir,m_ora_abs,m_and_imm,m_pea,m_tcd]; nstopOpcodes := [d_end,d_pin]; diff --git a/cc.notes b/cc.notes index c5a9d35..b8b7c6c 100644 --- a/cc.notes +++ b/cc.notes @@ -1618,6 +1618,8 @@ If you use #pragma debug 0x0010 to enable stack check debug code, the compiler w 14. If a struct, union, or enum type name appeared within the third expression in a for loop statement (e.g. in a cast or as the argument to sizeof), ORCA/C could behave incorrectly. It could report a spurious error if a semicolon occurred within the type name as part of a structure or union member declaration. Also, any tags or enumeration constants declared by such a type name should be in scope within the loop body, but they were not. +15. Native code peephole optimization might produce invalid code in some obscure circumstances where one element of a global or static array was decremented and then another element of the same array was accessed immediately thereafter. + -- Bugs from C 2.1.1 B3 that have been fixed in C 2.2.0 --------------------- 1. There were various bugs that could cause incorrect code to be generated in certain cases. Some of these were specific to certain optimization passes, alone or in combination.