projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
a1ec8ad
)
Fix lrot.c: Shifting by the width of the left operand results in undefined behaviour.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Mon, 25 Aug 2008 19:44:20 +0000
(19:44 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Mon, 25 Aug 2008 19:44:20 +0000
(19:44 +0000)
[r21464]
ir/be/test/lrot.c
patch
|
blob
|
history
diff --git
a/ir/be/test/lrot.c
b/ir/be/test/lrot.c
index
2bc7247
..
737581d
100644
(file)
--- a/
ir/be/test/lrot.c
+++ b/
ir/be/test/lrot.c
@@
-6,11
+6,11
@@
#define ROR(a,b) (((a) >> (b)) | ((a) << ((sizeof (a) * CHAR_BIT) - (b))))
unsigned long long testL(unsigned long long a, int cnt) {
- return ROL(a, cnt);
+ return
cnt == 0 ? a :
ROL(a, cnt);
}
unsigned long long testR(unsigned long long a, int cnt) {
- return ROR(a, cnt);
+ return
cnt == 0 ? a :
ROR(a, cnt);
}
int main() {