- ot(";@ Get Branch offset:\n");\r
- ot(" ldrsh r0,[r4]\n");\r
- ot(" add r4,r4,r0 ;@ r4 = New PC\n");\r
- ot("\n");\r
- Cycles=12-2;\r
- OpEnd();\r
+#if USE_CHECKPC_CALLBACK && USE_CHECKPC_DBRA\r
+ ot(" beq DbraMin1\n");\r
+ ot("\n");\r
+\r
+ ot(";@ Get Branch offset:\n");\r
+ ot(" ldrsh r0,[r4]\n");\r
+ ot(" add r0,r4,r0 ;@ r4 = New PC\n");\r
+ CheckPc(0);\r
+#else\r
+ ot("\n");\r
+ ot(";@ Get Branch offset:\n");\r
+ ot(" ldrnesh r0,[r4]\n");\r
+ ot(" addeq r4,r4,#2 ;@ Skip branch offset\n");\r
+ ot(" subeq r5,r5,#4 ;@ additional cycles\n");\r
+ ot(" addne r4,r4,r0 ;@ r4 = New PC\n");\r
+ ot(" bic r4,r4,#1\n"); // we do not emulate address errors\r
+ ot("\n");\r
+#endif\r
+ Cycles=12-2;\r
+ OpEnd();\r
+ }\r