A BUG of the Shared Source version of "Device Emulator, version 1.0"

I found a BUG in the source of
Microsoft Shared Source Academic License for the Device Emulator, version 1.0

In the function DecodeThumbInstruction in armcpu.cpp
about Line 5973.

case 2:
if (Opcode.LongBranch.Offset & 0x200) {
// Offset is negative
d->Offset = (0xfffffc00 | Opcode.LongBranch.Offset) << 12;
} else {
d->Offset = Opcode.LongBranch.Offset << 12;
}

this is decode for a Thumb long-branch instruction.
According to ARM_ARM p330, the singed bit should be BIT10 = 0x0400, not 0x200

This BUG cause some Thumb long-branch call jumps to error location.





Answer this question

A BUG of the Shared Source version of "Device Emulator, version 1.0"

  • GAtkins

    Thanks alot David for reporting the issue. I have opened a bug for investigation and we'll get back with further details on this thread.

    -Thanks,

    Mohit


  • bilalso

    Yes David,

    You are absolutely right. Thanks for pointing it out to us. The next version of the Microsoft Device Emulator that we release will NOT have this bug.

    Please let us know if you find any other issues, even if you are not 100% sure that they are bugs.

    Vijay Madhavapeddi, Device Emulator Team, Microsoft



  • A BUG of the Shared Source version of "Device Emulator, version 1.0"