aboutsummaryrefslogtreecommitdiff
path: root/user-exec.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-07-13 12:44:15 +0000
committerBlue Swirl <blauwirbel@gmail.com>2011-07-30 09:41:14 +0000
commit3e4571724fb92c77de81d8b54957de8232be6706 (patch)
tree22ed3dd4f120e05ecef8e946fe79ea8b8b27c72c /user-exec.c
parent104bf02eb50e080ac9d0de5905f80f9a09730154 (diff)
exec.h cleanup
Move softmmu_exec.h include directives from target-*/exec.h to target-*/op_helper.c. Move also various other stuff only used in op_helper.c there. Define global env in dyngen-exec.h. For i386, move wrappers for segment and FPU helpers from user-exec.c to op_helper.c. Implement raise_exception_err_env() to handle dynamic CPUState. Move the function declarations to cpu.h since they can be used outside of op_helper.c context. LM32, s390x, UniCore32: remove unused cpu_halted(), regs_to_env() and env_to_regs(). ARM: make raise_exception() static. Convert #include "exec.h" to #include "cpu.h" #include "dyngen-exec.h" and remove now unused target-*/exec.h. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'user-exec.c')
-rw-r--r--user-exec.c49
1 files changed, 3 insertions, 46 deletions
diff --git a/user-exec.c b/user-exec.c
index 02c2f8ba43..14c0f251b4 100644
--- a/user-exec.c
+++ b/user-exec.c
@@ -17,7 +17,8 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
-#include "exec.h"
+#include "cpu.h"
+#include "dyngen-exec.h"
#include "disas.h"
#include "tcg.h"
@@ -40,7 +41,7 @@
static void exception_action(CPUState *env1)
{
#if defined(TARGET_I386)
- raise_exception_err(env1->exception_index, env1->error_code);
+ raise_exception_err_env(env1, env1->exception_index, env1->error_code);
#else
cpu_loop_exit(env1);
#endif
@@ -628,47 +629,3 @@ int cpu_signal_handler(int host_signum, void *pinfo,
#error host CPU specific signal handler needed
#endif
-
-#if defined(TARGET_I386)
-
-void cpu_x86_load_seg(CPUX86State *s, int seg_reg, int selector)
-{
- CPUX86State *saved_env;
-
- saved_env = env;
- env = s;
- if (!(env->cr[0] & CR0_PE_MASK) || (env->eflags & VM_MASK)) {
- selector &= 0xffff;
- cpu_x86_load_seg_cache(env, seg_reg, selector,
- (selector << 4), 0xffff, 0);
- } else {
- helper_load_seg(seg_reg, selector);
- }
- env = saved_env;
-}
-
-void cpu_x86_fsave(CPUX86State *s, target_ulong ptr, int data32)
-{
- CPUX86State *saved_env;
-
- saved_env = env;
- env = s;
-
- helper_fsave(ptr, data32);
-
- env = saved_env;
-}
-
-void cpu_x86_frstor(CPUX86State *s, target_ulong ptr, int data32)
-{
- CPUX86State *saved_env;
-
- saved_env = env;
- env = s;
-
- helper_frstor(ptr, data32);
-
- env = saved_env;
-}
-
-#endif /* TARGET_I386 */