aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4instr_moth_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-01-05 15:49:19 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2018-01-07 20:14:45 +0000
commit8d83267dced1b36145421ae1bf5eee6209400d76 (patch)
tree54b95c3a8efed8556438009f0b65e72ae66836cd /src/qml/compiler/qv4instr_moth_p.h
parentd1e7e5cd7d5eb601541dcc4860ce11a63048d35d (diff)
Prospective fix for big endian and AOT
Ensure that the integer arguments for widely encoded instructions are always encoded as little endian. Change-Id: Iccd45aefb20b20d76fe1618d6706435142b202b9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4instr_moth_p.h')
-rw-r--r--src/qml/compiler/qv4instr_moth_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h
index 789f875ba7..eb25aad110 100644
--- a/src/qml/compiler/qv4instr_moth_p.h
+++ b/src/qml/compiler/qv4instr_moth_p.h
@@ -356,7 +356,7 @@ QT_BEGIN_NAMESPACE
nargs,
#define MOTH_DECODE_ARG(arg, type, nargs, offset) \
- arg = reinterpret_cast<const type *>(code)[-nargs + offset];
+ arg = qFromLittleEndian<type>(reinterpret_cast<const type *>(code)[-nargs + offset]);
#define MOTH_ADJUST_CODE(type, nargs) \
code += static_cast<quintptr>(nargs*sizeof(type) + 1)
@@ -486,6 +486,8 @@ union Instr
FOR_EACH_MOTH_INSTR(MOTH_EMIT_STRUCTS)
FOR_EACH_MOTH_INSTR(MOTH_EMIT_INSTR_MEMBERS)
+
+ int argumentsAsInts[4];
};
struct InstrInfo