OSDN Git Service

[mips][atomics] Fix partword atomic binary operation implementation
authorSimon Dardis <simon.dardis@imgtec.com>
Thu, 28 Apr 2016 16:26:43 +0000 (16:26 +0000)
committerSimon Dardis <simon.dardis@imgtec.com>
Thu, 28 Apr 2016 16:26:43 +0000 (16:26 +0000)
commit85648b98a93dda9a36d780faa4c75e436ef9a860
tree87d39e85032d1f7d0df5007b924f84ef713c97d5
parente95eedcc04c89758118103161d3dfb5f7c4598ab
[mips][atomics] Fix partword atomic binary operation implementation

Currently Mips::emitAtomicBinaryPartword() does not properly respect the
width of pointers. For MIPS64 this causes the memory address that the ll/sc
sequence uses to be truncated. At runtime this causes a segmentation fault.

This can be fixed by applying similar changes as r266204, so that a full 64bit
pointer is loaded.

Reviewers: dsanders

Differential Review: http://reviews.llvm.org/D19651

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267900 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
lib/Target/Mips/MCTargetDesc/MipsABIInfo.h
lib/Target/Mips/MipsISelLowering.cpp
test/CodeGen/Mips/atomic.ll