Skip to content

Commit 1878887

Browse files
committed
patmos: loop bound annotations for __udivmodsi4, __udivsi3
1 parent 88c687e commit 1878887

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lib/patmos/udivmodsi4.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ __udivmodsi4(su_int n, su_int d, su_int* rem)
2626
* Should still be better than original C without branches due to lower data dependencies
2727
* TODO The compiler should be able to lower this to the code below in the future. */
2828
r = 0;
29+
#pragma loopbound min 32 max 32
2930
for (int i = 31; i >= 0; i--) {
3031
r <<= 1;
3132
// r[0] = n[i] -> should be p1 = btest n, i; (p1) or r = r, 1

lib/patmos/udivsi3.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ __udivsi3(su_int n, su_int d)
2525
* TODO The compiler should be able to lower this to the code below in the future. */
2626
unsigned r = 0;
2727
unsigned q = 0;
28+
#pragma loopbound min 32 max 32
2829
for (int i = 31; i >= 0; i--) {
2930
r <<= 1;
3031
// r[0] = n[i] -> should be p1 = btest n, i; (p1) or r = r, 1

0 commit comments

Comments
 (0)