Skip to content

Commit

Permalink
test_fpu: Force proper alignment of floats
Browse files Browse the repository at this point in the history
For Intel x86 the movaps instruction requires an aligned memory operand,
see Intel SDM Vol. 2B.
  • Loading branch information
Kensan committed Apr 27, 2023
1 parent 7348797 commit 5f5d92c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_fpu/test_fpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int solo5_app_main(const struct solo5_start_info *si __attribute__((unused)))
{
puts("\n**** Solo5 standalone test_fpu ****\n\n");

float a, b, c[4];
float a, b, c[4] __attribute__((aligned(64)));

c[0] = 2.0;
c[1] = 5.0;
Expand Down

0 comments on commit 5f5d92c

Please sign in to comment.