- /* Check if it is a PLA instruction that does not have a label and
- * where the register value is not used later and that is not followed
- * by a conditional branch.
- */
- if (E->OPC == OP65_PLA &&
- !CE_HasLabel (E) &&
- (N = CS_GetNextEntry (S, I)) != 0 &&
- (N->Info & OF_CBRA) == 0 &&
- !RegAUsed (S, I+1)) {
-
- /* Search back until we find the matching PHA instruction. If we
- * find a label or another PLA somewhere in between, bail out
- * since this may have side effects.
- */
- unsigned J = I;
- while (J-- > 0) {
-
- /* Get the previous entry */
- CodeEntry* P = CS_GetEntry (S, J);
-
- /* Check this entry */
- if (P->OPC == OP65_PHA) {
-
- /* Found the matching push, remove both */
- CS_DelEntry (S, I);
- CS_DelEntry (S, J);
-
- /* Remember that we had changes and bail out */
- ++Changes;
- break;
-
- } else if (CE_HasLabel (P) || P->OPC == OP65_PLA) {
-
- /* OOPS - too dangerous! */
- break;