projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add a parameter to limit the maximum size of methods when inlining, otherwise some...
[libfirm]
/
ir
/
tv
/
strcalc.c
diff --git
a/ir/tv/strcalc.c
b/ir/tv/strcalc.c
index
47c9475
..
98e41ce
100644
(file)
--- a/
ir/tv/strcalc.c
+++ b/
ir/tv/strcalc.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 1995-200
7
University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-200
8
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
*
* This file is part of libFirm.
*
@@
-1309,8
+1309,8
@@
unsigned char sc_sub_bits(const void *value, int len, unsigned byte_ofs) {
res |= _val(val[nibble_ofs + 1]) << 4;
/* kick bits outsize */
res |= _val(val[nibble_ofs + 1]) << 4;
/* kick bits outsize */
- if (len
< (int) (8*byte_ofs)
) {
- res &=
0xFF >> (8*byte_ofs - len)
;
+ if (len
- 8 * byte_ofs < 8
) {
+ res &=
(1 << (len - 8 * byte_ofs)) - 1
;
}
return res;
}
}
return res;
}