mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-10 02:54:58 -06:00
Hexagon (target/hexagon) decide if pred has been written at TCG gen time
Multiple writes to the same preg are and'ed together. Rather than generating a runtime check, we can determine at TCG generation time if the predicate has previously been written in the packet. Test added to tests/tcg/hexagon/misc.c Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Taylor Simpson <tsimpson@quicinc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <1617930474-31979-7-git-send-email-tsimpson@quicinc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
743debbc37
commit
6c677c60ae
5 changed files with 44 additions and 10 deletions
|
@ -264,6 +264,22 @@ static long long creg_pair(int x, int y)
|
|||
return retval;
|
||||
}
|
||||
|
||||
/* Check that predicates are auto-and'ed in a packet */
|
||||
static int auto_and(void)
|
||||
{
|
||||
int retval;
|
||||
asm ("r5 = #1\n\t"
|
||||
"{\n\t"
|
||||
" p0 = cmp.eq(r1, #1)\n\t"
|
||||
" p0 = cmp.eq(r1, #2)\n\t"
|
||||
"}\n\t"
|
||||
"%0 = p0\n\t"
|
||||
: "=r"(retval)
|
||||
:
|
||||
: "r5", "p0");
|
||||
return retval;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
|
@ -375,6 +391,9 @@ int main()
|
|||
res = test_clrtnew(2, 7);
|
||||
check(res, 7);
|
||||
|
||||
res = auto_and();
|
||||
check(res, 0);
|
||||
|
||||
puts(err ? "FAIL" : "PASS");
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue