aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2014-03-03 13:39:48 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-03 14:07:04 +0100
commit0fe950d1c05a633e737a0dab3d91d33fe0994141 (patch)
tree23a82b3cb1210c9e9d0ebf9083396083d93271d7 /src/3rdparty
parent151f750638d605ef19c62b2714d80e7780bfce8f (diff)
V4 JIT: enable disassembler on windows.
Change-Id: I55a2a96a1a774c79cc2146c6b47d441fede1d102 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/masm/config.h15
-rw-r--r--src/3rdparty/masm/disassembler/udis86/udis86_decode.c2
-rw-r--r--src/3rdparty/masm/disassembler/udis86/udis86_types.h2
-rw-r--r--src/3rdparty/masm/masm-defs.pri2
-rw-r--r--src/3rdparty/masm/stubs/WTFStubs.cpp10
-rw-r--r--src/3rdparty/masm/stubs/WTFStubs.h1
-rw-r--r--src/3rdparty/masm/wtf/DataLog.h2
7 files changed, 28 insertions, 6 deletions
diff --git a/src/3rdparty/masm/config.h b/src/3rdparty/masm/config.h
index 80d4d4d8db..18bb9ed61a 100644
--- a/src/3rdparty/masm/config.h
+++ b/src/3rdparty/masm/config.h
@@ -48,9 +48,20 @@
#include <wtf/FastAllocBase.h>
#include <wtf/RefPtr.h>
#include <cmath>
-#else
+
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif // _MSC_VER
+#else // !__cplusplus
+
#include <math.h>
-#endif
+
+#ifdef _MSC_VER
+#define inline
+#include <stdio.h>
+#endif // _MSC_VER
+
+#endif // __cplusplus
#include <limits.h>
#endif // MASM_CONFIG_H
diff --git a/src/3rdparty/masm/disassembler/udis86/udis86_decode.c b/src/3rdparty/masm/disassembler/udis86/udis86_decode.c
index 3d567b6df2..2ebd56b2a9 100644
--- a/src/3rdparty/masm/disassembler/udis86/udis86_decode.c
+++ b/src/3rdparty/masm/disassembler/udis86/udis86_decode.c
@@ -34,8 +34,10 @@
#include "udis86_decode.h"
#include <wtf/Assertions.h>
+#ifndef _MSC_VER
#define dbg(x, n...)
/* #define dbg printf */
+#endif // _MSC_VER
#ifndef __UD_STANDALONE__
# include <string.h>
diff --git a/src/3rdparty/masm/disassembler/udis86/udis86_types.h b/src/3rdparty/masm/disassembler/udis86/udis86_types.h
index 320d1ca491..520a24c541 100644
--- a/src/3rdparty/masm/disassembler/udis86/udis86_types.h
+++ b/src/3rdparty/masm/disassembler/udis86/udis86_types.h
@@ -43,10 +43,12 @@
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;
+# ifndef _STDINT
typedef __int8 int8_t;
typedef __int16 int16_t;
typedef __int32 int32_t;
typedef __int64 int64_t;
+# endif
#else
# define FMT64 "%ll"
# ifndef __UD_STANDALONE__
diff --git a/src/3rdparty/masm/masm-defs.pri b/src/3rdparty/masm/masm-defs.pri
index 66506dccf5..d0980c5312 100644
--- a/src/3rdparty/masm/masm-defs.pri
+++ b/src/3rdparty/masm/masm-defs.pri
@@ -24,7 +24,7 @@ INCLUDEPATH += $$PWD/stubs/wtf
INCLUDEPATH += $$PWD
disassembler {
- if(isEqual(QT_ARCH, "i386")|isEqual(QT_ARCH, "x86_64")):!win*: DEFINES += WTF_USE_UDIS86=1
+ if(isEqual(QT_ARCH, "i386")|isEqual(QT_ARCH, "x86_64")): DEFINES += WTF_USE_UDIS86=1
if(isEqual(QT_ARCH, "arm")): DEFINES += WTF_USE_ARMV7_DISASSEMBLER=1
} else {
DEFINES += WTF_USE_UDIS86=0
diff --git a/src/3rdparty/masm/stubs/WTFStubs.cpp b/src/3rdparty/masm/stubs/WTFStubs.cpp
index dff692fd67..d1c684dbaf 100644
--- a/src/3rdparty/masm/stubs/WTFStubs.cpp
+++ b/src/3rdparty/masm/stubs/WTFStubs.cpp
@@ -68,7 +68,13 @@ uint32_t cryptographicallyRandomNumber()
return 0;
}
-static FilePrintStream* s_dataFile;
+static PrintStream* s_dataFile;
+
+void setDataFile(PrintStream *ps)
+{
+ delete s_dataFile;
+ s_dataFile = ps;
+}
void setDataFile(FILE* f)
{
@@ -76,7 +82,7 @@ void setDataFile(FILE* f)
s_dataFile = new FilePrintStream(f, FilePrintStream::Borrow);
}
-FilePrintStream& dataFile()
+PrintStream& dataFile()
{
if (!s_dataFile)
s_dataFile = new FilePrintStream(stderr, FilePrintStream::Borrow);
diff --git a/src/3rdparty/masm/stubs/WTFStubs.h b/src/3rdparty/masm/stubs/WTFStubs.h
index e6a7291acf..c36089bce9 100644
--- a/src/3rdparty/masm/stubs/WTFStubs.h
+++ b/src/3rdparty/masm/stubs/WTFStubs.h
@@ -44,6 +44,7 @@
namespace WTF {
void setDataFile(FILE* f);
+void setDataFile(class PrintStream *);
}
diff --git a/src/3rdparty/masm/wtf/DataLog.h b/src/3rdparty/masm/wtf/DataLog.h
index 0bd8efe727..2b3df09970 100644
--- a/src/3rdparty/masm/wtf/DataLog.h
+++ b/src/3rdparty/masm/wtf/DataLog.h
@@ -34,7 +34,7 @@
namespace WTF {
-WTF_EXPORT_PRIVATE FilePrintStream& dataFile();
+WTF_EXPORT_PRIVATE PrintStream &dataFile();
WTF_EXPORT_PRIVATE void dataLogFV(const char* format, va_list) WTF_ATTRIBUTE_PRINTF(1, 0);
WTF_EXPORT_PRIVATE void dataLogF(const char* format, ...) WTF_ATTRIBUTE_PRINTF(1, 2);