From d2ff737812184d8f184e6c8964f7e002a31b50ed Mon Sep 17 00:00:00 2001 From: Paulo Andrade Date: Fri, 20 Apr 2018 15:01:44 -0300 Subject: [PATCH] HPPA: Correct wrong regarg_p check If argument registers are in incremental order in the global _rvs vector, the check if a register argument is reversed. Adapted from a regression found in sparc 64. --- lib/jit_hppa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jit_hppa.c b/lib/jit_hppa.c index bb7182746..558524b41 100644 --- a/lib/jit_hppa.c +++ b/lib/jit_hppa.c @@ -743,7 +743,7 @@ _jit_regarg_p(jit_state_t *_jit, jit_node_t *node, jit_int32_t regno) spec = jit_class(_rvs[regno].spec); if (spec & jit_class_arg) { if (spec & jit_class_gpr) { - regno = _R26 - regno; + regno -= _R23; if (regno >= 0 && regno < node->v.w) return (1); }