|
|
c41d59 |
commit 5d1ccdda7b0c625751661d50977f3dfbc73f8eae
|
|
|
c41d59 |
Author: Florian Weimer <fweimer@redhat.com>
|
|
|
c41d59 |
Date: Mon Apr 3 17:23:11 2023 +0200
|
|
|
c41d59 |
|
|
|
c41d59 |
x86_64: Fix asm constraints in feraiseexcept (bug 30305)
|
|
|
c41d59 |
|
|
|
c41d59 |
The divss instruction clobbers its first argument, and the constraints
|
|
|
c41d59 |
need to reflect that. Fortunately, with GCC 12, generated code does
|
|
|
c41d59 |
not actually change, so there is no externally visible bug.
|
|
|
c41d59 |
|
|
|
c41d59 |
Suggested-by: Jakub Jelinek <jakub@redhat.com>
|
|
|
c41d59 |
Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
|
|
|
c41d59 |
|
|
|
c41d59 |
diff --git a/sysdeps/x86_64/fpu/fraiseexcpt.c b/sysdeps/x86_64/fpu/fraiseexcpt.c
|
|
|
c41d59 |
index ca1c223053bf016b..fb886ed540b52100 100644
|
|
|
c41d59 |
--- a/sysdeps/x86_64/fpu/fraiseexcpt.c
|
|
|
c41d59 |
+++ b/sysdeps/x86_64/fpu/fraiseexcpt.c
|
|
|
c41d59 |
@@ -33,7 +33,7 @@ __feraiseexcept (int excepts)
|
|
|
c41d59 |
/* One example of an invalid operation is 0.0 / 0.0. */
|
|
|
c41d59 |
float f = 0.0;
|
|
|
c41d59 |
|
|
|
c41d59 |
- __asm__ __volatile__ ("divss %0, %0 " : : "x" (f));
|
|
|
c41d59 |
+ __asm__ __volatile__ ("divss %0, %0 " : "+x" (f));
|
|
|
c41d59 |
(void) &f;
|
|
|
c41d59 |
}
|
|
|
c41d59 |
|
|
|
c41d59 |
@@ -43,7 +43,7 @@ __feraiseexcept (int excepts)
|
|
|
c41d59 |
float f = 1.0;
|
|
|
c41d59 |
float g = 0.0;
|
|
|
c41d59 |
|
|
|
c41d59 |
- __asm__ __volatile__ ("divss %1, %0" : : "x" (f), "x" (g));
|
|
|
c41d59 |
+ __asm__ __volatile__ ("divss %1, %0" : "+x" (f) : "x" (g));
|
|
|
c41d59 |
(void) &f;
|
|
|
c41d59 |
}
|
|
|
c41d59 |
|