Skip to content

Commit

Permalink
Fix AArch64 float stack alignment (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeeter authored Jun 6, 2024
1 parent 7e33453 commit f8d725f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# 0.3.2 (unreleased)
- Added `impl IntoNode for Var`, to make handling `Var` values in a context
easier.
- Fix possible corruption of `x24` during AArch64 float slice JIT evaluation,
due to incorrect stack alignment.

# 0.3.1
The highlight of this release is the `fidget::solver` module, which implements
Expand Down
5 changes: 3 additions & 2 deletions fidget/src/jit/aarch64/float_slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ pub const SIMD_WIDTH: usize = 4;
/// ```text
/// | Position | Value | Notes |
/// |----------|--------------|---------------------------------------------|
/// | 0x228 | ... | Register spills live up here |
/// | 0x230 | ... | Register spills live up here |
/// | 0x228 | --- | Padding for 16-byte alignment |
/// |----------|--------------|---------------------------------------------|
/// | 0x220 | `x24` | Backup for callee-saved register |
/// | 0x218 | `x23` | |
Expand Down Expand Up @@ -80,7 +81,7 @@ pub const SIMD_WIDTH: usize = 4;
/// | 0x8 | `sp` (`x30`) | Stack frame |
/// | 0x0 | `fp` (`x29`) | [current value for sp] |
/// ```
const STACK_SIZE: u32 = 0x228;
const STACK_SIZE: u32 = 0x230;

impl Assembler for FloatSliceAssembler {
type Data = f32;
Expand Down

0 comments on commit f8d725f

Please sign in to comment.