Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
October 11, 2006 instruction set module | ||||
---|---|---|---|---|
| ||||
I might sound really ignorant, so please tell me if I do. Instruction sets are only accessible throught assembler, right? Would it be possible to write an module which makes some of the more general instructions available through functions? Or is D already fully uptimized in such a way that this would not yield any performance increase? |
October 11, 2006 Re: instruction set module | ||||
---|---|---|---|---|
| ||||
Posted in reply to nobody_ | "nobody_" <spam@spam.spam> wrote in message news:egioi6$1482$1@digitaldaemon.com... >I might sound really ignorant, so please tell me if I do. > > Instruction sets are only accessible throught assembler, right? > Would it be possible to write an module which makes some of the more > general instructions available through functions? > Or is D already fully uptimized in such a way that this would not yield > any performance increase? Do you mean something like std.intrinsic: http://www.digitalmars.com/d/phobos/std_intrinsic.html ? |
October 11, 2006 Re: instruction set module | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | >
> Do you mean something like std.intrinsic: http://www.digitalmars.com/d/phobos/std_intrinsic.html ?
Yup somthing like that :)
But those aren't all instructions.. I think ;)
|
October 11, 2006 Re: instruction set module | ||||
---|---|---|---|---|
| ||||
Posted in reply to nobody_ | "nobody_" <spam@spam.spam> wrote in message news:egj832$1ka6$1@digitaldaemon.com... > > >> Do you mean something like std.intrinsic: http://www.digitalmars.com/d/phobos/std_intrinsic.html ? > > Yup somthing like that :) > But those aren't all instructions.. I think ;) Well, what instructions are you looking to use? This theoretical module would also be quite platform-dependent, if you're looking to use things like SSE3 or something.. If you'd like, you could write your own functions to wrap the assembly instructions you'd like to use, like: // useless function void Move(int* dest, int* src) { asm { mov EBX, src; mov EAX, [EBX]; mov EBX, dest; mov [EBX], EAX; } } |
October 12, 2006 Re: instruction set module | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | Thx
I've been looking through all the instruction sets and, yes, it would be
really platform-dependent.
And the most interesting are still to come: SSE4 :)
> Well, what instructions are you looking to use? This theoretical module would also be quite platform-dependent, if you're looking to use things like SSE3 or something..
>
> If you'd like, you could write your own functions to wrap the assembly instructions you'd like to use, like:
>
> // useless function
> void Move(int* dest, int* src)
> {
> asm
> {
> mov EBX, src;
> mov EAX, [EBX];
> mov EBX, dest;
> mov [EBX], EAX;
> }
> }
|
Copyright © 1999-2021 by the D Language Foundation