Re: [Qemu-devel] [PATCH 21/26] target-xtensa: implement unaligned exception option

2011-05-24 Thread Richard Henderson
On 05/23/2011 04:20 PM, Max Filippov wrote: > I probably just don't get what you call 'out-of-line'. In fact > do_unaligned_access will be called for every unaligned access, and > alignment condition will be checked for every access. It just happens > in other place. Does it have more chances to be

Re: [Qemu-devel] [PATCH 21/26] target-xtensa: implement unaligned exception option

2011-05-23 Thread Max Filippov
> > This is also done by gen_load_store_alignment. > > Does it really worth copying part of this logic to do_unaligned_access just > > to use ALIGNED_ONLY framework? > > Yes, because it is done out-of-line, as a part of the TLB load slow path. I probably just don't get what you call 'out-of-line

Re: [Qemu-devel] [PATCH 21/26] target-xtensa: implement unaligned exception option

2011-05-23 Thread Richard Henderson
On 05/22/2011 01:12 PM, Max Filippov wrote: > This is also done by gen_load_store_alignment. > Does it really worth copying part of this logic to do_unaligned_access just > to use ALIGNED_ONLY framework? Yes, because it is done out-of-line, as a part of the TLB load slow path. r~

Re: [Qemu-devel] [PATCH 21/26] target-xtensa: implement unaligned exception option

2011-05-22 Thread Max Filippov
> > There are three alignment possibilities for xtensa: no unaligned > > exception, unaligned exception and hardware alignment. In the first > > case unaligned access silently goes to aligned address. It looks like > > it cannot be done via do_unaligned_access, can it? In the third case > > most un

Re: [Qemu-devel] [PATCH 21/26] target-xtensa: implement unaligned exception option

2011-05-22 Thread Richard Henderson
On 05/22/2011 05:10 AM, Max Filippov wrote: > There are three alignment possibilities for xtensa: no unaligned > exception, unaligned exception and hardware alignment. In the first > case unaligned access silently goes to aligned address. It looks like > it cannot be done via do_unaligned_access, c

Re: [Qemu-devel] [PATCH 21/26] target-xtensa: implement unaligned exception option

2011-05-22 Thread Max Filippov
> > +static void gen_load_store_alignment(DisasContext *dc, int shift, TCGv_i32 > > addr) > > +{ > > +TCGv_i32 tmp = tcg_temp_local_new_i32(); > > +tcg_gen_mov_i32(tmp, addr); > > +tcg_gen_andi_i32(addr, addr, ~0 << shift); > > +if (option_enabled(dc, XTENSA_OPTION_UNALIGNED_EXCEPT

Re: [Qemu-devel] [PATCH 21/26] target-xtensa: implement unaligned exception option

2011-05-19 Thread Richard Henderson
On 05/17/2011 03:32 PM, Max Filippov wrote: > See ISA, 4.4.4 for details. > > Correct (aligned as per ISA) address for unaligned access is generated > in case this option is not enabled. > > Signed-off-by: Max Filippov > --- > target-xtensa/translate.c | 33 +++-- >

[Qemu-devel] [PATCH 21/26] target-xtensa: implement unaligned exception option

2011-05-17 Thread Max Filippov
See ISA, 4.4.4 for details. Correct (aligned as per ISA) address for unaligned access is generated in case this option is not enabled. Signed-off-by: Max Filippov --- target-xtensa/translate.c | 33 +++-- 1 files changed, 31 insertions(+), 2 deletions(-) diff --gi