How to port this GCC assembly to gdc?
drug
drug2004 at bk.ru
Thu Oct 24 17:15:43 UTC 2019
On 10/24/19 8:01 PM, Iain Buclaw wrote:
> You can do the following:
>
> void somefunc()
> {
> asm {
> "990: nop" ~
> ".pushsection .note.stapsdt,\"?\",\"note\"" ~
> ".balign 4" ~
> ".4byte 992f-991f, 994f-993f, 3" ~
> "991: .asciz \"stapsdt\"" ~
> "992: .balign 4" ~
> "993: .8byte 990b" ~
> ".8byte _.stapsdt.base" ~
> ".8byte 0" ~
> ".asciz \"myapp\"" ~
> ".asciz \"func_call\"" ~
> ".asciz \"%n[_SDT_S1]@%[_SDT_A1] %n[_SDT_S2]@%[_SDT_A2]\"" ~
> "994: .balign 4" ~
> ".popsection\n"
> :: [_SDT_S1] "n" (4),
> [_SDT_A1] "nor" ((a)),
> [_SDT_S2] "n" (4),
> [_SDT_A2] "nor" ((b))
> } // <= line 26
> }
>
> The instruction string can be generated at CTFE.
>
Unfortunately I doesn't work https://godbolt.org/z/ly2yBT
```
source/app.d:26:3: error: expression expected, not '}'
```
More information about the D.gnu
mailing list