[MSEide-MSEgui-talk] Inline asm

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[MSEide-MSEgui-talk] Inline asm

Duat

Hello :),
Support Inline Assembler x86 / 64?

Thank you



_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Inline asm

code dz
2018-09-07 21:25 UTC+01:00, Duat <[hidden email]>:
> Hello :),
> Support Inline Assembler x86 / 64?
>
> Thank you
>
>
is this a question or pull request ?


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Inline asm

Duat

no, it's just a question since I had seen that with freepascal it was not done with llvm (for various reasons). I just found your project and I wanted to understand a little bit ..
Sorry for my bad English.
;)

Il 07/09/2018 22:47, code dz ha scritto:
2018-09-07 21:25 UTC+01:00, Duat [hidden email]:
Hello :),
Support Inline Assembler x86 / 64?

Thank you


is this a question or pull request ?


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Inline asm

mse
Administrator
In reply to this post by Duat
On Friday 07 September 2018 22:25:43 Duat wrote:
> Hello :),
> Support Inline Assembler x86 / 64?
>
MSElang currently has no support for inline assembler. It is planned but has
low priority. It is not yet clear how MSElang variables and addresses can be
mapped to LLVM assembler tokens.
http://llvm.org/docs/LangRef.html#inline-assembler-expressions

Why do you need inline assembler?

Martin


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Inline asm

Duat

In my projects I use a lot of Inline Assembler.

https://github.com/Pigrecos

Il 08/09/2018 06:57, Martin Schreiber ha scritto:
On Friday 07 September 2018 22:25:43 Duat wrote:
Hello :),
Support Inline Assembler x86 / 64?

MSElang currently has no support for inline assembler. It is planned but has 
low priority. It is not yet clear how MSElang variables and addresses can be 
mapped to LLVM assembler tokens.
http://llvm.org/docs/LangRef.html#inline-assembler-expressions

Why do you need inline assembler?

Martin


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Inline asm

mse
Administrator
On Saturday 08 September 2018 07:25:26 Duat wrote:
> In my projects I use a lot of Inline Assembler.
>
And why do your projects need inline assembler?

Martin


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Inline asm

Duat

Actually a lot of asm code I replaced it but having a compiler that supports inline is for me and for the kind of code I write very useful (I know enough about the asm).
for example:
function TPeFile.Find (ImageBase: Pointer; ImageSize: Cardinal; Pattern: Pointer; PatternSize: Cardinal): Pointer;
asm
{$ IFDEF CPUX64}
@pattern_search_begin:
push rcx
push rdi /
push rsi
push r10
xor rdi, rdi
xor rsi, rsi
xor r10, r10
sub edx, r9d
@pattern_search_loop:
cmp esi, edx
jae @pattern_search_not_found
mov r10b, byte ptr [r8 + rdi]
cmp r10b, byte ptr [rcx + rdi]
je @pattern_search_matched
cmp r10b, 0CCh
jne @pattern_search_continue
@pattern_search_matched:
inc edi
cmp edi, r9d
jae @pattern_search_exit
jmp @pattern_search_loop
@pattern_search_continue:
xor rdi, rdi
inc rcx
inc
jmp @pattern_search_loop
@pattern_search_not_found:
xor rcx, rcx
@pattern_search_exit:
mov rax, rcx
pop r10
pop rsi
pop rdi
pop rcx
{$ ENDIF}
end;

I congratulate you for the great work you did and what you are doing with llvm (which is not really user-friendly)

Il 08/09/2018 09:20, Martin Schreiber ha scritto:
On Saturday 08 September 2018 07:25:26 Duat wrote:
In my projects I use a lot of Inline Assembler.

And why do your projects need inline assembler?

Martin


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Inline asm

mse
Administrator
On Saturday 08 September 2018 12:42:16 Duat wrote:
> Actually a lot of asm code I replaced it but having a compiler that
> supports inline is for me and for the kind of code I write very useful
> (I know enough about the asm).
> for example:

[...]

That means you need assembler in order to improve performance?
I hope that it should be not necessary anymore with MSElang-LLVM. ;-)
If you like we can make a little benchmark. If you send a small pascal routine
i can check what MSElang-LLVM makes with it on 32 bit Linux.
>
> I congratulate you for the great work you did and what you are doing
> with llvm (which is not really user-friendly)
>
Thanks!

Martin


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk