Re: [Qemu-devel] [PATCH 02/17] lm32: translation routines

2011-03-16 Thread Alexander Graf
On 17.03.2011, at 00:08, Michael Walle wrote: > Am Freitag 11 März 2011, 06:57:18 schrieben Sie: >> On 17.02.2011, at 23:51, Michael Walle wrote: >>> Am Samstag 12 Februar 2011, 07:49:52 schrieb Blue Swirl: > That said, IMHO the best handling of unknown opcodes would be to kill > the

Re: [Qemu-devel] [PATCH 02/17] lm32: translation routines

2011-03-16 Thread Michael Walle
Am Freitag 11 März 2011, 06:57:18 schrieben Sie: > On 17.02.2011, at 23:51, Michael Walle wrote: > > Am Samstag 12 Februar 2011, 07:49:52 schrieb Blue Swirl: > >>> That said, IMHO the best handling of unknown opcodes would be to kill > >>> the VM. > >> > >> In this case it should be OK. Alternativ

Re: [Qemu-devel] [PATCH 02/17] lm32: translation routines

2011-03-10 Thread Alexander Graf
On 17.02.2011, at 23:51, Michael Walle wrote: > Am Samstag 12 Februar 2011, 07:49:52 schrieb Blue Swirl: >>> That said, IMHO the best handling of unknown opcodes would be to kill the >>> VM. >> >> In this case it should be OK. Alternatively the VM could be halted, so >> that instead of restartin

Re: [Qemu-devel] [PATCH 02/17] lm32: translation routines

2011-02-17 Thread Michael Walle
Am Samstag 12 Februar 2011, 07:49:52 schrieb Blue Swirl: > > That said, IMHO the best handling of unknown opcodes would be to kill the > > VM. > > In this case it should be OK. Alternatively the VM could be halted, so > that instead of restarting QEMU, only system_reset needs to be issued. > This

[Qemu-devel] [PATCH 02/17] lm32: translation routines

2011-02-17 Thread Michael Walle
This patch adds the main translation routine. All opcodes of the LatticeMico32 processor are supported and translated to TCG ops. Signed-off-by: Michael Walle --- target-lm32/helper.c | 259 + target-lm32/lm32-decode.h | 78 +++ target-lm32/translate.c | 1317 ++

Re: [Qemu-devel] [PATCH 02/17] lm32: translation routines

2011-02-12 Thread Michael Walle
Am Freitag 11 Februar 2011, 22:42:28 schrieb Blue Swirl: > > +/* Convenient binary macros */ > > +#define HEX__(n) 0x##n##LU > > +#define B8__(x) (((x&0x000FLU) ? 1 : 0) \ > > + + ((x&0x00F0LU) ? 2 : 0) \ > > + + ((x&0x0F00LU) ? 4 : 0) \ > > +

Re: [Qemu-devel] [PATCH 02/17] lm32: translation routines

2011-02-11 Thread Blue Swirl
On Sat, Feb 12, 2011 at 12:23 AM, Michael Walle wrote: > Hi, > > Regarding all the comments on raising an exception. The real hardware does > only support a few basic exception (like div by zero or interrupts and system > calls). There is no checking if an instruction is supported or not. If an >

Re: [Qemu-devel] [PATCH 02/17] lm32: translation routines

2011-02-11 Thread Michael Walle
Hi, Regarding all the comments on raising an exception. The real hardware does only support a few basic exception (like div by zero or interrupts and system calls). There is no checking if an instruction is supported or not. If an illegal opcode (like divu if the hardware divider is not enabled

[Qemu-devel] [PATCH 02/17] lm32: translation routines

2011-02-10 Thread Michael Walle
This patch adds the main translation routine. All opcodes of the LatticeMico32 processor are supported and translated to TCG ops. Signed-off-by: Michael Walle --- target-lm32/helper.c | 259 + target-lm32/lm32-decode.h | 78 +++ target-lm32/translate.c | 1315 ++

Re: [Qemu-devel] [PATCH 02/17] lm32: translation routines

2011-02-08 Thread Michael Walle
Am Dienstag 08 Februar 2011, 18:32:57 schrieb Richard Henderson: > On 01/30/2011 04:30 PM, Michael Walle wrote: > > +if (dc->format == OP_FMT_RI) { > > +tcg_gen_brcondi_tl(cond, cpu_R[rY], sign_extend(dc->imm16, 16), > > l1); +} else { > > +tcg_gen_brcond_tl(cond, cpu_R[rY],

Re: [Qemu-devel] [PATCH 02/17] lm32: translation routines

2011-02-08 Thread Edgar E. Iglesias
On Tue, Feb 08, 2011 at 09:32:57AM -0800, Richard Henderson wrote: > On 01/30/2011 04:30 PM, Michael Walle wrote: > > +if (dc->format == OP_FMT_RI) { > > +tcg_gen_brcondi_tl(cond, cpu_R[rY], sign_extend(dc->imm16, 16), > > l1); > > +} else { > > +tcg_gen_brcond_tl(cond, cpu

Re: [Qemu-devel] [PATCH 02/17] lm32: translation routines

2011-02-08 Thread Richard Henderson
On 01/30/2011 04:30 PM, Michael Walle wrote: > +if (dc->format == OP_FMT_RI) { > +tcg_gen_brcondi_tl(cond, cpu_R[rY], sign_extend(dc->imm16, 16), l1); > +} else { > +tcg_gen_brcond_tl(cond, cpu_R[rY], cpu_R[rZ], l1); > +} > +tcg_gen_movi_tl(cpu_R[rX], 0); > +tcg_

[Qemu-devel] [PATCH 02/17] lm32: translation routines

2011-01-30 Thread Michael Walle
This patch adds the main translation routine. All opcodes of the LatticeMico32 processor are supported and translated to TCG ops. Signed-off-by: Michael Walle --- target-lm32/helper.c | 259 + target-lm32/lm32-decode.h | 78 +++ target-lm32/translate.c | 1331 ++