[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 0/3] tcg: enhance code generation quality for
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v5 0/3] tcg: enhance code generation quality for qemu_ld/st IRs |
Date: |
Tue, 09 Oct 2012 18:55:58 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 |
Il 09/10/2012 18:19, Aurelien Jarno ha scritto:
>>> > >
>> >
>> > Instead of calling the MMU helper with an additional argument (7), and
>> > then jump back (8) to the next code (4), what about pushing the address
>> > of the next code (4) on the stack and use a jmp instead of the call. In
>> > that case you don't need the extra argument to the helpers.
>> >
> Maybe it wasn't very clear. This is based on the fact that call is
> basically push %rip + jmp. Therefore we can fake the return address by
> putting the value we want, here the address of the next code. This mean
> that we don't need to pass the extra argument to the helper for the
> return address, as GET_PC() would work correctly (it basically reads the
> return address on the stack).
>
> For other architectures, it might not be a push, but rather a move to
> link register, basically put the return address where the calling
> convention asks for.
>
> OTOH I just realized it only works if the end of the slow path (moving
> the value from the return address to the correct register). It might be
> something doable.
Branch predictors will not oldschool tricks like this one. :)
Paolo
- [Qemu-devel] [PATCH v5 0/3] tcg: enhance code generation quality for qemu_ld/st IRs, Yeongkyoon Lee, 2012/10/09
- [Qemu-devel] [PATCH v5 2/3] tcg: Add declarations and templates of extended MMU helpers, Yeongkyoon Lee, 2012/10/09
- [Qemu-devel] [PATCH v5 1/3] configure: Add CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization, Yeongkyoon Lee, 2012/10/09
- [Qemu-devel] [PATCH v5 3/3] tcg: Optimize qemu_ld/st by generating slow paths at the end of a block, Yeongkyoon Lee, 2012/10/09
- Re: [Qemu-devel] [PATCH v5 0/3] tcg: enhance code generation quality for qemu_ld/st IRs, Aurelien Jarno, 2012/10/09
- Re: [Qemu-devel] [PATCH v5 0/3] tcg: enhance code generation quality for qemu_ld/st IRs, Aurelien Jarno, 2012/10/09
- Re: [Qemu-devel] [PATCH v5 0/3] tcg: enhance code generation quality for qemu_ld/st IRs,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH v5 0/3] tcg: enhance code generation quality for qemu_ld/st IRs, Aurelien Jarno, 2012/10/09
- Re: [Qemu-devel] [PATCH v5 0/3] tcg: enhance code generation quality for qemu_ld/st IRs, Yeongkyoon Lee, 2012/10/10
- Re: [Qemu-devel] [PATCH v5 0/3] tcg: enhance code generation quality for qemu_ld/st IRs, Aurelien Jarno, 2012/10/10
- Re: [Qemu-devel] [PATCH v5 0/3] tcg: enhance code generation quality for qemu_ld/st IRs, Yeongkyoon Lee, 2012/10/10
- Re: [Qemu-devel] [PATCH v5 0/3] tcg: enhance code generation quality for qemu_ld/st IRs, Yeongkyoon Lee, 2012/10/10