Commit 3dbc7586 authored by Ilija.Pavlovic's avatar Ilija.Pavlovic Committed by Commit bot

MIPS64: Fix compilation issues on MIPS64R6 with Clang.

This patch enables V8 build with Clang without errors for MIPS64
release R6.

TEST=
BUG=

Review-Url: https://codereview.chromium.org/2062713002
Cr-Commit-Position: refs/heads/master@{#36948}
parent 85e5567d
...@@ -91,7 +91,8 @@ inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr, ...@@ -91,7 +91,8 @@ inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
Atomic32 increment) { Atomic32 increment) {
Atomic32 temp, temp2; Atomic32 temp, temp2;
__asm__ __volatile__(".set push\n" __asm__ __volatile__(
".set push\n"
".set noreorder\n" ".set noreorder\n"
"1:\n" "1:\n"
"ll %0, %2\n" // temp = *ptr "ll %0, %2\n" // temp = *ptr
...@@ -100,8 +101,8 @@ inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr, ...@@ -100,8 +101,8 @@ inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
"beqz %1, 1b\n" // start again on atomic error "beqz %1, 1b\n" // start again on atomic error
"addu %1, %0, %3\n" // temp2 = temp + increment "addu %1, %0, %3\n" // temp2 = temp + increment
".set pop\n" ".set pop\n"
: "=&r" (temp), "=&r" (temp2), "=m" (*ptr) : "=&r"(temp), "=&r"(temp2), "=ZC"(*ptr)
: "Ir" (increment), "m" (*ptr) : "Ir"(increment), "m"(*ptr)
: "memory"); : "memory");
// temp2 now holds the final value. // temp2 now holds the final value.
return temp2; return temp2;
...@@ -228,7 +229,8 @@ inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr, ...@@ -228,7 +229,8 @@ inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
Atomic64 increment) { Atomic64 increment) {
Atomic64 temp, temp2; Atomic64 temp, temp2;
__asm__ __volatile__(".set push\n" __asm__ __volatile__(
".set push\n"
".set noreorder\n" ".set noreorder\n"
"1:\n" "1:\n"
"lld %0, %2\n" // temp = *ptr "lld %0, %2\n" // temp = *ptr
...@@ -237,8 +239,8 @@ inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr, ...@@ -237,8 +239,8 @@ inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
"beqz %1, 1b\n" // start again on atomic error "beqz %1, 1b\n" // start again on atomic error
"daddu %1, %0, %3\n" // temp2 = temp + increment "daddu %1, %0, %3\n" // temp2 = temp + increment
".set pop\n" ".set pop\n"
: "=&r" (temp), "=&r" (temp2), "=m" (*ptr) : "=&r"(temp), "=&r"(temp2), "=ZC"(*ptr)
: "Ir" (increment), "m" (*ptr) : "Ir"(increment), "m"(*ptr)
: "memory"); : "memory");
// temp2 now holds the final value. // temp2 now holds the final value.
return temp2; return temp2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment