+
+ /* Check for special zero page registers used */
+ switch (E->AM) {
+
+ case AM65_ACC:
+ if (E->OPC == OP65_ASL || E->OPC == OP65_DEC ||
+ E->OPC == OP65_INC || E->OPC == OP65_LSR ||
+ E->OPC == OP65_ROL || E->OPC == OP65_ROR) {
+ /* A is changed by these insns */
+ E->Chg |= REG_A;
+ }
+ break;
+
+ case AM65_ZP:
+ case AM65_ABS:
+ /* Be conservative: */
+ case AM65_ZPX:
+ case AM65_ABSX:
+ case AM65_ABSY:
+ Info = GetZPInfo (E->Arg);
+ if (Info && Info->ByteUse != REG_NONE) {
+ if (E->OPC == OP65_ASL || E->OPC == OP65_DEC ||
+ E->OPC == OP65_INC || E->OPC == OP65_LSR ||
+ E->OPC == OP65_ROL || E->OPC == OP65_ROR ||
+ E->OPC == OP65_TRB || E->OPC == OP65_TSB) {
+ /* The zp loc is both, input and output */
+ E->Chg |= Info->ByteUse;
+ E->Use |= Info->ByteUse;
+ } else if ((E->Info & OF_STORE) != 0) {
+ /* Just output */
+ E->Chg |= Info->ByteUse;
+ } else {
+ /* Input only */
+ E->Use |= Info->ByteUse;
+ }
+ }
+ break;
+
+ case AM65_ZPX_IND:
+ case AM65_ZP_INDY:
+ case AM65_ZP_IND:
+ Info = GetZPInfo (E->Arg);
+ if (Info && Info->ByteUse != REG_NONE) {
+ /* These addressing modes will never change the zp loc */
+ E->Use |= Info->WordUse;
+ }
+ break;
+
+ default:
+ /* Keep gcc silent */
+ break;
+ }