Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
saga:registers:saga_clock_counter [2016/05/23 15:29] flype [Size] |
saga:registers:saga_clock_counter [2020/08/02 12:37] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== SAGA Clock-Cycle Register ====== | + | ====== SAGA_CLOCK_COUNTER register ====== |
+ | |||
+ | {{:clockcycle.png?nolink&64|}} | ||
===== Overview ===== | ===== Overview ===== | ||
- | ''Clock-Cycle Register'' is a new SAGA Read-Only register. It is unique feature, never seen in other 68K existing system. It allows to get, in real-time, the number of cycles consumed by one or more instructions. This register can come in handy when programmer need to optimize his code and locate greedy routines. | + | ''Clock-Cycle Counter register'' is a new SAGA Read-Only register. It is a unique feature, never seen in another existing 68k system. It allows to get, in real-time, the number of cycles consumed by one or more CPU instructions. This register can come in handy when a programmer needs to optimize their code and locate greedy routines. |
+ | |||
+ | ---- | ||
===== Name ===== | ===== Name ===== | ||
Line 46: | Line 50: | ||
DEBUG EQU 1 | DEBUG EQU 1 | ||
| | ||
- | SAGA_CLKCNT EQU $DE0008 | + | SAGA_CLOCK_COUNTER EQU $DE0008 |
| | ||
CLKCNT_RESET MACRO | CLKCNT_RESET MACRO | ||
IFNE DEBUG | IFNE DEBUG | ||
- | tst.l SAGA_CLKCNT | + | tst.l SAGA_CLOCK_COUNTER |
ENDC | ENDC | ||
ENDM | ENDM | ||
Line 56: | Line 60: | ||
CLKCNT_SAVE MACRO | CLKCNT_SAVE MACRO | ||
IFNE DEBUG | IFNE DEBUG | ||
- | move.l SAGA_CLKCNT,__\1 | + | move.l SAGA_CLOCK_COUNTER,__\1 |
ENDC | ENDC | ||
ENDM | ENDM | ||
Line 63: | Line 67: | ||
IFNE DEBUG | IFNE DEBUG | ||
move.l d0,-(sp) | move.l d0,-(sp) | ||
- | move.l SAGA_CLKCNT,d0 | + | move.l SAGA_CLOCK_COUNTER,d0 |
add.l d0,__\1 | add.l d0,__\1 | ||
move.l (sp)+,d0 | move.l (sp)+,d0 | ||
Line 80: | Line 84: | ||
---- | ---- | ||
- | [[start|Home]] | | + | <php>tpl_youarehere();</php> |
- | [[links|Links]] | | + | |
- | [[saga_core|SAGA]] | | + | |
- | [[saga_core_registers|SAGA Registers]] | + |
Last modified: le 2020/08/02 12:37