[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 08/16] target-or32: Add instruction tanslatio
From: |
Wei-Ren Chen |
Subject: |
Re: [Qemu-devel] [PATCH v6 08/16] target-or32: Add instruction tanslation |
Date: |
Tue, 26 Jun 2012 17:14:07 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
> > 0xffffffff is -1, 0x80000000 is -MAX.
> > -1/-MAX ?will raise a exception, and I've handle this.
> > -MAX/-1 ?will get a MAX, for max value of a register is -(-MAX)-1, so,
> > it overflowed, I didn't handle this.
>
> Actually you did this with three brcondi in the else branch. The only thing
> left is not to crash in case guest doesn't want range exception.
So Jia need to do something like below
/*
* if ((%ra == 0xffffffff || %rb == 0x80000000) && (sr_ove == 0))
* goto lab3;
*
* lab3:
* compute %ra/%rb but do NOT cause host failed?
*/
tcg_gen_ori_tl(cpu_sr, cpu_sr, SR_OV);
tcg_gen_ori_tl(cpu_sr, cpu_sr, SR_CY);
tcg_gen_brcondi_tl(TCG_COND_NE, sr_ove, SR_OVE, lab3);
gen_exception(dc, EXCP_RANGE);
gen_set_label(lab2);
tcg_gen_div_tl(cpu_R[rd], cpu_R[ra], cpu_R[rb]);
gen_set_label(lab3);
???
How can this be done?
Regards,
chenwj
--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj
- [Qemu-devel] [PATCH v6 04/16] target-or32: Add interrupt support, (continued)
- [Qemu-devel] [PATCH v6 04/16] target-or32: Add interrupt support, Jia Liu, 2012/06/20
- [Qemu-devel] [PATCH v6 05/16] target-or32: Add exception support, Jia Liu, 2012/06/20
- [Qemu-devel] [PATCH v6 06/16] target-or32: Add int instruction helpers, Jia Liu, 2012/06/20
- [Qemu-devel] [PATCH v6 07/16] target-or32: Add float instruction helpers, Jia Liu, 2012/06/20
- [Qemu-devel] [PATCH v6 08/16] target-or32: Add instruction tanslation, Jia Liu, 2012/06/20
- Re: [Qemu-devel] [PATCH v6 08/16] target-or32: Add instruction tanslation, Max Filippov, 2012/06/21
- Re: [Qemu-devel] [PATCH v6 08/16] target-or32: Add instruction tanslation, Jia Liu, 2012/06/24
- Re: [Qemu-devel] [PATCH v6 08/16] target-or32: Add instruction tanslation, Max Filippov, 2012/06/25
- Re: [Qemu-devel] [PATCH v6 08/16] target-or32: Add instruction tanslation, Jia Liu, 2012/06/25
- Re: [Qemu-devel] [PATCH v6 08/16] target-or32: Add instruction tanslation, Max Filippov, 2012/06/26
- Re: [Qemu-devel] [PATCH v6 08/16] target-or32: Add instruction tanslation,
Wei-Ren Chen <=
- Re: [Qemu-devel] [PATCH v6 08/16] target-or32: Add instruction tanslation, Max Filippov, 2012/06/26
[Qemu-devel] [PATCH v6 09/16] target-or32: Add PIC support, Jia Liu, 2012/06/20
[Qemu-devel] [PATCH v6 12/16] target-or32: Add system instructions, Jia Liu, 2012/06/20
[Qemu-devel] [PATCH v6 13/16] target-or32: Add gdb stub, Jia Liu, 2012/06/20
[Qemu-devel] [PATCH v6 14/16] target-or32: Add linux syscall, signal and termbits, Jia Liu, 2012/06/20
[Qemu-devel] [PATCH v6 15/16] target-or32: Add linux user support, Jia Liu, 2012/06/20
[Qemu-devel] [PATCH v6 16/16] target-or32: Add testcases, Jia Liu, 2012/06/20
[Qemu-devel] [PATCH v6 11/16] target-or32: Add a IIS dummy board, Jia Liu, 2012/06/20