[v2] Base cross-arch support#2
Open
daxtens wants to merge 14 commits into
Open
Conversation
This allows builds on non-x86 platforms to get past ./configure Signed-off-by: Daniel Axtens <dja@axtens.net>
I have been testing with:
./configure --host=i686-pc-linux-gnu CFLAGS="-m32 -g -O2"
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Author
|
ergh, turns out this is actually broken on x86_64! Fix to come. |
Author
|
and it turns out that gf_vect_mad_avx2 returns different results to gf_vect_mad_{avx,sse}, which is what's causing the problem. |
Author
|
Reported upstream: intel#19 |
- remove instruction-type specific tests
- make gf_vect_mad_{test,perf} generic, not sse-specific
Signed-off-by: Daniel Axtens <dja@axtens.net>
ec_highlevel_func.c has code for SSE/AVX etc, and the headers have prototypes for them as well. We want the API to only contain arch-independent functions. Break the highlevel x86 functions into their own file. Move the remaining function into ec_base.c, delete ec_highlevel_func.c Remove the x86-specific prototypes from the public headers. Create a new, private header file with the prototypes. Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Calling the base functions directly from C in a base aliases file shows that they don't line up. This isn't normally seen because they are invoked from asm. Make the types line up, do simple resulting cleanup. Signed-off-by: Daniel Axtens <dja@axtens.net>
Use this for platform generic code and 32-bit code. Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Daniel Axtens <dja@axtens.net>
This contains: - standard source grouping fixes - standard base aliases, used for both generic and 32-bit. - expose the CrcData table to C with crc_data.c. I have removed the old asm file and verified that things still work when built with autotools. - only include the xmm/imm intrinsics headers on x86. Signed-off-by: Daniel Axtens <dja@axtens.net>
- test on 32 bit Linux - test on OS X (yasm only, nasm doesn't work) - add the 'test' target as well as 'check' Signed-off-by: Daniel Axtens <dja@axtens.net>
Author
|
Ok, that should be good to go now :) |
Owner
|
The fixes look ok. I have all the base aliases already and some of the x86 fixes but the others should apply cleanly. We have a lot of changes to compression coming and I'll ask you then to rebase on that. |
When I renamed ec_highlevel_func.c to ec_highlevel_x86.c, I didn't update this makefile. Tested on a Windows 10 developer VM using the MS compiler. Signed-off-by: Daniel Axtens <dja@axtens.net>
Author
|
Excellent - let me know once they land and I'll send you a v3. |
7ecb66c to
2315944
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed in #1, I have:
In addition, I wanted to make sure I hadn't broken 32-bit, which turned out to be a bit more complex than I thought as it didn't build out of the box with autotools. There are patches to:
I have enabled 32-bit Linux and 64-bit OS X tests in the final patch as well.
I have verified that 'make test check perf' works on 64 and 32 bit x86, and ppc64le. I will add any fixes to compile on Windows tomorrow.