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

Inline ASM? #78

Closed
ghost opened this issue Sep 25, 2017 · 3 comments
Closed

Inline ASM? #78

ghost opened this issue Sep 25, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Sep 25, 2017

DMD provides inline ASM. Can't we use that instead of needing a separate assembler and linker? We've already patched up DMD. Am I missing something?

@Vild
Copy link
Member

Vild commented Sep 25, 2017

The inline assembly doesn't contain all features that a fully implemented assembler has. DMD has a custom assembler language as well.
For example it can't handle outputting 16bit or 32bit code while compiling for 64bit, it is only good for small generic thing, nothing else.

DMD doesn't have a linker built in it uses the systems linker, so PowerNex requires a crosscompiled linker.
I maybe need to read up on some osdev stuff https://wiki.osdev.org/Why_do_I_need_a_Cross_Compiler%3F

@ghost ghost closed this as completed Sep 25, 2017
@ghost
Copy link
Author

ghost commented Sep 25, 2017 via email

@Vild
Copy link
Member

Vild commented Sep 25, 2017

Inline assembly is never an alternative to a real assembler.
It is only a complement, for example I will never write init*.S as inline assembler.
Because to my knowledge LLVM/LDC doesn't support outputting 16bit or 32bit code while compiling for 64bit.

I will probably never switch to LDC, I want to add support for it, but DMD will always be the first class citizen of PowerNex.

This issue was closed.
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

1 participant