ARM: Implement the sel instruction.
This commit is contained in:
parent
498f9d925e
commit
7fa6835a0c
1 changed files with 18 additions and 0 deletions
|
@ -369,4 +369,22 @@ let {{
|
||||||
header_output += RegRegRegImmOpDeclare.subst(uxtahIop)
|
header_output += RegRegRegImmOpDeclare.subst(uxtahIop)
|
||||||
decoder_output += RegRegRegImmOpConstructor.subst(uxtahIop)
|
decoder_output += RegRegRegImmOpConstructor.subst(uxtahIop)
|
||||||
exec_output += PredOpExecute.subst(uxtahIop)
|
exec_output += PredOpExecute.subst(uxtahIop)
|
||||||
|
|
||||||
|
selCode = '''
|
||||||
|
uint32_t resTemp = 0;
|
||||||
|
for (unsigned i = 0; i < 4; i++) {
|
||||||
|
int low = i * 8;
|
||||||
|
int high = low + 7;
|
||||||
|
replaceBits(resTemp, high, low,
|
||||||
|
bits(CondCodes, 16 + i) ?
|
||||||
|
bits(Op1, high, low) : bits(Op2, high, low));
|
||||||
|
}
|
||||||
|
Dest = resTemp;
|
||||||
|
'''
|
||||||
|
selIop = InstObjParams("sel", "Sel", "RegRegRegOp",
|
||||||
|
{ "code": selCode,
|
||||||
|
"predicate_test": predicateTest }, [])
|
||||||
|
header_output += RegRegRegOpDeclare.subst(selIop)
|
||||||
|
decoder_output += RegRegRegOpConstructor.subst(selIop)
|
||||||
|
exec_output += PredOpExecute.subst(selIop)
|
||||||
}};
|
}};
|
||||||
|
|
Loading…
Reference in a new issue