digitalmars.D.learn - SSE intrinsics?
- Hoenir <mrmocool gmx.de> Nov 19 2008
- bearophile <bearophileHUGS lycos.com> Nov 19 2008
- Hoenir <mrmocool gmx.de> Nov 19 2008
- "Jarrett Billingsley" <jarrett.billingsley gmail.com> Nov 19 2008
- Trass3r <mrmocool gmx.de> Jan 22 2009
- Jarrett Billingsley <jarrett.billingsley gmail.com> Jan 22 2009
Does DMD provide/support something like the SSE intrinsics available in C++? Or is it only available in GDC? I'm not sure if this sort of thing belongs to front- or backend.
Nov 19 2008
Hoenir:Does DMD provide/support something like the SSE intrinsics available in C++?
Currently not. You can use SSE instructions inlining assembly code (it's not too much difficult, there are documents online that show you how to use the SSE instructions, but it may require some time to write the code). Bye, bearophile
Nov 19 2008
bearophile schrieb:Hoenir:Does DMD provide/support something like the SSE intrinsics available in C++?
Currently not. You can use SSE instructions inlining assembly code (it's not too much difficult, there are documents online that show you how to use the SSE instructions, but it may require some time to write the code).
time-consuming and harder to maintain/change ;)
Nov 19 2008
On Wed, Nov 19, 2008 at 1:32 PM, bearophile <bearophileHUGS lycos.com> wrote:Hoenir:Does DMD provide/support something like the SSE intrinsics available in C++?
Currently not. You can use SSE instructions inlining assembly code (it's not too much difficult, there are documents online that show you how to use the SSE instructions, but it may require some time to write the code). Bye, bearophile
Why do that when you could use some template madness to make an SSE assembler? ;)
Nov 19 2008
Jarrett Billingsley schrieb:Why do that when you could use some template madness to make an SSE assembler? ;)
^^ Would that make sense? How do those intrinsics get evaluated? I mean in which step of compilation, in the frontend or backend, etc.
Jan 22 2009
On Thu, Jan 22, 2009 at 10:43 AM, Trass3r <mrmocool gmx.de> wrote:Jarrett Billingsley schrieb:Why do that when you could use some template madness to make an SSE assembler? ;)
^^ Would that make sense? How do those intrinsics get evaluated? I mean in which step of compilation, in the frontend or backend, etc.
It was kind of a joke, but it's entirely possible. You could write a compile-time x86 assembler that would take a string and turn it into a series of bytes. Or simpler, just convert those instructions which DMD doesn't know about into bytes, and leave the other instructions alone. You can then mix that into an assembly statement. It's probably incredibly impractical for all but the simplest cases but keep in mind that the compiler _is_ Turing-complete.
Jan 22 2009









Hoenir <mrmocool gmx.de> 