~vcs-imports/qemu/git

« back to all changes in this revision

Viewing changes to target-cris/translate.c

  • Committer: edgar_igl
  • Date: 2008-10-08 14:22:17 UTC
  • Revision ID: git-v1:cddffe373928480e501f4d9b28b427e157b38f7d
CRIS: Partial EXS reg support and fixes for SPC.

* Add partial support for the EXS (exception status) register.
* Update SPC after each singlestep exception.
* Remove special treatment of break 8.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5448 c046a42c-6fe2-441c-8c8c-71466251a162

Show diffs side-by-side

added added

removed removed

Lines of Context:
196
196
                tcg_gen_mov_tl(tn, tcg_const_tl(0));
197
197
        else if (r == PR_VR)
198
198
                tcg_gen_mov_tl(tn, tcg_const_tl(32));
199
 
        else if (r == PR_EXS) {
200
 
                printf("read from EXS!\n");
201
 
                tcg_gen_mov_tl(tn, cpu_PR[r]);
202
 
        }
203
199
        else if (r == PR_EDA) {
204
200
                printf("read from EDA!\n");
205
201
                tcg_gen_mov_tl(tn, cpu_PR[r]);
2811
2807
                        DIS(fprintf(logfile, "break %d\n", dc->op1));
2812
2808
                        cris_evaluate_flags (dc);
2813
2809
                        /* break.  */
2814
 
                        if (dc->op1 == 8) {
2815
 
                                /* TODO: Find out whats special with brk8.  */
2816
 
                                tcg_gen_movi_tl(env_pc, dc->pc);
2817
 
                        }
2818
 
                        else
2819
 
                                tcg_gen_movi_tl(env_pc, dc->pc + 2);
 
2810
                        tcg_gen_movi_tl(env_pc, dc->pc + 2);
2820
2811
 
2821
2812
                        /* Breaks start at 16 in the exception vector.  */
2822
2813
                        t_gen_mov_env_TN(trap_vector, 
3005
2996
                cris_evaluate_flags (dc);
3006
2997
                t_gen_mov_env_TN(trap_vector, tcg_const_tl(3));
3007
2998
                tcg_gen_movi_tl(env_pc, dc->pc + insn_len);
 
2999
                tcg_gen_movi_tl(cpu_PR[PR_SPC], dc->pc + insn_len);
3008
3000
                t_gen_raise_exception(EXCP_BREAK);
3009
3001
                gen_set_label(l1);
3010
3002
        }