| Index: tests/Sk4xTest.cpp
|
| diff --git a/tests/Sk4xTest.cpp b/tests/Sk4xTest.cpp
|
| index 130693be24b91c8ca49847bd0d5a1fe2a3504905..d6e7e51b59fdd2554179866691c7987bd24c9d0e 100644
|
| --- a/tests/Sk4xTest.cpp
|
| +++ b/tests/Sk4xTest.cpp
|
| @@ -15,9 +15,18 @@ DEF_TEST(Sk4x_Construction, r) {
|
| ASSERT_EQ(baz, foo);
|
| }
|
|
|
| +struct AlignedFloats {
|
| + Sk4f forces16ByteAlignment; // On 64-bit machines, the stack starts 128-bit aligned,
|
| + float fs[5]; // but not necessarily so on 32-bit. Adding an Sk4f forces it.
|
| +};
|
| +
|
| DEF_TEST(Sk4x_LoadStore, r) {
|
| + AlignedFloats aligned;
|
| // fs will be 16-byte aligned, fs+1 not.
|
| - float fs[] = { 5,6,7,8,9 };
|
| + float* fs = aligned.fs;
|
| + for (int i = 0; i < 5; i++) { // set to 5,6,7,8,9
|
| + fs[i] = float(i+5);
|
| + }
|
|
|
| Sk4f foo = Sk4f::Load(fs);
|
| Sk4f bar = Sk4f::LoadAligned(fs);
|
|
|