/[qemu]/qemu/target-arm/op_helper.c
ViewVC logotype

Diff of /qemu/target-arm/op_helper.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by bellard, Sat Apr 23 18:21:13 2005 UTC revision 1.4 by bellard, Sat Nov 26 10:38:39 2005 UTC
# Line 172  void do_vfp_get_fpscr(void) Line 172  void do_vfp_get_fpscr(void)
172      i = get_float_exception_flags(&env->vfp.fp_status);      i = get_float_exception_flags(&env->vfp.fp_status);
173      T0 |= vfp_exceptbits_from_host(i);      T0 |= vfp_exceptbits_from_host(i);
174  }  }
175    
176    #if !defined(CONFIG_USER_ONLY)
177    
178    #define MMUSUFFIX _mmu
179    #define GETPC() (__builtin_return_address(0))
180    
181    #define SHIFT 0
182    #include "softmmu_template.h"
183    
184    #define SHIFT 1
185    #include "softmmu_template.h"
186    
187    #define SHIFT 2
188    #include "softmmu_template.h"
189    
190    #define SHIFT 3
191    #include "softmmu_template.h"
192    
193    /* try to fill the TLB and return an exception if error. If retaddr is
194       NULL, it means that the function was called in C code (i.e. not
195       from generated code or from helper.c) */
196    /* XXX: fix it to restore all registers */
197    void tlb_fill (target_ulong addr, int is_write, int is_user, void *retaddr)
198    {
199        TranslationBlock *tb;
200        CPUState *saved_env;
201        target_phys_addr_t pc;
202        int ret;
203    
204        /* XXX: hack to restore env in all cases, even if not called from
205           generated code */
206        saved_env = env;
207        env = cpu_single_env;
208        ret = cpu_arm_handle_mmu_fault(env, addr, is_write, is_user, 1);
209        if (__builtin_expect(ret, 0)) {
210            if (retaddr) {
211                /* now we have a real cpu fault */
212                pc = (target_phys_addr_t)retaddr;
213                tb = tb_find_pc(pc);
214                if (tb) {
215                    /* the PC is inside the translated code. It means that we have
216                       a virtual CPU fault */
217                    cpu_restore_state(tb, env, pc, NULL);
218                }
219            }
220            raise_exception(env->exception_index);
221        }
222        env = saved_env;
223    }
224    
225    #endif

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26