• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisiónb35aec8597e86911d5553c94769f914a52a8b389 (tree)
Tiempo2019-03-08 10:43:12
AutorRichard Henderson <richard.henderson@lina...>
CommiterRichard Henderson

Log Message

target/hppa: Optimize blr r0,rn

We can eliminate an extra TB in this case, which merely
loads a "return address" into rn.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Cambiar Resumen

Diferencia incremental

--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -3488,12 +3488,16 @@ static bool trans_b_gate(DisasContext *ctx, arg_b_gate *a)
34883488
34893489 static bool trans_blr(DisasContext *ctx, arg_blr *a)
34903490 {
3491- TCGv_reg tmp = get_temp(ctx);
3492-
3493- tcg_gen_shli_reg(tmp, load_gpr(ctx, a->x), 3);
3494- tcg_gen_addi_reg(tmp, tmp, ctx->iaoq_f + 8);
3495- /* The computation here never changes privilege level. */
3496- return do_ibranch(ctx, tmp, a->l, a->n);
3491+ if (a->x) {
3492+ TCGv_reg tmp = get_temp(ctx);
3493+ tcg_gen_shli_reg(tmp, load_gpr(ctx, a->x), 3);
3494+ tcg_gen_addi_reg(tmp, tmp, ctx->iaoq_f + 8);
3495+ /* The computation here never changes privilege level. */
3496+ return do_ibranch(ctx, tmp, a->l, a->n);
3497+ } else {
3498+ /* BLR R0,RX is a good way to load PC+8 into RX. */
3499+ return do_dbranch(ctx, ctx->iaoq_f + 8, a->l, a->n);
3500+ }
34973501 }
34983502
34993503 static bool trans_bv(DisasContext *ctx, arg_bv *a)