[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] ppc: Fix 'calli' when floating-point arguments are passed
From: |
Paul Cercueil |
Subject: |
[PATCH] ppc: Fix 'calli' when floating-point arguments are passed |
Date: |
Tue, 23 Aug 2022 17:15:43 +0200 |
When varargs are used, the condition register bit 6 must be set to 1 to
specify that one or more arguments are passed in the floating-point
registers.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
lib/jit_ppc-cpu.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lib/jit_ppc-cpu.c b/lib/jit_ppc-cpu.c
index 8f89fa5..ff871e3 100644
--- a/lib/jit_ppc-cpu.c
+++ b/lib/jit_ppc-cpu.c
@@ -3258,9 +3258,12 @@ _calli(jit_state_t *_jit, jit_word_t i0
# if _CALL_SYSV
jit_word_t d;
d = (i0 - _jit->pc.w) & ~3;
- if (can_sign_extend_jump_p(d))
- BL(d);
- else
+ if (can_sign_extend_jump_p(d)) {
+ /* Tell double arguments were passed in registers. */
+ if (varargs)
+ CREQV(6, 6, 6);
+ BL(d);
+ } else
# endif
{
movi(_R12_REGNO, i0);
--
2.35.1
- Check results on PowerPC, Paul Cercueil, 2022/08/18
- Re: Check results on PowerPC, Paulo César Pereira de Andrade, 2022/08/18
- Re: Check results on PowerPC, Paul Cercueil, 2022/08/19
- Re: Check results on PowerPC, Paulo César Pereira de Andrade, 2022/08/19
- Re: Check results on PowerPC, Paul Cercueil, 2022/08/20
- Re: Check results on PowerPC, Paulo César Pereira de Andrade, 2022/08/22
- Re: Check results on PowerPC, Paulo César Pereira de Andrade, 2022/08/22
- Re: Check results on PowerPC, Paul Cercueil, 2022/08/23
- Re: Check results on PowerPC, Paulo César Pereira de Andrade, 2022/08/23
- [PATCH] ppc: Fix 'calli' when floating-point arguments are passed,
Paul Cercueil <=
- Re: [PATCH] ppc: Fix 'calli' when floating-point arguments are passed, Paul Cercueil, 2022/08/23
- Re: [PATCH] ppc: Fix 'calli' when floating-point arguments are passed, Paulo César Pereira de Andrade, 2022/08/23
- Re: [PATCH] ppc: Fix 'calli' when floating-point arguments are passed, Paul Cercueil, 2022/08/23
- Re: [PATCH] ppc: Fix 'calli' when floating-point arguments are passed, Paulo César Pereira de Andrade, 2022/08/23
- Re: [PATCH] ppc: Fix 'calli' when floating-point arguments are passed, Paul Cercueil, 2022/08/23
- Re: [PATCH] ppc: Fix 'calli' when floating-point arguments are passed, Paulo César Pereira de Andrade, 2022/08/23
- Re: [PATCH] ppc: Fix 'calli' when floating-point arguments are passed, Paulo César Pereira de Andrade, 2022/08/23