From c204973a7053e21bd3177f82aaab5ebb59f39401 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Sat, 10 Aug 2013 17:30:39 +0300 Subject: [PATCH] don't run when 0 cycles are left more consistent with other cores out there --- Main.cpp | 10 +++++----- OpAny.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Main.cpp b/Main.cpp index 1f532a0..1637047 100644 --- a/Main.cpp +++ b/Main.cpp @@ -630,7 +630,7 @@ static void PrintFramework() ot(" ldr r6,[r7,#0x54]\n"); ot(" ldrh r8,[r4],#2 ;@ Fetch next opcode\n"); ot(" subs r5,r5,#44 ;@ Subtract cycles\n"); - ot(" ldrge pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n"); + ot(" ldrgt pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n"); ot(" b CycloneEnd\n"); ot("\n"); @@ -842,7 +842,7 @@ static void PrintFramework() ot(" ldr r6,[r7,#0x54]\n"); ot(" ldrh r8,[r4],#2 ;@ Fetch next opcode\n"); ot(" subs r5,r5,#50 ;@ Subtract cycles\n"); - ot(" ldrge pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n"); + ot(" ldrgt pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n"); ot(" b CycloneEnd\n"); ot("\n"); #endif @@ -855,7 +855,7 @@ static void PrintFramework() ot(" cmp r5,#0\n"); ot(" orr r0,r0,#2 ;@ go to trace mode\n"); ot(" str r0,[r7,#0x58]\n"); - ot(" blt CycloneEnd\n"); // should take care of situation where we come here when already tracing + ot(" ble CycloneEnd\n"); // should take care of situation where we come here when already tracing ot(";@ CheckInterrupt:\n"); ot(" movs r0,r1,lsr #24 ;@ Get IRQ level\n"); ot(" beq CycloneDoTrace\n"); @@ -898,13 +898,13 @@ static void PrintFramework() ot(" bl Exception\n"); ot(" ldrh r8,[r4],#2 ;@ Fetch next opcode\n"); ot(" subs r5,r5,#34 ;@ Subtract cycles\n"); - ot(" ldrge pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n"); + ot(" ldrgt pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n"); ot(" b CycloneEnd\n"); ot("\n"); ot("TraceDisabled%s\n", ms?"":":"); ot(" ldrh r8,[r4],#2 ;@ Fetch next opcode\n"); ot(" cmp r5,#0\n"); - ot(" ldrge pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n"); + ot(" ldrgt pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n"); ot(" b CycloneEnd\n"); ot("\n"); #endif diff --git a/OpAny.cpp b/OpAny.cpp index 9d45a01..63a7e1f 100644 --- a/OpAny.cpp +++ b/OpAny.cpp @@ -112,7 +112,7 @@ void OpEnd(int sea, int tea) } if (opend_check_interrupt) { - ot(" blt CycloneEnd\n"); + ot(" ble CycloneEnd\n"); ot(";@ CheckInterrupt:\n"); if (!opend_check_trace) ot(" ldr r1,[r7,#0x44]\n"); @@ -126,7 +126,7 @@ void OpEnd(int sea, int tea) } else { - ot(" ldrge pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n"); + ot(" ldrgt pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n"); ot(" b CycloneEnd\n"); } ot("\n"); -- 2.39.2