[llvm-commits] [llvm] r130330 - /llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp
Kevin Enderby
enderby at apple.com
Wed Apr 27 14:14:24 PDT 2011
This was found via using the public 'C' disassembler via otool(1). I don't have a test case for the 32-bit arm code.
Kev
On Apr 27, 2011, at 2:09 PM, Cameron Zwarich wrote:
> Test case?
>
> Cameron
>
> On Apr 27, 2011, at 2:02 PM, Kevin Enderby wrote:
>
>> Author: enderby
>> Date: Wed Apr 27 16:02:27 2011
>> New Revision: 130330
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=130330&view=rev
>> Log:
>> Fix a bug in the case that there is no add or subtract symbol and the offset
>> value is zero so it does not add a NULL expr operand.
>>
>> Modified:
>> llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp
>>
>> Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=130330&r1=130329&r2=130330&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original)
>> +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Wed Apr 27 16:02:27 2011
>> @@ -3800,8 +3800,12 @@
>> Expr = MCBinaryExpr::CreateAdd(Add, Off, *Ctx);
>> else
>> Expr = Add;
>> - } else
>> - Expr = Off;
>> + } else {
>> + if (Off != 0)
>> + Expr = Off;
>> + else
>> + Expr = MCConstantExpr::Create(0, *Ctx);
>> + }
>>
>> if (SymbolicOp.VariantKind == LLVMDisassembler_VariantKind_ARM_HI16)
>> MI.addOperand(MCOperand::CreateExpr(ARMMCExpr::CreateUpper16(Expr, *Ctx)));
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list