def ROTL32(value, bits):
+ if isinstance(bits, SelectableInt):
+ bits = bits.value
if isinstance(value, SelectableInt):
value = SelectableInt(value.value, 64)
return rotl(value | (value << 32), bits, 64)
+def MASK32(x, y):
+ if isinstance(x, SelectableInt):
+ x = x.value
+ if isinstance(y, SelectableInt):
+ y = y.value
+ return MASK(x+32, y+32)
def MASK(x, y):
if isinstance(x, SelectableInt):
from openpower.decoder.isa.caller import inject, instruction_info
from openpower.decoder.helpers import (EXTS, EXTS64, EXTZ64, ROTL64, ROTL32,
- MASK, ne, eq, gt, ge, lt, le, ltu, gtu, length,
+ MASK, MASK32,
+ ne, eq, gt, ge, lt, le, ltu, gtu, length,
trunc_divs, trunc_rems, MULS, DIVS, MODS,
EXTS128, undefined)
from openpower.decoder.selectable_int import SelectableInt