]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
include/qemu/atomic: Drop aligned_{u}int64_t
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 8 Jan 2026 03:15:01 +0000 (14:15 +1100)
committerRichard Henderson <richard.henderson@linaro.org>
Fri, 16 Jan 2026 23:46:51 +0000 (10:46 +1100)
As we no longer support i386 as a host architecture,
this abstraction is no longer required.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/atomic_template.h
include/qemu/atomic.h
include/system/cpu-timers-internal.h
linux-user/hppa/cpu_loop.c
util/qsp.c

index ae5203b43904a52b721c34330d1c61b8cb132b47..f7924078f77d42edb4b491787969715e717e0989 100644 (file)
@@ -27,8 +27,8 @@
 # define SHIFT      4
 #elif DATA_SIZE == 8
 # define SUFFIX     q
-# define DATA_TYPE  aligned_uint64_t
-# define SDATA_TYPE aligned_int64_t
+# define DATA_TYPE  uint64_t
+# define SDATA_TYPE int64_t
 # define BSWAP      bswap64
 # define SHIFT      3
 #elif DATA_SIZE == 4
index 27d98014d4a13e8748a46a1c888dd604cf3d4802..dc9290084b887e413dba6fc0738b4c95f4fbf292 100644 (file)
     _oldn;                                                              \
 })
 
-/*
- * Abstractions to access atomically (i.e. "once") i64/u64 variables.
- *
- * The i386 abi is odd in that by default members are only aligned to
- * 4 bytes, which means that 8-byte types can wind up mis-aligned.
- * Clang will then warn about this, and emit a call into libatomic.
- *
- * Use of these types in structures when they will be used with atomic
- * operations can avoid this.
- */
-typedef int64_t aligned_int64_t __attribute__((aligned(8)));
-typedef uint64_t aligned_uint64_t __attribute__((aligned(8)));
-
 #endif /* QEMU_ATOMIC_H */
index 94bb7394c5d7e962f09a4242f3337bef5a03fd31..8c262ce139c754764f4a9b8116569d3957ef34c9 100644 (file)
@@ -47,7 +47,7 @@ typedef struct TimersState {
     int64_t last_delta;
 
     /* Compensate for varying guest execution speed.  */
-    aligned_int64_t qemu_icount_bias;
+    int64_t qemu_icount_bias;
 
     int64_t vm_clock_warp_start;
     int64_t cpu_clock_offset;
index e5c0f52d94d488483aa6b9a975dcd15708964b5d..972e85c487d4ea273369b50093ae410a86feb29b 100644 (file)
@@ -83,7 +83,7 @@ static abi_ulong hppa_lws(CPUHPPAState *env)
                 uint64_t o64, n64, r64;
                 o64 = *(uint64_t *)g2h(cs, old);
                 n64 = *(uint64_t *)g2h(cs, new);
-                r64 = qatomic_cmpxchg((aligned_uint64_t *)g2h(cs, addr), o64, n64);
+                r64 = qatomic_cmpxchg((uint64_t *)g2h(cs, addr), o64, n64);
                 ret = r64 != o64;
             }
             break;
index 382e4397e2cba7eebbba9a9cbbc42d113c99d531..55477ae02563a190f9033646db9294409d0145cd 100644 (file)
@@ -83,8 +83,8 @@ typedef struct QSPCallSite QSPCallSite;
 struct QSPEntry {
     void *thread_ptr;
     const QSPCallSite *callsite;
-    aligned_uint64_t n_acqs;
-    aligned_uint64_t ns;
+    uint64_t n_acqs;
+    uint64_t ns;
     unsigned int n_objs; /* count of coalesced objs; only used for reporting */
 };
 typedef struct QSPEntry QSPEntry;