Skip to content

Instantly share code, notes, and snippets.

@Bigcheese
Last active August 29, 2015 14:14
Show Gist options
  • Save Bigcheese/cde61fa1e9ba2ce00655 to your computer and use it in GitHub Desktop.
Save Bigcheese/cde61fa1e9ba2ce00655 to your computer and use it in GitHub Desktop.
// Compile with -avx. Will emit movaps instead of movups.
struct v4 {
float x;
float y;
float z;
float w;
};
typedef v4 v4_aligned __attribute__((aligned(16)));
const v4_aligned vector = {0.0f, 0.0f, 0.0f, 1.0f};
v4 GetVector() {
return vector; // Incorrectly aligned store.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment