OpenRISC is only available with TCG. No need to keep
raise_exception() in a distinct file unit, merge it
with exception_helper.c.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
 target/or1k/exception.h        |  2 +-
 target/or1k/exception.c        | 30 ------------------------------
 target/or1k/exception_helper.c | 13 +++++++++++--
 target/or1k/meson.build        |  1 -
 4 files changed, 12 insertions(+), 34 deletions(-)
 delete mode 100644 target/or1k/exception.c

diff --git a/target/or1k/exception.h b/target/or1k/exception.h
index f62fc314c1f..654ac9e515d 100644
--- a/target/or1k/exception.h
+++ b/target/or1k/exception.h
@@ -20,7 +20,7 @@
 #ifndef TARGET_OPENRISC_EXCEPTION_H
 #define TARGET_OPENRISC_EXCEPTION_H
 
-#include "cpu.h"
+#include "target/or1k/cpu-qom.h"
 
 G_NORETURN void raise_exception(OpenRISCCPU *cpu, uint32_t excp);
 
diff --git a/target/or1k/exception.c b/target/or1k/exception.c
deleted file mode 100644
index e213be36b6b..00000000000
--- a/target/or1k/exception.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * OpenRISC exception.
- *
- * Copyright (c) 2011-2012 Jia Liu <[email protected]>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * 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 "exception.h"
-
-G_NORETURN void raise_exception(OpenRISCCPU *cpu, uint32_t excp)
-{
-    CPUState *cs = CPU(cpu);
-
-    cs->exception_index = excp;
-    cpu_loop_exit(cs);
-}
diff --git a/target/or1k/exception_helper.c b/target/or1k/exception_helper.c
index c2c9d136528..3e76acae9c3 100644
--- a/target/or1k/exception_helper.c
+++ b/target/or1k/exception_helper.c
@@ -18,9 +18,18 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "exec/helper-proto.h"
-#include "exception.h"
+
+#include "target/or1k/cpu.h"
+#include "target/or1k/exception.h"
+
+G_NORETURN void raise_exception(OpenRISCCPU *cpu, uint32_t excp)
+{
+    CPUState *cs = CPU(cpu);
+
+    cs->exception_index = excp;
+    cpu_loop_exit(cs);
+}
 
 void HELPER(exception)(CPUOpenRISCState *env, uint32_t excp)
 {
diff --git a/target/or1k/meson.build b/target/or1k/meson.build
index 7cea45287a2..dba5044b655 100644
--- a/target/or1k/meson.build
+++ b/target/or1k/meson.build
@@ -5,7 +5,6 @@ or1k_ss.add(gen)
 or1k_ss.add(files(
   'cpu.c',
   'disas.c',
-  'exception.c',
   'exception_helper.c',
   'fpu_helper.c',
   'interrupt_helper.c',
-- 
2.53.0


Reply via email to