[Issue 6829] Unsigned rotate standard function in Phobos
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jul 9 10:13:39 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=6829
--- Comment #2 from bearophile_hugs at eml.cc 2013-07-09 10:13:38 PDT ---
(In reply to comment #1)
> What's the pattern that DMD recognizes for rotate instructions?
Walter offers this example of recognizable rotation:
void test236() {
uint a;
int shift;
a = 7;
shift = 1;
int r;
r = (a >> shift) | (a << (int.sizeof * 8 - shift));
assert(r == 0x8000_0003);
r = (a << shift) | (a >> (int.sizeof * 8 - shift));
assert(a == 7);
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list