qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Marek Vasut
Subject: Re: [Qemu-devel] [PATCH 2/7] nios2: Add architecture emulation support
Date: Wed, 19 Oct 2016 00:05:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0

On 10/18/2016 10:44 PM, Richard Henderson wrote:
> On 10/18/2016 11:32 AM, Marek Vasut wrote:
>> But the instruction encoding does, so I can use the field from the
>> instruction to directly index the register array.
> 
> Well, no, you can't.
> 
> In fact, it would be cleaner to have multiple arrays -- one for general
> registers and one for control registers -- that you *could* actually
> directly index.  There are only two instructions that touch the control
> registers, rdctl and wrctl.  In those instructions you're having to
> explicitly add 32.

Well yes, that's true.

>> Thanks, I hope this is fixed now, although I mostly special-case the
>> R_ZERO handling throughout the code. Any writes to R_ZERO are now
>> ignored and any usage is converted to mov/movi instructions where
>> applicable.
> 
> We've done that in the past, but in the end it is much cleaner to
> minimize the number of places in which you have to check for R_ZERO.

Isn't it a bit more performant if you generate as little TCG
instructions as possible ?

> r~


-- 
Best regards,
Marek Vasut



reply via email to

[Prev in Thread] Current Thread [Next in Thread]