# HG changeset patch # User michael # Date 1005074782 0 # Node ID 9ef09e2325058d3d7d2328b4a38f84d2628ee9f8 # Parent 2cbecedb261603335fbc99e7e4d07ac840aa4aa6 gcc does optimize writes to non volatile variables away if it didnt know that they were read in between diff -r 2cbecedb2616 -r 9ef09e232505 postproc/postprocess.c --- a/postproc/postprocess.c Tue Nov 06 19:16:49 2001 +0000 +++ b/postproc/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 2cbecedb2616 -r 9ef09e232505 postproc/postprocess_template.c --- a/postproc/postprocess_template.c Tue Nov 06 19:16:49 2001 +0000 +++ b/postproc/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; diff -r 2cbecedb2616 -r 9ef09e232505 postproc/swscale.c --- a/postproc/swscale.c Tue Nov 06 19:16:49 2001 +0000 +++ b/postproc/swscale.c Tue Nov 06 19:26:22 2001 +0000 @@ -71,10 +71,10 @@ static uint64_t __attribute__((aligned(8))) bm00000111=0x0000000000FFFFFFLL; static uint64_t __attribute__((aligned(8))) bm11111000=0xFFFFFFFFFF000000LL; -static uint64_t __attribute__((aligned(8))) b5Dither; -static uint64_t __attribute__((aligned(8))) g5Dither; -static uint64_t __attribute__((aligned(8))) g6Dither; -static uint64_t __attribute__((aligned(8))) r5Dither; +static volatile uint64_t __attribute__((aligned(8))) b5Dither; +static volatile uint64_t __attribute__((aligned(8))) g5Dither; +static volatile uint64_t __attribute__((aligned(8))) g6Dither; +static volatile uint64_t __attribute__((aligned(8))) r5Dither; static uint64_t __attribute__((aligned(8))) dither4[2]={ 0x0103010301030103LL, diff -r 2cbecedb2616 -r 9ef09e232505 postproc/swscale_template.c --- a/postproc/swscale_template.c Tue Nov 06 19:16:49 2001 +0000 +++ b/postproc/swscale_template.c Tue Nov 06 19:26:22 2001 +0000 @@ -71,10 +71,10 @@ static uint64_t __attribute__((aligned(8))) bm00000111=0x0000000000FFFFFFLL; static uint64_t __attribute__((aligned(8))) bm11111000=0xFFFFFFFFFF000000LL; -static uint64_t __attribute__((aligned(8))) b5Dither; -static uint64_t __attribute__((aligned(8))) g5Dither; -static uint64_t __attribute__((aligned(8))) g6Dither; -static uint64_t __attribute__((aligned(8))) r5Dither; +static volatile uint64_t __attribute__((aligned(8))) b5Dither; +static volatile uint64_t __attribute__((aligned(8))) g5Dither; +static volatile uint64_t __attribute__((aligned(8))) g6Dither; +static volatile uint64_t __attribute__((aligned(8))) r5Dither; static uint64_t __attribute__((aligned(8))) dither4[2]={ 0x0103010301030103LL,