PR18931, PATCH: Crash using integrated assembler with immediate arithmetic
Rafael EspĂndola
rafael.espindola at gmail.com
Wed Mar 26 07:01:42 PDT 2014
LGTM. Thanks!
On 26 March 2014 00:46, Stepan Dyatkovskiy <stpworld at narod.ru> wrote:
> Hi Rafael,
>
>
>> Can you expand it a bit For example:
>>
>> // CHECK: cmp r2, #1
> Fixed.
>
>
>> You can probably just use
>>
>> if (MO.isExpr()) {
> Fixed.
>
> -Stepan
>
>
> Rafael EspĂndola wrote:
>>
>> The test should be in MC, not CodeGen.
>>
>> + // CHECK: #1
>>
>>
>> Can you expand it a bit For example:
>>
>> // CHECK: cmp r2, #1
>>
>>
>> + // We expect MO to be immediate,
>>
>> The comment is not exactly right with the patch. We expect it to be an
>> expression or an immediate.
>>
>> + if (!MO.isImm()) {
>> + assert(MO.isExpr() && "Unexpected operand type!");
>>
>> You can probably just use
>>
>> if (MO.isExpr()) {
>>
>> the "MO.getImm();" afterwards takes care of the assert that we only
>> have expressions or immediates.
>>
>> Cheers,
>> Rafael
>>
>
More information about the llvm-commits
mailing list