summaryrefslogtreecommitdiff
path: root/target-m68k
diff options
context:
space:
mode:
authorYonghee Han <onstudy@samsung.com>2016-07-27 16:43:51 +0900
committerYonghee Han <onstudy@samsung.com>2016-07-27 01:00:25 -0700
commit186efde2677c31fb40d154a81a5f3731eab52414 (patch)
treeb43c1e7ee15fbdade66764b4b45f40dd3fad408e /target-m68k
parenta03c4728275d119af5f66c4a69e8d9d5a1730031 (diff)
downloadqemu-186efde2677c31fb40d154a81a5f3731eab52414.tar.gz
qemu-186efde2677c31fb40d154a81a5f3731eab52414.tar.bz2
qemu-186efde2677c31fb40d154a81a5f3731eab52414.zip
Imported Upstream version 2.6.0upstream/2.6.0
Change-Id: I8e3ccf55257695533c385aa8706484c73a733251
Diffstat (limited to 'target-m68k')
-rw-r--r--target-m68k/cpu.c2
-rw-r--r--target-m68k/cpu.h1
-rw-r--r--target-m68k/gdbstub.c2
-rw-r--r--target-m68k/helper.c1
-rw-r--r--target-m68k/m68k-semi.c10
-rw-r--r--target-m68k/op_helper.c1
-rw-r--r--target-m68k/translate.c34
7 files changed, 26 insertions, 25 deletions
diff --git a/target-m68k/cpu.c b/target-m68k/cpu.c
index e8a4eed1f..0b5f9a581 100644
--- a/target-m68k/cpu.c
+++ b/target-m68k/cpu.c
@@ -18,6 +18,8 @@
* <http://www.gnu.org/licenses/lgpl-2.1.html>
*/
+#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "qemu-common.h"
#include "migration/vmstate.h"
diff --git a/target-m68k/cpu.h b/target-m68k/cpu.h
index 224c16967..48b4c872f 100644
--- a/target-m68k/cpu.h
+++ b/target-m68k/cpu.h
@@ -24,7 +24,6 @@
#define CPUArchState struct CPUM68KState
-#include "config.h"
#include "qemu-common.h"
#include "exec/cpu-defs.h"
diff --git a/target-m68k/gdbstub.c b/target-m68k/gdbstub.c
index ae8179c01..f02bb5caf 100644
--- a/target-m68k/gdbstub.c
+++ b/target-m68k/gdbstub.c
@@ -17,7 +17,7 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
+#include "qemu/osdep.h"
#include "qemu-common.h"
#include "exec/gdbstub.h"
diff --git a/target-m68k/helper.c b/target-m68k/helper.c
index 77225a200..a8f6d9d6a 100644
--- a/target-m68k/helper.c
+++ b/target-m68k/helper.c
@@ -18,6 +18,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/gdbstub.h"
diff --git a/target-m68k/m68k-semi.c b/target-m68k/m68k-semi.c
index 9dffe8de6..f360ef3e1 100644
--- a/target-m68k/m68k-semi.c
+++ b/target-m68k/m68k-semi.c
@@ -17,15 +17,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/time.h>
-#include <time.h>
+#include "qemu/osdep.h"
#include "cpu.h"
#if defined(CONFIG_USER_ONLY)
diff --git a/target-m68k/op_helper.c b/target-m68k/op_helper.c
index 1af0ca647..17d0a1191 100644
--- a/target-m68k/op_helper.c
+++ b/target-m68k/op_helper.c
@@ -16,6 +16,7 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/helper-proto.h"
#include "exec/cpu_ldst.h"
diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index 41ae2c605..7560c3a80 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -18,6 +18,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu/osdep.h"
#include "cpu.h"
#include "disas/disas.h"
#include "tcg-op.h"
@@ -28,6 +29,7 @@
#include "exec/helper-gen.h"
#include "trace-tcg.h"
+#include "exec/log.h"
//#define DEBUG_DISPATCH 1
@@ -48,7 +50,7 @@
static TCGv_i32 cpu_halted;
static TCGv_i32 cpu_exception_index;
-static TCGv_ptr cpu_env;
+static TCGv_env cpu_env;
static char cpu_reg_names[3*8*3 + 5*4];
static TCGv cpu_dregs[8];
@@ -74,48 +76,52 @@ void m68k_tcg_init(void)
char *p;
int i;
-#define DEFO32(name, offset) QREG_##name = tcg_global_mem_new_i32(TCG_AREG0, offsetof(CPUM68KState, offset), #name);
-#define DEFO64(name, offset) QREG_##name = tcg_global_mem_new_i64(TCG_AREG0, offsetof(CPUM68KState, offset), #name);
-#define DEFF64(name, offset) DEFO64(name, offset)
+ cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, "env");
+
+#define DEFO32(name, offset) \
+ QREG_##name = tcg_global_mem_new_i32(cpu_env, \
+ offsetof(CPUM68KState, offset), #name);
+#define DEFO64(name, offset) \
+ QREG_##name = tcg_global_mem_new_i64(cpu_env, \
+ offsetof(CPUM68KState, offset), #name);
+#define DEFF64(name, offset) DEFO64(name, offset)
#include "qregs.def"
#undef DEFO32
#undef DEFO64
#undef DEFF64
- cpu_halted = tcg_global_mem_new_i32(TCG_AREG0,
+ cpu_halted = tcg_global_mem_new_i32(cpu_env,
-offsetof(M68kCPU, env) +
offsetof(CPUState, halted), "HALTED");
- cpu_exception_index = tcg_global_mem_new_i32(TCG_AREG0,
+ cpu_exception_index = tcg_global_mem_new_i32(cpu_env,
-offsetof(M68kCPU, env) +
offsetof(CPUState, exception_index),
"EXCEPTION");
- cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, "env");
-
p = cpu_reg_names;
for (i = 0; i < 8; i++) {
sprintf(p, "D%d", i);
- cpu_dregs[i] = tcg_global_mem_new(TCG_AREG0,
+ cpu_dregs[i] = tcg_global_mem_new(cpu_env,
offsetof(CPUM68KState, dregs[i]), p);
p += 3;
sprintf(p, "A%d", i);
- cpu_aregs[i] = tcg_global_mem_new(TCG_AREG0,
+ cpu_aregs[i] = tcg_global_mem_new(cpu_env,
offsetof(CPUM68KState, aregs[i]), p);
p += 3;
sprintf(p, "F%d", i);
- cpu_fregs[i] = tcg_global_mem_new_i64(TCG_AREG0,
+ cpu_fregs[i] = tcg_global_mem_new_i64(cpu_env,
offsetof(CPUM68KState, fregs[i]), p);
p += 3;
}
for (i = 0; i < 4; i++) {
sprintf(p, "ACC%d", i);
- cpu_macc[i] = tcg_global_mem_new_i64(TCG_AREG0,
+ cpu_macc[i] = tcg_global_mem_new_i64(cpu_env,
offsetof(CPUM68KState, macc[i]), p);
p += 5;
}
- NULL_QREG = tcg_global_mem_new(TCG_AREG0, -4, "NULL");
- store_dummy = tcg_global_mem_new(TCG_AREG0, -8, "NULL");
+ NULL_QREG = tcg_global_mem_new(cpu_env, -4, "NULL");
+ store_dummy = tcg_global_mem_new(cpu_env, -8, "NULL");
}
/* internal defines */