mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
target-sh4: implement negc using TCG
Using setcond it's now possible to generate a relatively short negc instruction in TCG. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
2411fde9a4
commit
b2d9eda5d4
3 changed files with 15 additions and 17 deletions
|
@ -379,21 +379,6 @@ void helper_macw(uint32_t arg0, uint32_t arg1)
|
|||
}
|
||||
}
|
||||
|
||||
uint32_t helper_negc(uint32_t arg)
|
||||
{
|
||||
uint32_t temp;
|
||||
|
||||
temp = -arg;
|
||||
arg = temp - (env->sr & SR_T);
|
||||
if (0 < temp)
|
||||
env->sr |= SR_T;
|
||||
else
|
||||
env->sr &= ~SR_T;
|
||||
if (temp < arg)
|
||||
env->sr |= SR_T;
|
||||
return arg;
|
||||
}
|
||||
|
||||
uint32_t helper_subc(uint32_t arg0, uint32_t arg1)
|
||||
{
|
||||
uint32_t tmp0, tmp1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue