star/star.c
/*
** This version of ret_timing does a trace flag check.
**
** Note: this only needs to be used for instructions which can potentially
**  _set_ the trace flag.  Instructions which can't set the trace flag (even
**  if they can clear it) are OK to use ret_timing as usual.  Why?  Well, if
**  an instruction is run in trace mode, that instruction is doomed to be
**  traced, regardless if it clears the trace flag during its execution.
**  Furthermore, the trace exception (being a group 1 exception after all)
**  will clear the trace tricky bit as well as the trace flag.
*/
This version of ret_timing does a trace flag check.
Note: this only needs to be used for instructions which can potentially
_set_ the trace flag.  Instructions which can't set the trace flag (even
if they can clear it) are OK to use ret_timing as usual.  Why.  Well, if
an instruction is run in trace mode, that instruction is doomed to be
traced, regardless if it clears the trace flag during its execution.
Furthermore, the trace exception (being a group 1 exception after all)
will clear the trace tricky bit as well as the trace flag.
This version of ret_timing does a trace flag check . Note : this only needs to be used for instructions which can potentially _set_ the trace flag . Instructions which can ' t set the trace flag ( even if they can clear it ) are OK to use ret_timing as usual . Why . Well if an instruction is run in trace mode that instruction is doomed to be traced regardless if it clears the trace flag during its execution . Furthermore the trace exception ( being a group 1 exception after all ) will clear the trace tricky bit as well as the trace flag .
static void ret_timing_checkpoint(int n) {
	if(n) {
		emit("sub edi,%s%d\n", (n < 128) ? "byte " : "", n);
	} else {
		emit("or edi,edi\n");
	}
	emit("jmp exec_checkpoint\n");
}
static void ret_timing_checkpoint ( int n ) { if ( n ) { emit ( " \n " , ( n < 128 ) ? " " : " " , n ) ; } else { emit ( " \n " ) ; } emit ( " \n " ) ; }
This version of ret_timing does a trace flag check.
This version of ret_timing does a trace flag check .