Fixed unintentional reversion of floating point support configuration
[qemu/openrisc.git] / target-openrisc / op_helper.c
blobeb6f08c600b3a0d87bb01d68bee66c8333de530b
1 /*
2 * OpenRISC helper routines
4 * Copyright (c) 2009 Stuart Brady <stuart.brady@gmail.com>
5 * Copyright (c) 2009 Laurent Desnogues
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
21 #include "exec.h"
23 #if !defined(CONFIG_USER_ONLY)
25 #define MMUSUFFIX _mmu
27 #define SHIFT 0
28 #include "softmmu_template.h"
30 #define SHIFT 1
31 #include "softmmu_template.h"
33 #define SHIFT 2
34 #include "softmmu_template.h"
36 #define SHIFT 3
37 #include "softmmu_template.h"
39 /* XXX: tempo */
40 void tlb_fill(target_ulong addr, int is_write, int mmu_idx, void *retaddr)
42 CPUState *saved_env;
43 int ret;
44 target_ulong phys_addr;
45 int prot;
47 /* XXX: hack to restore env in all cases, even if not called from
48 generated code */
49 saved_env = env;
50 env = cpu_single_env;
52 /* XXX: flat mapping for the moment... */
53 phys_addr = addr;
54 prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
55 ret = tlb_set_page(env, addr & TARGET_PAGE_MASK, phys_addr, prot, mmu_idx, 1);
57 env = saved_env;
60 #endif