[PATCH] Fix atomic operations of MIPS EB target
Jyun-Yan You
jyyou at cs.nctu.edu.tw
Thu May 30 20:09:19 PDT 2013
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/20130531/411d8c2f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mips-eb-atomic3.patch
Type: application/octet-stream
Size: 24841 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130531/411d8c2f/attachment.obj>
More information about the llvm-commits
mailing list