# HG changeset patch # User michael # Date 1005074782 0 # Node ID 3fc494e92f0d04c1569ba84f4622b7927ff2d955 # Parent 1cfc4d567c0a50323e5abfb6a2316e18f58d9f2d gcc does optimize writes to non volatile variables away if it didnt know that they were read in between diff -r 1cfc4d567c0a -r 3fc494e92f0d libpostproc/postprocess.c --- a/libpostproc/postprocess.c Tue Nov 06 16:53:47 2001 +0000 +++ b/libpostproc/postprocess.c Tue Nov 06 19:26:22 2001 +0000 @@ -116,8 +116,8 @@ #define OPTIONS_ARRAY_SIZE 10 #ifdef HAVE_MMX -static uint64_t __attribute__((aligned(8))) packedYOffset= 0x0000000000000000LL; -static uint64_t __attribute__((aligned(8))) packedYScale= 0x0100010001000100LL; +static volatile uint64_t __attribute__((aligned(8))) packedYOffset= 0x0000000000000000LL; +static volatile uint64_t __attribute__((aligned(8))) packedYScale= 0x0100010001000100LL; static uint64_t __attribute__((aligned(8))) w05= 0x0005000500050005LL; static uint64_t __attribute__((aligned(8))) w20= 0x0020002000200020LL; static uint64_t __attribute__((aligned(8))) w1400= 0x1400140014001400LL; diff -r 1cfc4d567c0a -r 3fc494e92f0d libpostproc/postprocess_template.c --- a/libpostproc/postprocess_template.c Tue Nov 06 16:53:47 2001 +0000 +++ b/libpostproc/postprocess_template.c Tue Nov 06 19:26:22 2001 +0000 @@ -116,8 +116,8 @@ #define OPTIONS_ARRAY_SIZE 10 #ifdef HAVE_MMX -static uint64_t __attribute__((aligned(8))) packedYOffset= 0x0000000000000000LL; -static uint64_t __attribute__((aligned(8))) packedYScale= 0x0100010001000100LL; +static volatile uint64_t __attribute__((aligned(8))) packedYOffset= 0x0000000000000000LL; +static volatile uint64_t __attribute__((aligned(8))) packedYScale= 0x0100010001000100LL; static uint64_t __attribute__((aligned(8))) w05= 0x0005000500050005LL; static uint64_t __attribute__((aligned(8))) w20= 0x0020002000200020LL; static uint64_t __attribute__((aligned(8))) w1400= 0x1400140014001400LL;