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
x/arch/x86/x86asm: missing instructions: FLDZ, FLDLN2 #18665
Comments
This is blocked by lack of access to the x86spec program that generated x86.csv. /cc @rsc |
Thanks @minux for raising this issue. I would also be very happy if support for these instructions were added to arch/x86. Back in 2015, I tried to submit a pull request to add these instructions rsc/x86#1 I'd also be very interested in the x86spec program which converts the Intel 64 and IA-32 Architectures Software Development Manual's PDF to x86.csv. @rsc, did you ever make the source code of this program public? |
@minux With rev golang/arch@c6bf551 the source code of the |
I believe @quasilyte is working on generating x86.csv from Intel's description tables as open sourced as part of xed, which will replace the x86spec pdf reader. |
Ah, glad to hear! Thanks! |
I can confirm that XED-based x86.csv contains such instructions:
It's a quite long way to fixing x86.csv-based tools though. |
Change https://golang.org/cl/104496 mentions this issue: |
@quasilyte That's great to hear! Thanks. |
I tried again today at rev golang/arch@b19384d of x/arch, and I get the error @quasilyte I understood from your comment that fldz should be supported by XED, and with https://golang.org/cl/104496 the tables should be generated based on XED. Is there some step missing to resolve this issue? Cheers, |
Change https://golang.org/cl/149438 mentions this issue: |
@mewmew, there were some unresolved format and implementation related questions that made XED-based csv generation abandoned. |
Ok, good to know. I submitted https://go-review.googlesource.com/c/arch/+/149438/ which at least fixes this issue by adding FLZ and FLDLN2 to x86.csv. Is it |
@mewmew I believe you should use I'm not sure editing auto-generated file is a good idea though |
@quasilyte - please could you clarify - did you get around to mailing a new x86.csv generator? |
It was mailed (https://go-review.googlesource.com/c/arch/+/104496/). I believe the results of that program were mostly correct (probably more correct than the current csv file) and it included AVX512 instructions. But since the generator itself was not submitted, the generated file was left behind as well. |
@quasilyte and @rsc, I felt very excited to see the XED data being used for the decoding table generation, as it would help resolve issues with missing instructions, such as FLDZ, FLDLN2 reported in this issue. However, now it seems that the CL (https://go-review.googlesource.com/c/arch/+/104496/) has been stalled? Are there any technical reasons why the CL has not been merged. From my understanding, it seems that it worked well to use the XED data and also helped resolve issues with missing instructions. If there are parts missing before https://go-review.googlesource.com/c/arch/+/104496/ could be merged, @rsc or @quasilyte would you help clarify those so that someone else could pick up the torch and get this merged? Cheers, |
To my knowledge, @fexolm was investigating an opportunity to work on x86 decoder. @mewmew, it might be a problem that this needs an effort and it's already possible to do a workaround without it.
Correct. It's there as a reference for further attempts. One should start a new CL and think about it from scratch, while keeping in mind the context from CL104496.
If I understood it correctly, the
These 2 problems may not be purely technical, but they come to my mind before anything. In the end, AVX-512 related code was generated out of XED tables directly to avoid discussions around As another example of how XED data files were used during that, there is avx512test (but it's not pretty). Hope that helps. |
Thanks @quasilyte for the writeup and added context. re:
@fexolm how did your investigation go? If you would care to, please share your experiences, good or bad, as it could help us move this along. Cheers, |
🎉 |
I found two missing instructions (they're also missing in x86.csv, which suggests that x86.csv is not complete):
0xd9 0xed: FLDLN2
0xd9 0xee: FLDZ
There are also some missing AVX instructions: e.g.
c4 c1 f3 2a cc vcvtsi2sd %r12,%xmm1,%xmm1
/cc @rsc
The text was updated successfully, but these errors were encountered: