2 #output: Basic clock cycles, total @: 54\n
3 #output: Memory source stall cycles: 0\n
4 #output: Memory read-after-write stall cycles: 0\n
5 #output: Movem source stall cycles: 0\n
6 #output: Movem destination stall cycles: 0\n
7 #output: Movem address stall cycles: 0\n
8 #output: Multiplication source stall cycles: 0\n
9 #output: Jump source stall cycles: 0\n
10 #output: Branch misprediction stall cycles: 18\n
11 #output: Jump target stall cycles: 0\n
12 #sim: --cris-cycles=basic
14 ; Check branch penalties. It is assumed that the taken-counters
15 ; in the bimodal branch-predictors start at 0, meaning two taken
16 ; branches are required for a branch to be predicted as taken
17 ; for each counter, from reset. None of these branches go
18 ; to the end of a cache-line and none map to the same counter.
20 .include "testutils.inc"
22 ba 0f ; No penalty: always-taken condition not "predicted".
27 bcs 0f ; Penalty 2 cycles.
33 bcc 0f ; Penalty 2 cycles, though branch is a nop.
34 moveq 4,r0 ; Execute 5 times:
38 bne 0b ; Mispredicted 3 out of 5 times: penalty 3*2 cycles.
42 beq 0f ; Not taken; no penalty.
48 ; (Almost) same insns, but with 16-bit bCC insns.
50 ba 0f ; No penalty: always-taken condition not "predicted".
55 bcs 0f ; Penalty 2 cycles.
60 moveq 4,r0 ; Execute 5 times:
63 move.d r0,r0 ; Mispredicted 3 out of 5 times:
66 bne 0b ; Penalty 3*2 cycles.
69 beq 0f ; Not taken; no penalty.