qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] tests/tcg/ppc64le: Added an overflow with OE=1 test


From: Lucas Mateus Martins Araujo e Castro
Subject: Re: [PATCH 1/2] tests/tcg/ppc64le: Added an overflow with OE=1 test
Date: Thu, 18 Aug 2022 13:14:22 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0


On 18/08/2022 12:32, Richard Henderson wrote:
On 8/17/22 09:57, Lucas Mateus Castro(alqotel) wrote:
+void sigfpe_handler(int sig, siginfo_t *si, void *ucontext)
+{
+    uint64_t t;
+    uint64_t ch = 0x5fcfffe4965a17e0ull;
+    asm (
+        "stfd 2, %0\n\t"
+        : "=m"(t)
+        :
+        : "memory", "fr2"
+    );

No, you need to fetch f2 from ucontext.  There's no guarantee of any specific values being
present in the signal handler otherwise.
Yeah, for some reason I completely forgot about this, my bad. I'll send a second version fixing this

+    return -1;

exit(-1), which return from main equates to, helpful over EXIT_FAILURE.
But here I'd tend to abort(), since it really shouldn't be reachable.
Good point, I'll change in v2


r~
--
Lucas Mateus M. Araujo e Castro
Instituto de Pesquisas ELDORADO
Departamento Computação Embarcada
Analista de Software Trainee
Aviso Legal - Disclaimer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]