-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Missing support for asm! on s390x #85931
Comments
A financial bounty from IBM to solve this issue is open for discussion. |
Im interested in tackling this. Is there anywhere I can find documentation about s390x architecture? Online resources aren't yielding much.. |
(Sorry for the late reply, I've been out on vacation ...) Thanks for looking into this! In addition to the ISA document David linked to above, here's the ABI documentation (if needed): And here is the list of assembler constraints supported by GCC for the platform: If you have any further questions, I'll be happy to help. |
I do have a question/problem, but am unsure exactly what the issue is, and where to begin to look for help. I have added register definitions for definitions can be found here When I test
From what I can gather, I think the issue is that the assembler isn't able to find external symbols; I think this is happening for one of two reasons:
I am not sure how much help you can provide, but obviously any would be appreciated. I don't have much experience with assembly in general, and have never programmed on an s390x before. So if this is a stupid question, or there is an obvious answer, forgive me. |
You are missing |
I added Here is the
|
Well, it's still mangled ... did you add the |
That fixes that, but of course there's another issue. I'll post more if I end up needing help. Thanks for the hand-holding. 😃 |
You need to add it in |
I am assuming that when FileCheck says match not found, that means that the For example, this is the code being tested, and the corresponding error: (In this case, the asm code
If the assembly in the check directive is wrong, is there an easy way to determine what the correct assembly is? If this isn't why FileCheck is failing, I am unsure of what else the error could be. Again, thanks for the help. |
The regular expression is incorrect, it should be %r[0-9]+ instead of r[0-15]+. Note that regular expressions work on characters, they don't understand integer numbers. [0-9]+ matches a sequence of at least one character in the range '0' .. '9', which matches any integer number. [0-15]+ matches a sequence of at least one character in the range '0' .. '1' or '5', which (for example) does not match "13". Also note the missing '%' character - on s390x, all register numbers are printed with a leading '%', so the regular expression has to match that as well. |
I am curious what further testing should be done before I submit a PR. These are the tests I have that pass:
I am also curious about eventual support for the vector/access registers; I have noticed that the LLVM configuration Rust uses for the s390x does not have support for vector registers turned on, and access registers can only be used if access mode is enabled on the |
S390x inline asm This adds register definitions and constraint codes for the s390x general and floating point registers necessary for fixing rust-lang#85931; as well as a few tests. Further testing is needed, but I am a little unsure of what specific tests should be added to `src/test/assembly/asm/s390x.rs` to address this.
S390x inline asm This adds register definitions and constraint codes for the s390x general and floating point registers necessary for fixing rust-lang#85931; as well as a few tests. Further testing is needed, but I am a little unsure of what specific tests should be added to `src/test/assembly/asm/s390x.rs` to address this.
S390x inline asm This adds register definitions and constraint codes for the s390x general and floating point registers necessary for fixing rust-lang#85931; as well as a few tests. Further testing is needed, but I am a little unsure of what specific tests should be added to `src/test/assembly/asm/s390x.rs` to address this.
S390x inline asm This adds register definitions and constraint codes for the s390x general and floating point registers necessary for fixing rust-lang#85931; as well as a few tests. Further testing is needed, but I am a little unsure of what specific tests should be added to `src/test/assembly/asm/s390x.rs` to address this.
S390x inline asm This adds register definitions and constraint codes for the s390x general and floating point registers necessary for fixing rust-lang#85931; as well as a few tests. Further testing is needed, but I am a little unsure of what specific tests should be added to `src/test/assembly/asm/s390x.rs` to address this.
Can this issue be closed now? |
Yeah, thanks. |
The new asm! feature implemented in #69171 is currently not supported on the s390x target. It looks like we need an implementation of the platform-specific registers and register classes in compiler/rustc_target/src/asm/s390x.rs
The text was updated successfully, but these errors were encountered: