Re: [Qemu-devel] [PATCH V3 2/7] nios2: Add architecture emulation support

2016-10-20 Thread Marek Vasut
On 10/20/2016 07:05 AM, Richard Henderson wrote: > On 10/19/2016 08:01 PM, Marek Vasut wrote: >>> > You might like 0xfffc better, but that does require that you count >>> > f's appropriately for the type. That's why I like -4: it's obvious >>> (or >>> > should be) that it masks to a multiple o

Re: [Qemu-devel] [PATCH V3 2/7] nios2: Add architecture emulation support

2016-10-19 Thread Richard Henderson
On 10/19/2016 08:01 PM, Marek Vasut wrote: > You might like 0xfffc better, but that does require that you count > f's appropriately for the type. That's why I like -4: it's obvious (or > should be) that it masks to a multiple of 4, and type promotion extends > bits to the left as needed for

Re: [Qemu-devel] [PATCH V3 2/7] nios2: Add architecture emulation support

2016-10-19 Thread Marek Vasut
On 10/19/2016 05:50 PM, Richard Henderson wrote: > On 10/18/2016 08:23 PM, Marek Vasut wrote: >>> The documentation appears less than clear about whether or not loads >>> into r0 recognize exceptions from the load, as opposed to simply not >>> modifying r0. >> >> What about [1] page 10, quote: >> >

Re: [Qemu-devel] [PATCH V3 2/7] nios2: Add architecture emulation support

2016-10-19 Thread Richard Henderson
On 10/18/2016 08:23 PM, Marek Vasut wrote: The documentation appears less than clear about whether or not loads into r0 recognize exceptions from the load, as opposed to simply not modifying r0. What about [1] page 10, quote: The Nios II architecture provides thirty-two 32-bit general-purpose

Re: [Qemu-devel] [PATCH V3 2/7] nios2: Add architecture emulation support

2016-10-18 Thread Marek Vasut
On 10/19/2016 01:04 AM, Richard Henderson wrote: > On 10/18/2016 02:50 PM, Marek Vasut wrote: >> +/* Special R-Type instruction opcode */ >> +#define INSN_R_TYPE 0x3A >> + >> +/* I-Type instruction parsing */ >> +#define I_TYPE(instr, code) \ >> +struct {

Re: [Qemu-devel] [PATCH V3 2/7] nios2: Add architecture emulation support

2016-10-18 Thread Richard Henderson
On 10/18/2016 02:50 PM, Marek Vasut wrote: +/* Special R-Type instruction opcode */ +#define INSN_R_TYPE 0x3A + +/* I-Type instruction parsing */ +#define I_TYPE(instr, code) \ +struct { \ +uint8_t op; \ +union {