Skip to content

Commit

Permalink
i#3699 ARM: Add ALIGN_VAR(8) to _dr_simd_t.
Browse files Browse the repository at this point in the history
2dfd7cb made the size of priv_mcontext_t a multiple of 8, enabling
alignment when the struct is pushed onto the stack by assembly code.
This patch adds ALIGN_VAR(8) to the definition of _dr_simd_t so that
alignment is also enforced by the compiler.

Change-Id: I3afd0a9babfe4091f414fb72a569ffd480db5985
  • Loading branch information
egrimley-arm committed Jan 18, 2025
1 parent 2dfd7cb commit e075307
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions api/docs/release.dox
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ clients.

The changes between version \DR_VERSION and 11.3.0 include the following compatibility
changes:
- The size of #dr_mcontext_t on 32-bit Arm has been increased by 4 so that
the struct can be pushed onto the 8-byte aligned stack without additional
padding. The offset of the field "simd" has changed.
- On 32-bit Arm the size of #dr_mcontext_t has been increased by 4 and the
struct is now required to be 8-byte aligned. The offset of the field "simd"
has changed.

Further non-compatibility-affecting changes include:
- Added support for reading a single drmemtrace trace file from stdin
Expand Down
2 changes: 1 addition & 1 deletion core/lib/globals_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ typedef union _dr_svep_t {
*/
typedef dr_svep_t dr_ffr_t;
# else
typedef union _dr_simd_t {
typedef union ALIGN_VAR(8) _dr_simd_t {
uint s[4]; /**< Representation as 4 32-bit Sn elements. */
uint d[4]; /**< Representation as 2 64-bit Dn elements: d[3]:d[2]; d[1]:d[0]. */
uint u32[4]; /**< The full 128-bit register. */
Expand Down

0 comments on commit e075307

Please sign in to comment.