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:
Aurelien Jarno 2011-01-13 08:20:39 +01:00
parent 2411fde9a4
commit b2d9eda5d4
3 changed files with 15 additions and 17 deletions

View file

@ -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;