Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s390/ibm/linuxone compatibility #939

Closed
romange opened this issue Mar 14, 2023 · 7 comments · Fixed by #1214
Closed

s390/ibm/linuxone compatibility #939

romange opened this issue Mar 14, 2023 · 7 comments · Fixed by #1214
Assignees
Labels
bug Something isn't working minor nice to have enhancement

Comments

@romange
Copy link
Collaborator

romange commented Mar 14, 2023

Dragonfly does not build on s390.

First impressions:

  1. lua patch request - requires changes. line 79 - remove the error. line 83 - add "-march=native" before $(OPTFLAGS)
  2. configuring requires -DMARCH_OPT="-march=native" support
  3. sse instruction are not supported and emmintrin.h is not present. however __s390__ , __s390x__, __zarch__ are defined.
    therefore we can fallback on scalar code for this architecture. Requires changes in dashtable and bitpacking.cc
@romange romange added bug Something isn't working minor nice to have enhancement labels Mar 14, 2023
@v1gnesh
Copy link

v1gnesh commented Mar 19, 2023

Thank you @romange for giving this a go.

I hope some of the info I'm sharing here will be useful:
simd-everywhere/simde@5b9b2af
simd-everywhere/simde@fec5053
https://gcc.gnu.org/onlinedocs/gcc/S_002f390-and-zSeries-Options.html

In summary, -march=native and -mzvector seem important.
That's about as far as I understand 😛

Below 2 links are from docs of a newer Clang-based compiler toolchain for IBM Z (Open XL C/C++ for zOS):
https://www.ibm.com/docs/en/open-xl-c-cpp-zos/1.1?topic=options-qvector
https://www.ibm.com/docs/en/open-xl-c-cpp-zos/1.1?topic=support-options

Although s390x runs linux and not zOS, some of the info may be useful for reference.

EDIT: s390 refers to 32-bit arch (but 31-bit addressing), whereas s390x refers to the 64-bit arch 😄
https://en.wikipedia.org/wiki/31-bit_computing#Linux/390

@v1gnesh
Copy link

v1gnesh commented Apr 2, 2023

Also, I hope this also helps for reference - https://src.fedoraproject.org/rpms/gcc/blob/rawhide/f/gcc.spec
... contains mentions of s390intrin.h, for when building with gcc.
Can't remember where I found that DF builds with gcc.

@iko1
Copy link
Contributor

iko1 commented Apr 29, 2023

@romange, Can you assign this issue to me, please?

@romange
Copy link
Collaborator Author

romange commented Apr 29, 2023

Done @iko1

@ThatOneCalculator
Copy link

May be off-topic, but out of curiosity, is anyone still using System/390 in production today?

@v1gnesh
Copy link

v1gnesh commented Jun 3, 2023

Uh, yes @ThatOneCalculator.
The question is like asking if anyone is using x86 today.
Just like we're on whatever upgraded bunch of instruction set extensions in the x86 family today, S390 is where one such thing started.
s390 refers to 32-bit arch, and s390x refers to 64-bit arch... and s390x arch usage is very much alive & kicking.
I don't personally know the actual figures, but you can look up figures from IBM and have a pinch of salt next to ya :)

@ThatOneCalculator
Copy link

Ah, gotcha. Thanks for the clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working minor nice to have enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants