Re: [Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-27 Thread Matt Turner
On Mon, Nov 27, 2017 at 5:41 AM, Jon Turney wrote: > On 26/11/2017 00:46, Matt Turner wrote: >> >> I've committed what I hope is the final fix. > > > After this series, if we are building on a target unknown to u_endian.h, so > it can't determine the endianess, sha1.c now builds for big-endian. >

Re: [Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-27 Thread Jon Turney
On 26/11/2017 00:46, Matt Turner wrote: I've committed what I hope is the final fix. After this series, if we are building on a target unknown to u_endian.h, so it can't determine the endianess, sha1.c now builds for big-endian. This choice is made silently, but fortunately mesa-sha1_test fa

Re: [Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-25 Thread Roland Scheidegger
Am 26.11.2017 um 01:46 schrieb Matt Turner: >>> Sigh. Was supposed to be #warning. Strangely vim even syntax >>> highlights #warn. Committed a brown bag fix. >> >> As Jon was commenting, #warning is neither portable to MSVC 😕 >> >> AppVeyor error: >> https://ci.appveyor.com/project/mesa3d/mesa/buil

Re: [Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-25 Thread Matt Turner
On Sat, Nov 25, 2017 at 4:11 PM, Andres Gomez wrote: > On Sat, 2017-11-25 at 16:00 -0800, Matt Turner wrote: >> On Sat, Nov 25, 2017 at 1:58 PM, Jon Turney >> wrote: >> > On 25/11/2017 04:24, Matt Turner wrote: >> > > >> > > diff --git a/src/util/u_endian.h b/src/util/u_endian.h >> > > index 7bb

Re: [Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-25 Thread Andres Gomez
On Sat, 2017-11-25 at 16:00 -0800, Matt Turner wrote: > On Sat, Nov 25, 2017 at 1:58 PM, Jon Turney > wrote: > > On 25/11/2017 04:24, Matt Turner wrote: > > > > > > diff --git a/src/util/u_endian.h b/src/util/u_endian.h > > > index 7bbd7dc215..3d5c006f35 100644 > > > --- a/src/util/u_endian.h >

Re: [Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-25 Thread Matt Turner
On Sat, Nov 25, 2017 at 1:58 PM, Jon Turney wrote: > On 25/11/2017 04:24, Matt Turner wrote: >> >> diff --git a/src/util/u_endian.h b/src/util/u_endian.h >> index 7bbd7dc215..3d5c006f35 100644 >> --- a/src/util/u_endian.h >> +++ b/src/util/u_endian.h >> @@ -67,4 +67,7 @@ >> >> #endif >> >> +#war

Re: [Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-25 Thread Andres Gomez
On Sun, 2017-11-26 at 00:59 +0200, Andres Gomez wrote: > > Although the series landed without the mesa-stable tag, I assume that > you wanted to keep the nomination. If that's the case, remember to land > them with the tag in the future since, if it is not included, it is > automatically understo

Re: [Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-25 Thread Roland Scheidegger
Am 25.11.2017 um 22:58 schrieb Jon Turney: > On 25/11/2017 04:24, Matt Turner wrote: >> diff --git a/src/util/u_endian.h b/src/util/u_endian.h >> index 7bbd7dc215..3d5c006f35 100644 >> --- a/src/util/u_endian.h >> +++ b/src/util/u_endian.h >> @@ -67,4 +67,7 @@ >> >>   #endif >> >> +#warn Unknown En

Re: [Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-25 Thread Andres Gomez
Matt, as Jon and Ilia have reported, this is now breaking with GCC and MSVC. You can check the Appveyor error at: https://ci.appveyor.com/project/mesa3d/mesa/build/6245 Also, for Travis-CI: https://travis-ci.org/Igalia/mesa/builds/307262963 Although the series landed without the mesa-stable tag,

Re: [Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-25 Thread Ilia Mirkin
On Sat, Nov 25, 2017 at 4:58 PM, Jon Turney wrote: > On 25/11/2017 04:24, Matt Turner wrote: >> >> diff --git a/src/util/u_endian.h b/src/util/u_endian.h >> index 7bbd7dc215..3d5c006f35 100644 >> --- a/src/util/u_endian.h >> +++ b/src/util/u_endian.h >> @@ -67,4 +67,7 @@ >> >> #endif >> >> +#war

Re: [Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-25 Thread Jon Turney
On 25/11/2017 04:24, Matt Turner wrote: diff --git a/src/util/u_endian.h b/src/util/u_endian.h index 7bbd7dc215..3d5c006f35 100644 --- a/src/util/u_endian.h +++ b/src/util/u_endian.h @@ -67,4 +67,7 @@ #endif +#warn Unknown Endianness for this platform. Assuming little endian +#define PIPE_ARC

Re: [Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-25 Thread Roland Scheidegger
Am 25.11.2017 um 05:24 schrieb Matt Turner: > On Fri, Nov 24, 2017 at 2:25 AM, Eric Engestrom > wrote: >> On Thursday, 2017-11-23 11:08:04 -0800, Matt Turner wrote: >>> The code defines a macro blk0(i) based on the preprocessor condition >>> BYTE_ORDER == LITTLE_ENDIAN. If true, blk0(i) is defined

Re: [Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-24 Thread Matt Turner
On Fri, Nov 24, 2017 at 2:25 AM, Eric Engestrom wrote: > On Thursday, 2017-11-23 11:08:04 -0800, Matt Turner wrote: >> The code defines a macro blk0(i) based on the preprocessor condition >> BYTE_ORDER == LITTLE_ENDIAN. If true, blk0(i) is defined as a byte swap >> operation. Unfortunately, if the

Re: [Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-24 Thread Matt Turner
On Fri, Nov 24, 2017 at 8:51 AM, Andres Gomez wrote: > On Fri, 2017-11-24 at 13:32 +, Emil Velikov wrote: >> On 24 November 2017 at 10:25, Eric Engestrom >> wrote: >> > On Thursday, 2017-11-23 11:08:04 -0800, Matt Turner wrote: >> > > The code defines a macro blk0(i) based on the preprocesso

Re: [Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-24 Thread Andres Gomez
On Fri, 2017-11-24 at 13:32 +, Emil Velikov wrote: > On 24 November 2017 at 10:25, Eric Engestrom > wrote: > > On Thursday, 2017-11-23 11:08:04 -0800, Matt Turner wrote: > > > The code defines a macro blk0(i) based on the preprocessor condition > > > BYTE_ORDER == LITTLE_ENDIAN. If true, blk0

Re: [Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-24 Thread Emil Velikov
On 24 November 2017 at 10:25, Eric Engestrom wrote: > On Thursday, 2017-11-23 11:08:04 -0800, Matt Turner wrote: >> The code defines a macro blk0(i) based on the preprocessor condition >> BYTE_ORDER == LITTLE_ENDIAN. If true, blk0(i) is defined as a byte swap >> operation. Unfortunately, if the pr

Re: [Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-24 Thread Eric Engestrom
On Thursday, 2017-11-23 11:08:04 -0800, Matt Turner wrote: > The code defines a macro blk0(i) based on the preprocessor condition > BYTE_ORDER == LITTLE_ENDIAN. If true, blk0(i) is defined as a byte swap > operation. Unfortunately, if the preprocessor macros used in the test > are no defined, then

Re: [Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-23 Thread Matt Turner
Fixes: d1efa09d342b ("util: import sha1 implementation from OpenBSD") ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 1/3] util: Fix SHA1 implementation on big endian

2017-11-23 Thread Matt Turner
The code defines a macro blk0(i) based on the preprocessor condition BYTE_ORDER == LITTLE_ENDIAN. If true, blk0(i) is defined as a byte swap operation. Unfortunately, if the preprocessor macros used in the test are no defined, then the comparison becomes 0 == 0 and it evaluates as true. --- src/ut