[PATCH] Fix atomic operations of MIPS EB target

Akira Hatanaka ahatanak at gmail.com
Thu May 30 20:28:36 PDT 2013


Committed r182984.

Thanks for fixing this!


On Thu, May 30, 2013 at 8:09 PM, Jyun-Yan You <jyyou at cs.nctu.edu.tw> wrote:

> Fixed, please review it.
>
>
>
> On Fri, May 31, 2013 at 10:56 AM, Akira Hatanaka <ahatanak at gmail.com>wrote:
>
>> Shouldn't sll use the result of xori (R4), instead of R3? R4 doesn't seem
>> to be used by any other instructions.
>>
>> ; CHECK-EB:   sll     $[[R5:[0-9]+]], $[[R3]], 3
>>
>>
>> ; CHECK-EB:   AtomicLoadAdd8:
>> ; CHECK-EB:   lw      $[[R0:[0-9]+]], %got(y)
>> ; CHECK-EB:   addiu   $[[R1:[0-9]+]], $zero, -4
>> ; CHECK-EB:   and     $[[R2:[0-9]+]], $[[R0]], $[[R1]]
>> ; CHECK-EB:   andi    $[[R3:[0-9]+]], $[[R0]], 3
>> ; CHECK-EB:   xori    $[[R4:[0-9]+]], $[[R3]], 3
>> ; CHECK-EB:   sll     $[[R5:[0-9]+]], $[[R3]], 3
>> ; CHECK-EB:   ori     $[[R6:[0-9]+]], $zero, 255
>> ; CHECK-EB:   sllv    $[[R7:[0-9]+]], $[[R6]], $[[R5]]
>> ; CHECK-EB:   nor     $[[R8:[0-9]+]], $zero, $[[R7]]
>> ; CHECK-EB:   sllv    $[[R9:[0-9]+]], $4, $[[R5]]
>>
>>
>> AtomicLoadSub8, AtomicSwap8 and AtomicCmpSwap8 should be fixed too.
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130530/065cd159/attachment.html>


More information about the llvm-commits mailing list