Forum > General

possible to add inlined CPU-specific assembly language instructions?

<< < (2/4) > >>

Laksen:
The BSR and BSF instructions have intrinsic functions(and emulated functions on unsupported architectures): BsrQWord, and other variations

marcov:
Intrinsics generally don't have a RTL implementation their code is generated in the compiler codegenerator.

Bloody mess:
Is there any chance that "assembler inside inline procedure/function" support would be added? It's very sadly and makes me crying sometimes. I even think to use gcc instead.

"enhance the assembler parser to detect destroyed registers, deal with branches while inlining assembler. And implement it of course" - I would like to do this, but do not know how, unfortunately. And I don't get why need to detect destroyed registers, I always save and restore used registers, for example.

marcov:

--- Quote from: Bloody mess on January 21, 2015, 08:57:25 pm ---Is there any chance that "assembler inside inline procedure/function" support would be added? It's very sadly and makes me crying sometimes.

--- End quote ---

There is always any chance, simply because somebody could suddenly turn up and submit a patch.  But I don't think it is on current roadmaps.

Note that there are are several ways to do this. Going the assembler centric way as you say, or going a more modern way introduction a node syntax (like LLVM) or register independent syntax like GCC.

Or, if we take to the spirit of the early part of this thread, expand the intrinsics support.


--- Quote ---I even think to use gcc instead.

--- End quote ---

Afaik GCC doesn't either, it requires a special format.

Leledumbo:

--- Quote from: marcov on January 22, 2015, 10:48:11 am ---Afaik GCC doesn't either, it requires a special format.

--- End quote ---
with

--- Code: ---__attribute__((always_inline));
--- End code ---
it does.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version