/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "orderAccess_linux_x86.inline.hpp"
#include "runtime/atomic.hpp"
#include "vm_version_x86.hpp"
// Implementation of class atomic
inline void Atomic::store_ptr(intptr_t store_value, volatile intptr_t* dest) { *dest = store_value; }
inline void Atomic::store_ptr(void* store_value, volatile void* dest) { *(void* volatile *)dest = store_value; }
// Adding a lock prefix to an instruction on MP machine
: "=r" (addend)
: "cc", "memory");
}
}
}
}
}
__asm__ volatile ( "xchgl (%2),%0"
: "=r" (exchange_value)
: "memory");
return exchange_value;
}
}
: "=a" (exchange_value)
: "cc", "memory");
return exchange_value;
}
#ifdef AMD64
: "=r" (addend)
: "cc", "memory");
}
}
:
: "cc", "memory");
}
:
: "cc", "memory");
}
: "=r" (exchange_value)
: "memory");
return exchange_value;
}
: "=a" (exchange_value)
: "cc", "memory");
return exchange_value;
}
inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value) {
}
}
#else // !AMD64
}
}
}
}
}
extern "C" {
// defined in linux_x86.s
}
}
inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value) {
}
}
return dest;
}
}
}
#endif // AMD64
#endif // OS_CPU_LINUX_X86_VM_ATOMIC_LINUX_X86_INLINE_HPP