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 <jan.kis...@siemens.com> >> --- >> >> 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