[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 09/13] target-openrisc: Add CPU which neglects C
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 09/13] target-openrisc: Add CPU which neglects Carry and Overflow Flag |
Date: |
Wed, 30 Oct 2013 11:14:01 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
On 10/29/2013 12:04 PM, Sebastian Macke wrote:
> The carry and overflag and the instructions l.addc and l.addic
> are never used in the toolchain. Linux and gcc compiled software
> don't need them.
Really? That's quite surprising.
> To speed up the emulation a cpu was added which
> neglects the flags for l.addi, l.add, l.sub and
> generates an illegal instruction error for l.addic and l.addc
I'm somewhat shocked that l.addc is never used. To me that points
to a missed opportunity in the compiler.
It would be much better to simply improve handling of these bits.
In a previous patch set you broke out SR[F] to its own variable;
I suggest that you do the same for SR[CY] and SR[OV].
If you can implement add et al without branches, the TCG optimizer
will be able to do a good job eliminating shadowed computation.
A good example to follow here is the ARM implementation. Have a
look at the gen_add_CC and gen_sub_CC functions especially. Note
that the overflow bit is stored in bit 31 of cpu_VF and the other
bits of cpu_VF are ignored.
r~
- [Qemu-devel] [PATCH 07/13] target-openrisc: Correct l.cmov conditional check, (continued)
- [Qemu-devel] [PATCH 11/13] target-openrisc: use jmp_pc as flag variable for branches, Sebastian Macke, 2013/10/29
- Re: [Qemu-devel] [PATCH 11/13] target-openrisc: use jmp_pc as flag variable for branches, Richard Henderson, 2013/10/30
- Re: [Qemu-devel] [PATCH 11/13] target-openrisc: use jmp_pc as flag variable for branches, Sebastian Macke, 2013/10/30
- Re: [Qemu-devel] [PATCH 11/13] target-openrisc: use jmp_pc as flag variable for branches, Richard Henderson, 2013/10/30
- Re: [Qemu-devel] [PATCH 11/13] target-openrisc: use jmp_pc as flag variable for branches, Richard Henderson, 2013/10/30
- Re: [Qemu-devel] [PATCH 11/13] target-openrisc: use jmp_pc as flag variable for branches, Sebastian Macke, 2013/10/30
- Re: [Qemu-devel] [PATCH 11/13] target-openrisc: use jmp_pc as flag variable for branches, Richard Henderson, 2013/10/30
- Re: [Qemu-devel] [PATCH 11/13] target-openrisc: use jmp_pc as flag variable for branches, Sebastian Macke, 2013/10/30