qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] tcg-i386: Introduce limited deposit support


From: Jan Kiszka
Subject: Re: [Qemu-devel] [PATCH v2] tcg-i386: Introduce limited deposit support
Date: Thu, 29 Sep 2011 17:19:41 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

On 2011-09-29 16:58, Richard Henderson wrote:
> On 09/29/2011 04:31 AM, Jan Kiszka wrote:
>> x86 cannot provide an optimized generic deposit implementation. But at
>> least for a few special cases, namely for writing bits 0..7, 8..15, and
>> 0..15, versions using only a single instruction are feasible.
>> Introducing such limited support improves emulating 16-bit x86 code on
>> x86, but also rarer cases where 32-bit or 64-bit code accesses bytes or
>> words.
>>
>> Signed-off-by: Jan Kiszka <address@hidden>
>> ---
>>
>> Changes in v2:
>>  - introduce restricting predicates TCG_TARGET_deposit_i32/64_valid
>>    to decide if deposit support can be used
>>  - express register constraints via new 'Q' symbol
> 
> That's what I had in mind, yes.
> 
> The only thing that's missing now is a default version of 
> 
>> +#define TCG_TARGET_deposit_i32_valid(ofs, len) \
>> +    (((ofs) == 0 && (len) == 8) || ((ofs) == 8 && (len) == 8) || \
>> +     ((ofs) == 0 && (len) == 16))
>> +#define TCG_TARGET_deposit_i64_valid    TCG_TARGET_deposit_i32_valid
> 
> These.

Interestingly, that didn't break the build here. Seems like gcc became
too smart to report this.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux



reply via email to

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