sim64 universal 64-bit cycle count support:
MaxCycleCount is accounted by countdown, eliminating the 1-instruction-overhead issue, and removing the need to compare against a growing TotalCycles. Makes main.c responsible for counting total cycles, instead of 6502.c, so the size of MaxCycleCount etc. is fully determined in one location. Makes error.c responsible for PrintCycles instead of paravirt.c, so that it can be treated globally instead of Return value of main() should be SIM65_ERROR because it is unreachable by design.
This commit is contained in:
@@ -55,6 +55,9 @@
|
||||
#define SIM65_ERROR_TIMEOUT 0x7E
|
||||
/* An error result for max CPU instructions exceeded. */
|
||||
|
||||
extern int PrintCycles;
|
||||
/* flag to print cycles at program termination */
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
@@ -75,6 +78,9 @@ void ErrorCode (int Code, const char* Format, ...) attribute((noreturn, format(p
|
||||
void Internal (const char* Format, ...) attribute((noreturn, format(printf,1,2)));
|
||||
/* Print an internal error message and die */
|
||||
|
||||
void SimExit (int Code);
|
||||
/* Exit the simulation with an exit code */
|
||||
|
||||
|
||||
|
||||
/* End of error.h */
|
||||
|
||||
Reference in New Issue
Block a user