Re: How to port this GCC assembly to gdc?

2019-10-24 Thread drug via D.gnu
24.10.2019 22:51, Iain Buclaw пишет: On Thu, 24 Oct 2019 at 19:20, drug via D.gnu wrote: 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" ~

Re: How to port this GCC assembly to gdc?

2019-10-24 Thread Iain Buclaw via D.gnu
On Thu, 24 Oct 2019 at 19:20, drug via D.gnu wrote: > > 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" ~ > > ".4b

Re: How to port this GCC assembly to gdc?

2019-10-24 Thread drug via D.gnu
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

Re: How to port this GCC assembly to gdc?

2019-10-24 Thread Iain Buclaw via D.gnu
On Thu, 24 Oct 2019 at 16:50, drug via D.gnu wrote: > > On 10/24/19 5:41 PM, Iain Buclaw wrote: > > > > It looks like this is a top-level inline asslembler declaration? D > > doesn't support top-level inline assembler, however I think this would > > be a useful feature to allow. > > > > As for th

Re: How to port this GCC assembly to gdc?

2019-10-24 Thread drug via D.gnu
On 10/24/19 5:41 PM, Iain Buclaw wrote: It looks like this is a top-level inline asslembler declaration? D doesn't support top-level inline assembler, however I think this would be a useful feature to allow. As for the syntax, it's `asm { ... }` This is in fact DTrace probe generated by usi

Re: How to port this GCC assembly to gdc?

2019-10-24 Thread Iain Buclaw via D.gnu
On Thu, 24 Oct 2019 at 12:05, drug via D.gnu wrote: > > Hello! > > I have the following assebly: > ```C > __asm__ __volatile__ ( > "990: nop\n" \ > ".pushsection .note.stapsdt,\"?\",\"note\"\n"\ > ".balign 4\n"

Re: GDC bug? duplicates symbols when using mixin and interface

2019-10-24 Thread Daniel Kozak via D.gnu
On Thursday, 24 October 2019 at 11:05:21 UTC, Daniel Kozak wrote: ld: c.o: in function `_DT16_D1b1B8__mixin24getSMFZPv': c.d:(.text+0x27): multiple definition of `_DT16_D1b1B8__mixin24getSMFZPv'; b.o:b.d:(.text+0x38): first defined here BTW. DMD does not includes those _DT16_D1b1B8__mixin24

GDC bug? duplicates symbols when using mixin and interface

2019-10-24 Thread Daniel Kozak via D.gnu
I have been trying to compile gtkd with gdc but without success. I always end up with some duplicates symbols when gdc try to link final binary [https://github.com/gtkd-developers/GtkD/issues/282] I have tried it with ldc and dmd too, and both are working fine. So I guess there is some symbolge

How to port this GCC assembly to gdc?

2019-10-24 Thread drug via D.gnu
Hello! I have the following assebly: ```C __asm__ __volatile__ ( "990: nop\n" \ ".pushsection .note.stapsdt,\"?\",\"note\"\n"\ ".balign 4\n"\ ".4byte 992