fix MSVC build

This commit is contained in:
Joel Dice 2009-12-02 08:49:10 -07:00
parent 5a0e00ca39
commit 3777c9b429
3 changed files with 23 additions and 18 deletions

View File

@ -2955,8 +2955,8 @@ intrinsic(MyThread* t, Frame* frame, object target)
{
#define MATCH(name, constant) \
(byteArrayLength(t, name) == sizeof(constant) \
and strcmp(reinterpret_cast<char*>(&byteArrayBody(t, name, 0)), \
constant) == 0)
and ::strcmp(reinterpret_cast<char*>(&byteArrayBody(t, name, 0)), \
constant) == 0)
object className = vm::className(t, methodClass(t, target));
if (UNLIKELY(MATCH(className, "java/lang/Math"))) {

View File

@ -3212,7 +3212,7 @@ class CallEvent: public Event {
}
for (unsigned i = 0; i < stackArgumentFootprint; ++i) {
Value* v = arguments[i];
Value* v = RUNTIME_ARRAY_BODY(arguments)[i];
if (v) {
int frameIndex = i + frameOffset;

View File

@ -16,6 +16,7 @@
#ifdef _MSC_VER
# include "windows.h"
# undef interface
#endif
#ifdef ARCH_x86_32
@ -155,7 +156,23 @@ trap()
}
inline void
memoryBarrier()
programOrderMemoryBarrier()
{
#ifdef _MSC_VER
MemoryBarrier();
#else
__asm__ __volatile__("": : :"memory");
#endif
}
inline void
storeStoreMemoryBarrier()
{
programOrderMemoryBarrier();
}
inline void
storeLoadMemoryBarrier()
{
#ifdef _MSC_VER
MemoryBarrier();
@ -166,28 +183,16 @@ memoryBarrier()
#endif // ARCH_x86_64
}
inline void
storeStoreMemoryBarrier()
{
__asm__ __volatile__("": : :"memory");
}
inline void
storeLoadMemoryBarrier()
{
memoryBarrier();
}
inline void
loadMemoryBarrier()
{
__asm__ __volatile__("": : :"memory");
programOrderMemoryBarrier();
}
inline void
syncInstructionCache(const void*, unsigned)
{
__asm__ __volatile__("": : :"memory");
programOrderMemoryBarrier();
}
#ifdef USE_ATOMIC_OPERATIONS