Skip to contentSkip to conversation

qemu-arm : additional fix around QSUB maybe need

Qemu-devel Paul Brook 1 participant 1 message May 14, 2005

lore
Share & tools
lore

Paul Brook

author
#0 lore raw

---------- Forwarded Message ----------

Subject: qemu-arm : additional fix around QSUB maybe need
Date: Saturday 14 May 2005 02:26
From: "TAKAGO Daisuke" <[email protected]>
To: [email protected]

Dear Paul Brook

Hello!
Thank very much for sending fix-patch to me quickly!!
I noticed that patch applyed to CVS. Then I built qemu-arm from CVS.

I tested saturating instructions(QADD, QSUB).
QADD could execute saturating instruction, but QSUB cound not. I found the problem points in op_subl_T0_T1_saturate().

The following is a fix point I think.

----- qemu/op.c (near line 797)
void OPPROTO op_subl_T0_T1_saturate(void)
{
uint32_t res;

res = T0 - T1;
if (((res ^ T0) & SIGNBIT) && ((T0 ^ T1) & SIGNBIT)) {
env->QF = 1;
if (T0 & SIGNBIT)
- T0 = 0x8000000;

+          T0 = 0x80000000;
      else
          T0 = 0x7fffffff;
  }
  else
    T0 = res;

FORCE_RET();
}
--------------------------------------