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

Does the compiler support 8087 hardware floating point instructions? #145

Open
rationalism opened this issue Dec 20, 2023 · 1 comment
Open

Comments

@rationalism
Copy link

Am interested in using this, but haven't been able to find documentation. If I run ia16-elf-as --help on my machine, 8087 is listed under supported extensions:

  -march=CPU[,+EXTENSION...]
                          generate code for CPU and EXTENSION, CPU is one of:
                           default, push, pop, generic32, generic64, i386, i486,
                           i586, i686, pentium, pentiumpro, pentiumii,
                           pentiumiii, pentium4, prescott, nocona, core, core2,
                           corei7, iamcu, k6, k6_2, athlon, opteron, k8,
                           amdfam10, bdver1, bdver2, bdver3, bdver4, znver1,
                           znver2, znver3, btver1, btver2
                          EXTENSION is combination of (possibly "no"-prefixed):
                           8087, 287, 387, 687, cmov, fxsr, mmx, sse, sse2,
                           sse3, sse4a, ssse3, sse4.1, sse4.2, sse4, avx, avx2,
                           avx512f, avx512cd, avx512er, avx512pf, avx512dq,
                           avx512bw, avx512vl, vmx, vmfunc, smx, xsave,
                           xsaveopt, xsavec, xsaves, aes, pclmul, fsgsbase,
                           rdrnd, f16c, bmi2, fma, fma4, xop, lwp, movbe, cx16,
                           ept, lzcnt, popcnt, hle, rtm, invpcid, clflush, nop,
                           syscall, rdtscp, 3dnow, 3dnowa, padlock, svme, sse4a,
                           abm, bmi, tbm, adx, rdseed, prfchw, smap, mpx, sha,
                           clflushopt, prefetchwt1, se1, clwb, avx512ifma,
                           avx512vbmi, avx512_4fmaps, avx512_4vnniw,
                           avx512_vpopcntdq, avx512_vbmi2, avx512_vnni,
                           avx512_bitalg, avx_vnni, clzero, mwaitx, ospke,
                           rdpid, ptwrite, ibt, shstk, gfni, vaes, vpclmulqdq,
                           wbnoinvd, pconfig, waitpkg, cldemote, amx_int8,
                           amx_bf16, amx_tile, movdiri, movdir64b, avx512_bf16,
                           avx512_vp2intersect, tdx, enqcmd, serialize, rdpru,
                           mcommit, sev_es, tsxldtrk, kl, widekl, uintr, hreset,
                           avx512_fp16, no87

but I can't find the code for it anywhere in the repo. Thanks!

@tkchia

@tkchia
Copy link
Owner

tkchia commented Dec 20, 2023

Hello @rationalism,

Yes, unfortunately only the assembler knows about 8087 instructions — the compiler does not currently have support for producing 8087 instructions or keeping track of the 8087 register stack. For now, one possible way to produce 8087 instructions would be to use inline assembly.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants