-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From 24c7dba5c34a3c2bcf2a29b79279809dd3e2aa0f Mon Sep 17 00:00:00 2001 | ||
From: Kartatz <105828205+Kartatz@users.noreply.github.com> | ||
Date: Sun, 16 Feb 2025 17:20:54 +0100 | ||
Subject: [PATCH] x | ||
|
||
--- | ||
libgcc/config/pa/sync-libfuncs.c | 15 +++++++++------ | ||
1 file changed, 9 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/libgcc/config/pa/sync-libfuncs.c b/libgcc/config/pa/sync-libfuncs.c | ||
index 774c16055..2557a7196 100644 | ||
--- a/libgcc/config/pa/sync-libfuncs.c | ||
+++ b/libgcc/config/pa/sync-libfuncs.c | ||
@@ -132,12 +132,15 @@ static inline void | ||
atomic_store_8 (volatile void *ptr, u64 value) | ||
{ | ||
double tmp; | ||
- | ||
- asm volatile ("stws|stw} %2,-16(%%sp)\n\t" | ||
- "{stws|stw} %R2,-12(%%sp)\n\t" | ||
- "{fldds|fldd} -16(%%sp),%1\n\t" | ||
- "{fstds|fstd} %1,0(%0)" | ||
- : "=m" (ptr), "=&f" (tmp) : "r" (value): "memory"); | ||
+ asm volatile ( | ||
+ "stws %2,-16(%%sp)\n\t" // Store lower 32 bits | ||
+ "stw %R2,-12(%%sp)\n\t" // Store upper 32 bits | ||
+ "fldds -16(%%sp),%1\n\t" // Load double from stack to tmp | ||
+ "fstds %1,0(%0)" // Store double into ptr | ||
+ : "=m" (ptr), "=&f" (tmp) // Outputs | ||
+ : "r" (value) // Input: 64-bit value | ||
+ : "memory" // Clobbered memory | ||
+ ); | ||
} | ||
#endif | ||
|
||
-- | ||
2.36.6 | ||
|