-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Helps in case of ambigous loop types and makes the operation more predictable.
- Loading branch information
Showing
5 changed files
with
100 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* For example, r5 represents an address where we will stop iterating and r6 is | ||
the actual pointer which is incremented inside the loop. | ||
In this specific example, the vmov shall not be accounted towards the loop | ||
boundary but rather the body. */ | ||
|
||
mov.w r6, #0 | ||
add.w r5, r6, #64 | ||
vmov s0, r5 | ||
|
||
start: | ||
add r6, r6, #4 | ||
vmov r5, s0 | ||
cmp r6, r5 | ||
bne start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* For example, r5 represents an address where we will stop iterating and r6 is | ||
the actual pointer which is incremented inside the loop. | ||
In this specific example, the vmov shall not be accounted towards the loop | ||
boundary but rather the body. */ | ||
|
||
mov.w r6, #0 | ||
add.w r5, r6, #64 | ||
vmov s0, r5 | ||
|
||
1: | ||
// Instructions: 2 | ||
// Expected cycles: 1 | ||
// Expected IPC: 2.00 | ||
// | ||
// Cycle bound: 1.0 | ||
// IPC bound: 2.00 | ||
// | ||
// Wall time: 0.04s | ||
// User time: 0.04s | ||
// | ||
// ----- cycle (expected) ------> | ||
// 0 25 | ||
// |------------------------|---- | ||
add r6, r6, #4 // *............................. | ||
vmov r5, s0 // *............................. | ||
|
||
// ------ cycle (expected) ------> | ||
// 0 25 | ||
// |------------------------|----- | ||
// add r6, r6, #4 // *.............................. | ||
// vmov r5, s0 // *.............................. | ||
|
||
cmp r6, r5 | ||
bne 1b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters