[LLVMbugs] [Bug 7496] Thumb1 mode generating illegal add instructions

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue May 19 04:48:44 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=7496

John Brawn <john.brawn.123 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from John Brawn <john.brawn.123 at gmail.com> ---
It looks like LLVM 2.7 is where this bug occurred, and the problem was
Thumb1RegisterInfo::rewriteFrameIndex using tADDhirr without checking if
FrameReg was a high register (probably assuming it was SP). In current trunk
the equivalent code path goes through emitThumbRegPlusImmInReg which dutifully
checks if the registers are high and uses tADDrr if not.

I'm pretty sure now that there's no way for tADDhirr without high registers to
be generated when it shouldn't - it's generated only by the aforementioned
emitThumbRegPlusImmInReg and by Thumb2SizeReduction, and when we have Thumb2 we
can use low registers in that instruction.

We still have the problem that MC allows the instruction when it shouldn't, but
that's less of a problem and only really affects disassembly (ARMAsmParser has
its own check to ensure it isn't allowed when it shouldn't be when assembling).
So I think we can say this bug no longer occurs.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150519/12f05b7b/attachment.html>


More information about the llvm-bugs mailing list