assembler support
transfer xml into specific text-formats (html, dot, source-code, ...)
Brought to you by:
eckard_klotz
Hello Eckard,
do you have an idea how to pass inline assembler through the parser?
Code like this
__asm volatile (" MRC p0, #0, %[result], c7, c1 " : [result] "=r" (valCR7) : );
valCR7 = (valCR7 & 0xFFFFFF00U) | (SMK_FLASH_USAGE_UNBLOCK_NOT_REQUESTED);
__asm volatile (" MCR p0, #0, %[input], c7, c1 " : : [input] "r" (valCR7) );
fails. I tried to enhance the UserGrammar.a2x by adding
userAttribute =
("__" >> "VARIABLE_PREPROCESSOR")
| ("__" >> "FUNC_RET_PREPROCESSOR")
| ("__" >> "FUNC_PARAM_PREPROCESSOR")
| ("__" >> "asm")
;
but without success
BR
Wasili
Hello Wasili.
The coding of inline-assembler is very compiler specific.
However this is something that could not be supported by a standard solution.
Thus I would not accept this as a bug.
Your idea to solve this with the user-grammar is the only possible solution. But we have to introduce a new rule (perhaps some more) to solve this problem.
Just extending the user-attribute will not help.
Please give me some time to set-up a basic solution. Once I have something, I will create a new topic in the development forum to continue this discussion.
Have a happy new year, take care about you and stay healthy,
Eckard.
Last edit: Eckard Klotz 2020-12-29
Hello Wasili.
As already mentioned above I have set up a new topic User Extension of the C/Cpp Grammar for Inline-Assembler in the development discussion .
Here I posted a first trial to solve your issue regarding your inline assembler.
I wish you a happy new year and please stay healthy,
Eckard.
Last edit: Eckard Klotz 2020-12-30