rotate() now generates valid code.

This commit is contained in:
David Given 2018-09-17 13:13:39 +01:00
parent 0202ac8700
commit c2dc1e184e

View file

@ -717,6 +717,10 @@ static void rotate(int opcode, int size, int irop, int irop_reverse)
struct ir* left = pop(size);
struct ir* bits = new_wordir(8 * size);
/* Fix left and right so we can refer to them multiple times. */
appendir(right);
appendir(left);
/* a rol b -> (a << b) | (a >> (32 - b)) */
push(
new_ir2(