[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 07/20] tcg-arm: Fold epilogue into INDEX_op_e
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v3 07/20] tcg-arm: Fold epilogue into INDEX_op_exit_tb |
Date: |
Thu, 28 Mar 2013 16:05:41 +0000 |
On 28 March 2013 15:32, Richard Henderson <address@hidden> wrote:
> The epilogue on ARM is one pop instruction, that pops the return
> address into PC. Avoid the jump to jump for this case. Use the
> standard movi32 routine for loading the return value if it's easy.
> @@ -2025,8 +2023,7 @@ static void tcg_target_qemu_prologue(TCGContext *s)
> tcg_out_mov(s, TCG_TYPE_PTR, TCG_AREG0, tcg_target_call_iarg_regs[0]);
>
> tcg_out_bx(s, COND_AL, tcg_target_call_iarg_regs[1]);
> - tb_ret_addr = s->code_ptr;
>
> /* ldmia sp!, { r4 - r12, pc } */
> - tcg_out32(s, (COND_AL << 28) | 0x08bd9ff0);
> + tb_pop_ret = (COND_AL << 28) | 0x08bd9ff0;
> }
Why are we using a variable when it's always constant?
Also, please add a comment to the bottom of the qemu_prologue()
saying something like
/* We never return here; we always return directly from generated
* code to our caller.
*/
thanks
-- PMM
- [Qemu-devel] [PATCH v3 04/20] tcg-arm: Use tcg_out_dat_rIN for compares, (continued)
[Qemu-devel] [PATCH v3 03/20] tcg-arm: Allow constant first argument to sub, Richard Henderson, 2013/03/28
[Qemu-devel] [PATCH v3 06/20] tcg-arm: Improve constant generation, Richard Henderson, 2013/03/28
[Qemu-devel] [PATCH v3 07/20] tcg-arm: Fold epilogue into INDEX_op_exit_tb, Richard Henderson, 2013/03/28
- Re: [Qemu-devel] [PATCH v3 07/20] tcg-arm: Fold epilogue into INDEX_op_exit_tb,
Peter Maydell <=
[Qemu-devel] [PATCH v3 08/20] tcg-arm: Implement deposit for armv7, Richard Henderson, 2013/03/28
[Qemu-devel] [PATCH v3 09/20] tcg-arm: Implement division instructions, Richard Henderson, 2013/03/28
[Qemu-devel] [PATCH v3 10/20] tcg-arm: Use TCG_REG_TMP name for the tcg temporary, Richard Henderson, 2013/03/28
[Qemu-devel] [PATCH v3 11/20] tcg-arm: Use R12 for the tcg temporary, Richard Henderson, 2013/03/28
[Qemu-devel] [PATCH v3 12/20] tcg-arm: Cleanup multiply subroutines, Richard Henderson, 2013/03/28
[Qemu-devel] [PATCH v3 13/20] tcg-arm: Cleanup tcg_out_goto_label, Richard Henderson, 2013/03/28