[PATCH] Fix atomic operations of MIPS EB target
Akira Hatanaka
ahatanak at gmail.com
Thu May 30 19:56:49 PDT 2013
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.
On Thu, May 30, 2013 at 6:47 PM, Jyun-Yan You <jyyou at cs.nctu.edu.tw> wrote:
> Here is a new patch. Please review it.
>
>
> On Fri, May 31, 2013 at 7:55 AM, Akira Hatanaka <ahatanak at gmail.com>wrote:
>
>> Can you add the command line and check strings to file
>> test/CodeGen/Mips/atomic.ll instead of creating a new test atomic-eb.ll
>> (see test/CodeGen/Mips/unalignedload.ll)?
>>
>> The changes you made in MIpsISelLowering.cpp look fine to me.
>>
>> On Wed, May 29, 2013 at 8:49 PM, Jyun-Yan You <jyyou at cs.nctu.edu.tw>wrote:
>>
>>> The MIPS codegen of atomic operations only considers little-endian.
>>> This patch adds big-endian support and a test case.
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>
>>>
>>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130530/4e060a38/attachment.html>
More information about the llvm-commits
mailing list