Thread overview
instruction set module
Oct 11, 2006
nobody_
Oct 11, 2006
nobody_
Oct 12, 2006
nobody_
October 11, 2006
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
"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
>
> 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
"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
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;
>    }
> }