digitalmars.D - Can we kill the D calling convention already?
- =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= (16/16) Apr 24 2012 Writing portable code is hard enough as it is. Why do we have to have
- Gor Gyolchanyan (32/51) Apr 24 2012 There are lots of times, when a specialized custom calling convention
- =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= (6/51) Apr 24 2012 I'm not sure what that has to do with the state of extern(D), but yes, I...
- Kagamin (4/4) Apr 24 2012 Speaking about GDC, you can't link to omf files directly - so
- =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= (7/11) Apr 24 2012 The point is just that: Right now I can write assembly that will work on...
- Iain Buclaw (8/18) Apr 24 2012 Is not just Windows, the DMD calling convention on Linux differs from
- =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= (4/23) Apr 24 2012 It just gets better and better! :)
- mta`chrono (6/6) Apr 24 2012 As D is more than just C or C++ it may take account for providing it's
- Erik Jensen (6/33) Apr 24 2012 That is incorrect. The cdecl calling convention is caller
- Iain Buclaw (11/40) Apr 24 2012 's
- Paulo Pinto (5/32) Apr 24 2012 This means that in the end we have the same ABI issues between
- =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= (4/30) Apr 24 2012 Exactly. We can do better, and we really should.
- Kagamin (5/8) Apr 25 2012 If it doesn't work on Windows, it should be versioned out. What
- =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= (10/17) Apr 25 2012 Yes, I added them. :)
- Paulo Pinto (9/30) Apr 25 2012 This is exactly what C++ gets blamed for, yet most people fail to
- Don Clugston (13/39) Apr 25 2012 No, it's totally the fault of C++. C++ failed to specify it, so everyone...
- Paulo Pinto (19/64) Apr 25 2012 As far as I am aware this is the same in all languages. I am not
- Kagamin (4/10) Apr 26 2012 Don't implement complex logic in assembly, extract it to D or C
- =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= (9/17) Apr 26 2012 Look, your argument is just plain invalid. Please reread what I said:
- mta`chrono (3/19) Apr 25 2012 Introducing a commen calling convention would be one approach. The other
- =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= (5/24) Apr 25 2012 All the big compiler back ends are not realistically going to implement
- CTFE-4-the-win (5/11) Apr 25 2012 Hmmm... actually, only the symbols marked with 'export' would
- =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= (5/13) Apr 25 2012 export doesn't currently do anything anywhere but on Windows, and it
- Jonathan M Davis (3/5) Apr 25 2012 And I hope that it never does. I hate export with a passion.
- David Nadlinger (4/6) Apr 25 2012 Templatize D's inline assembler? Do you mean using compiler
- =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= (6/12) Apr 25 2012 Or perhaps use template arguments to carry info about the calling
Writing portable code is hard enough as it is. Why do we have to have some random, D-specialized calling convention (only on Win32 and only in DMD)? The result of the current state of things is that extern(D) is essentially useless - it has completely different meanings across compilers. You cannot rely on it at all. If memory serves me right, both LDC and GDC just alias it to extern(C), but DMD insists on using this magical D calling convention on Win32. I'm not attacking the D ABI (name mangling) here, but I do think this calling convention needs to either go away, or be optional (i.e. as some extern() argument). We *have* to make extern(D) consistent across compilers, or we'll be no better than the mess that is C and C++; we're advertising a standard inline assembler with support for naked functions, but that support is useless if we don't have a consistent default calling convention. -- - Alex
Apr 24 2012
There are lots of times, when a specialized custom calling convention is necessary. For instance, I need a dynamic typing subsystem, to create abstract state machines, which can be effortlessly adapted to run-time heterogeneous data. I already made a function, that takes arbitrary arguments and tightly packs them in a single chunk of memory, making a run-time defined structures. A new calling convention would normalize the ABI of all functions, making them all take a single pointer to such a structure. This will allow to safely discard the static type info of the functions, allowing them to be stored in and called from statically homogeneous containers (like the ones inside an abstract state machine). Currently, in order to do that, you'd need to define a function in a very weird way and use tons of mixins to inject naked function assembly to do this without the overhead of going through the current static-only type system and calling conventions. A simple option of allowing to define custom calling convention would already lead to library solutions, that make D equally effective static and dynamic typed language simultaneously (which would be beautifully integrated with each other). On Tue, Apr 24, 2012 at 1:10 PM, Iain Buclaw <ibuclaw ubuntu.com> wrote:On 24 April 2012 10:08, Iain Buclaw <ibuclaw ubuntu.com> wrote:rote:On 24 April 2012 09:42, Alex R=C3=B8nne Petersen <xtzgzorex gmail.com> w=omeWriting portable code is hard enough as it is. Why do we have to have s=)?random, D-specialized calling convention (only on Win32 and only in DMD=llyThe result of the current state of things is that extern(D) is essentia=nnotuseless - it has completely different meanings across compilers. You ca=as itrely on it at all. If memory serves me right, both LDC and GDC just ali=n onto extern(C), but DMD insists on using this magical D calling conventio=--=20 Bye, Gor Gyolchanyan.s/ running on / compiling for / -- Iain Buclaw *(p < e ? p++ : p) =3D (c & 0x0f) + '0';Win32.extern(System) would be a more accurate description of what GDC does, as it uses the default calling convention for the target/platform you are running on, which may not neccessarily be extern(C).
Apr 24 2012
On 24-04-2012 11:41, Gor Gyolchanyan wrote:There are lots of times, when a specialized custom calling convention is necessary. For instance, I need a dynamic typing subsystem, to create abstract state machines, which can be effortlessly adapted to run-time heterogeneous data. I already made a function, that takes arbitrary arguments and tightly packs them in a single chunk of memory, making a run-time defined structures. A new calling convention would normalize the ABI of all functions, making them all take a single pointer to such a structure. This will allow to safely discard the static type info of the functions, allowing them to be stored in and called from statically homogeneous containers (like the ones inside an abstract state machine). Currently, in order to do that, you'd need to define a function in a very weird way and use tons of mixins to inject naked function assembly to do this without the overhead of going through the current static-only type system and calling conventions. A simple option of allowing to define custom calling convention would already lead to library solutions, that make D equally effective static and dynamic typed language simultaneously (which would be beautifully integrated with each other). On Tue, Apr 24, 2012 at 1:10 PM, Iain Buclaw<ibuclaw ubuntu.com> wrote:I'm not sure what that has to do with the state of extern(D), but yes, I agree that custom calling conventions could be useful in some specialized cases. -- - AlexOn 24 April 2012 10:08, Iain Buclaw<ibuclaw ubuntu.com> wrote:On 24 April 2012 09:42, Alex Rønne Petersen<xtzgzorex gmail.com> wrote:s/ running on / compiling for / -- Iain Buclaw *(p< e ? p++ : p) = (c& 0x0f) + '0';Writing portable code is hard enough as it is. Why do we have to have some random, D-specialized calling convention (only on Win32 and only in DMD)? The result of the current state of things is that extern(D) is essentially useless - it has completely different meanings across compilers. You cannot rely on it at all. If memory serves me right, both LDC and GDC just alias it to extern(C), but DMD insists on using this magical D calling convention on Win32.extern(System) would be a more accurate description of what GDC does, as it uses the default calling convention for the target/platform you are running on, which may not neccessarily be extern(C).
Apr 24 2012
Speaking about GDC, you can't link to omf files directly - so there shouldn't be any binary incompatibility. If the assembler code is unportable across compilers, it's a developer's mistake or intention.
Apr 24 2012
On 24-04-2012 11:42, Kagamin wrote:Speaking about GDC, you can't link to omf files directly - so there shouldn't be any binary incompatibility. If the assembler code is unportable across compilers, it's a developer's mistake or intention.The point is just that: Right now I can write assembly that will work on GDC, LDC, and DMD on non-Windows. It will not work for DMD on Windows. Something has to change here. You're missing the point if you think this is a "developer mistake". -- - Alex
Apr 24 2012
On 24 April 2012 11:29, Alex R=F8nne Petersen <xtzgzorex gmail.com> wrote:On 24-04-2012 11:42, Kagamin wrote:Is not just Windows, the DMD calling convention on Linux differs from the system calling convention. For example, some of the naked functions in std.math returning floating point values assumes caller clean up. Where as the C calling convention is callee clean up. --=20 Iain Buclaw *(p < e ? p++ : p) =3D (c & 0x0f) + '0';Speaking about GDC, you can't link to omf files directly - so there shouldn't be any binary incompatibility. If the assembler code is unportable across compilers, it's a developer's mistake or intention.The point is just that: Right now I can write assembly that will work on GDC, LDC, and DMD on non-Windows. It will not work for DMD on Windows. Something has to change here. You're missing the point if you think this is a "developer mistake".
Apr 24 2012
On 24-04-2012 16:39, Iain Buclaw wrote:On 24 April 2012 11:29, Alex Rønne Petersen<xtzgzorex gmail.com> wrote:It just gets better and better! :) -- - AlexOn 24-04-2012 11:42, Kagamin wrote:Is not just Windows, the DMD calling convention on Linux differs from the system calling convention. For example, some of the naked functions in std.math returning floating point values assumes caller clean up. Where as the C calling convention is callee clean up.Speaking about GDC, you can't link to omf files directly - so there shouldn't be any binary incompatibility. If the assembler code is unportable across compilers, it's a developer's mistake or intention.The point is just that: Right now I can write assembly that will work on GDC, LDC, and DMD on non-Windows. It will not work for DMD on Windows. Something has to change here. You're missing the point if you think this is a "developer mistake".
Apr 24 2012
As D is more than just C or C++ it may take account for providing it's own calling convention. _BUT_ (That's the point, I agree to Alex), it needs to be consistent across _different compilers for the same plattform_. Maybe someone can point out the benefits of having a different calling convention on linux and windows for the same target machine.
Apr 24 2012
On Tuesday, 24 April 2012 at 14:40:05 UTC, Iain Buclaw wrote:On 24 April 2012 11:29, Alex Rønne Petersen <xtzgzorex gmail.com> wrote:That is incorrect. The cdecl calling convention is caller clean-up (see http://en.wikipedia.org/wiki/X86_calling_conventions). Otherwise, variable argument functions would not be possible (the called function doesn't know what to clean up).On 24-04-2012 11:42, Kagamin wrote:Is not just Windows, the DMD calling convention on Linux differs from the system calling convention. For example, some of the naked functions in std.math returning floating point values assumes caller clean up. Where as the C calling convention is callee clean up.Speaking about GDC, you can't link to omf files directly - so there shouldn't be any binary incompatibility. If the assembler code is unportable across compilers, it's a developer's mistake or intention.The point is just that: Right now I can write assembly that will work on GDC, LDC, and DMD on non-Windows. It will not work for DMD on Windows. Something has to change here. You're missing the point if you think this is a "developer mistake".
Apr 24 2012
On 24 April 2012 17:05, Erik Jensen <eriksjunk rkjnsn.net> wrote:On Tuesday, 24 April 2012 at 14:40:05 UTC, Iain Buclaw wrote:e:On 24 April 2012 11:29, Alex R=F8nne Petersen <xtzgzorex gmail.com> wrot='sOn 24-04-2012 11:42, Kagamin wrote:Speaking about GDC, you can't link to omf files directly - so there shouldn't be any binary incompatibility. If the assembler code is unportable across compilers, it's a developer=nmistake or intention.The point is just that: Right now I can write assembly that will work o=eThat is incorrect. The cdecl calling convention is caller clean-up (see http://en.wikipedia.org/wiki/X86_calling_conventions). Otherwise, variabl=GDC, LDC, and DMD on non-Windows. It will not work for DMD on Windows. Something has to change here. You're missing the point if you think this is a "developer mistake".Is not just Windows, the DMD calling convention on Linux differs from the system calling convention. =A0For example, some of the naked functions in std.math returning floating point values assumes caller clean up. =A0Where as the C calling convention is callee clean up.argument functions would not be possible (the called function doesn't kno=wwhat to clean up).I forget which, but I'm pretty certain the CDecl calling convention does not call 'ret PARAMSIZE;' when returning floats. =3D) --=20 Iain Buclaw *(p < e ? p++ : p) =3D (c & 0x0f) + '0';
Apr 24 2012
This means that in the end we have the same ABI issues between D compilers, as in other languages I suppose, right? -- Paulo On Tuesday, 24 April 2012 at 14:40:05 UTC, Iain Buclaw wrote:On 24 April 2012 11:29, Alex Rønne Petersen <xtzgzorex gmail.com> wrote:On 24-04-2012 11:42, Kagamin wrote:Is not just Windows, the DMD calling convention on Linux differs from the system calling convention. For example, some of the naked functions in std.math returning floating point values assumes caller clean up. Where as the C calling convention is callee clean up.Speaking about GDC, you can't link to omf files directly - so there shouldn't be any binary incompatibility. If the assembler code is unportable across compilers, it's a developer's mistake or intention.The point is just that: Right now I can write assembly that will work on GDC, LDC, and DMD on non-Windows. It will not work for DMD on Windows. Something has to change here. You're missing the point if you think this is a "developer mistake".
Apr 24 2012
On 24-04-2012 19:54, Paulo Pinto wrote:This means that in the end we have the same ABI issues between D compilers, as in other languages I suppose, right? -- Paulo On Tuesday, 24 April 2012 at 14:40:05 UTC, Iain Buclaw wrote:Exactly. We can do better, and we really should. -- - AlexOn 24 April 2012 11:29, Alex Rønne Petersen <xtzgzorex gmail.com> wrote:On 24-04-2012 11:42, Kagamin wrote:Is not just Windows, the DMD calling convention on Linux differs from the system calling convention. For example, some of the naked functions in std.math returning floating point values assumes caller clean up. Where as the C calling convention is callee clean up.Speaking about GDC, you can't link to omf files directly - so there shouldn't be any binary incompatibility. If the assembler code is unportable across compilers, it's a developer's mistake or intention.The point is just that: Right now I can write assembly that will work on GDC, LDC, and DMD on non-Windows. It will not work for DMD on Windows. Something has to change here. You're missing the point if you think this is a "developer mistake".
Apr 24 2012
On Tuesday, 24 April 2012 at 10:29:52 UTC, Alex Rønne Petersen wrote:The point is just that: Right now I can write assembly that will work on GDC, LDC, and DMD on non-Windows. It will not work for DMD on Windows. Something has to change here.If it doesn't work on Windows, it should be versioned out. What we have: http://dlang.org/version.html#PredefinedVersions - versions for LDC, GDC, DMD and Windows - all what you want.
Apr 25 2012
On 25-04-2012 15:06, Kagamin wrote:On Tuesday, 24 April 2012 at 10:29:52 UTC, Alex Rønne Petersen wrote:Yes, I added them. :) You're missing the point. D is providing (or trying to provide) a standard inline assembler, but calling conventions are not standardized enough for it to be useful across compilers. If you're writing inline assembly because you *have* to, you don't just "version it out", you have to write different logic for different compilers, which is a maintenance nightmare. -- - AlexThe point is just that: Right now I can write assembly that will work on GDC, LDC, and DMD on non-Windows. It will not work for DMD on Windows. Something has to change here.If it doesn't work on Windows, it should be versioned out. What we have: http://dlang.org/version.html#PredefinedVersions - versions for LDC, GDC, DMD and Windows - all what you want.
Apr 25 2012
On Wednesday, 25 April 2012 at 14:32:13 UTC, Alex Rønne Petersen wrote:On 25-04-2012 15:06, Kagamin wrote:This is exactly what C++ gets blamed for, yet most people fail to realize that the situation is common to all languages that generate native code. The only reason it works out for C, is that the C ABI is actually the OS ABI, as such all C compilers tend to have a common ABI. It would be nice if I could use D libraries without having to worry which compiler was used to generate them.On Tuesday, 24 April 2012 at 10:29:52 UTC, Alex Rønne Petersen wrote:Yes, I added them. :) You're missing the point. D is providing (or trying to provide) a standard inline assembler, but calling conventions are not standardized enough for it to be useful across compilers. If you're writing inline assembly because you *have* to, you don't just "version it out", you have to write different logic for different compilers, which is a maintenance nightmare.The point is just that: Right now I can write assembly that will work on GDC, LDC, and DMD on non-Windows. It will not work for DMD on Windows. Something has to change here.If it doesn't work on Windows, it should be versioned out. What we have: http://dlang.org/version.html#PredefinedVersions - versions for LDC, GDC, DMD and Windows - all what you want.
Apr 25 2012
On 25/04/12 17:05, Paulo Pinto wrote:On Wednesday, 25 April 2012 at 14:32:13 UTC, Alex Rønne Petersen wrote:No, it's totally the fault of C++. C++ failed to specify it, so everyone did something different. Then you get this very unfortunate mindset where everyone is so used to it, they don't find it unacceptable any more.On 25-04-2012 15:06, Kagamin wrote:This is exactly what C++ gets blamed for, yet most people fail to realize that the situation is common to all languages that generate native code.On Tuesday, 24 April 2012 at 10:29:52 UTC, Alex Rønne Petersen wrote:Yes, I added them. :) You're missing the point. D is providing (or trying to provide) a standard inline assembler, but calling conventions are not standardized enough for it to be useful across compilers. If you're writing inline assembly because you *have* to, you don't just "version it out", you have to write different logic for different compilers, which is a maintenance nightmare.The point is just that: Right now I can write assembly that will work on GDC, LDC, and DMD on non-Windows. It will not work for DMD on Windows. Something has to change here.If it doesn't work on Windows, it should be versioned out. What we have: http://dlang.org/version.html#PredefinedVersions - versions for LDC, GDC, DMD and Windows - all what you want.The only reason it works out for C, is that the C ABI is actually the OS ABI, as such all C compilers tend to have a common ABI.Not true. The ABI for Win32 is __stdcall, not C. Pascal and Fortran calling conventions were always well standardized, too.It would be nice if I could use D libraries without having to worry which compiler was used to generate them.Yes. This is mandatory. It'd be fantastic if we had a calling convention that depended ONLY on the CPU, not on the OS. But I don't know if it is feasible. The Windows64 calling convention is standardized, and it's different to the Linux64 one. I don't know if it's even possible to use a different calling convention on Win64, there are interactions with system exception handling.
Apr 25 2012
On Wednesday, 25 April 2012 at 15:20:31 UTC, Don Clugston wrote:On 25/04/12 17:05, Paulo Pinto wrote:As far as I am aware this is the same in all languages. I am not aware of any ISO or ANSI language standard that specifies ABIs.On Wednesday, 25 April 2012 at 14:32:13 UTC, Alex Rønne Petersen wrote:No, it's totally the fault of C++. C++ failed to specify it, so everyone did something different. Then you get this very unfortunate mindset where everyone is so used to it, they don't find it unacceptable any more.On 25-04-2012 15:06, Kagamin wrote:This is exactly what C++ gets blamed for, yet most people fail to realize that the situation is common to all languages that generate native code.On Tuesday, 24 April 2012 at 10:29:52 UTC, Alex Rønne Petersen wrote:Yes, I added them. :) You're missing the point. D is providing (or trying to provide) a standard inline assembler, but calling conventions are not standardized enough for it to be useful across compilers. If you're writing inline assembly because you *have* to, you don't just "version it out", you have to write different logic for different compilers, which is a maintenance nightmare.The point is just that: Right now I can write assembly that will work on GDC, LDC, and DMD on non-Windows. It will not work for DMD on Windows. Something has to change here.If it doesn't work on Windows, it should be versioned out. What we have: http://dlang.org/version.html#PredefinedVersions - versions for LDC, GDC, DMD and Windows - all what you want.For me this is the same, as all C compilers in Win32 are required to generate __stdcall entry points. Plus since C is nothing more than a glorified assembler, there is not much to speak about an ABI. In a way the operating system can be seen as the C language runtime (I am exaggerating a bit here). Taking your language's example, which two FORTRAN or Pascal compilers, in a given OS, are able to mix object or library files? I am just defending that I should be able to combine a mix of libraries compiled with DMD, LDC and GDC, without having to worry which is which. -- PauloThe only reason it works out for C, is that the C ABI is actually the OS ABI, as such all C compilers tend to have a common ABI.Not true. The ABI for Win32 is __stdcall, not C. Pascal and Fortran calling conventions were always well standardized, too.
Apr 25 2012
On Wednesday, 25 April 2012 at 14:32:13 UTC, Alex Rønne Petersen wrote:You're missing the point. D is providing (or trying to provide) a standard inline assembler, but calling conventions are not standardized enough for it to be useful across compilers. If you're writing inline assembly because you *have* to, you don't just "version it out", you have to write different logic for different compilers, which is a maintenance nightmare.Don't implement complex logic in assembly, extract it to D or C code.
Apr 26 2012
On 26-04-2012 13:37, Kagamin wrote:On Wednesday, 25 April 2012 at 14:32:13 UTC, Alex Rønne Petersen wrote:Look, your argument is just plain invalid. Please reread what I said: "[...] If you're writing inline assembly because you *have* to [...]". Notice the emphasis. And even if we disregarded that, the language boasts a standardized inline assembler, and therefore needs to actually make it sane to use it. As it stands, we're no better than C and C++, yet we claim we are. -- - AlexYou're missing the point. D is providing (or trying to provide) a standard inline assembler, but calling conventions are not standardized enough for it to be useful across compilers. If you're writing inline assembly because you *have* to, you don't just "version it out", you have to write different logic for different compilers, which is a maintenance nightmare.Don't implement complex logic in assembly, extract it to D or C code.
Apr 26 2012
Am 24.04.2012 10:42, schrieb Alex Rønne Petersen:Writing portable code is hard enough as it is. Why do we have to have some random, D-specialized calling convention (only on Win32 and only in DMD)? The result of the current state of things is that extern(D) is essentially useless - it has completely different meanings across compilers. You cannot rely on it at all. If memory serves me right, both LDC and GDC just alias it to extern(C), but DMD insists on using this magical D calling convention on Win32. I'm not attacking the D ABI (name mangling) here, but I do think this calling convention needs to either go away, or be optional (i.e. as some extern() argument). We *have* to make extern(D) consistent across compilers, or we'll be no better than the mess that is C and C++; we're advertising a standard inline assembler with support for naked functions, but that support is useless if we don't have a consistent default calling convention.Introducing a commen calling convention would be one approach. The other would be to templatize D's inline assembler?
Apr 25 2012
On 25-04-2012 19:44, mta`chrono wrote:Am 24.04.2012 10:42, schrieb Alex Rønne Petersen:All the big compiler back ends are not realistically going to implement some random calling convention because we tell them to. -- - AlexWriting portable code is hard enough as it is. Why do we have to have some random, D-specialized calling convention (only on Win32 and only in DMD)? The result of the current state of things is that extern(D) is essentially useless - it has completely different meanings across compilers. You cannot rely on it at all. If memory serves me right, both LDC and GDC just alias it to extern(C), but DMD insists on using this magical D calling convention on Win32. I'm not attacking the D ABI (name mangling) here, but I do think this calling convention needs to either go away, or be optional (i.e. as some extern() argument). We *have* to make extern(D) consistent across compilers, or we'll be no better than the mess that is C and C++; we're advertising a standard inline assembler with support for naked functions, but that support is useless if we don't have a consistent default calling convention.Introducing a commen calling convention would be one approach. The other would be to templatize D's inline assembler?
Apr 25 2012
On Wednesday, 25 April 2012 at 17:51:45 UTC, Alex Rønne Petersen wrote:Hmmm... actually, only the symbols marked with 'export' would matter, we could have our own super optimized calling convention internally... no?Introducing a commen calling convention would be one approach. The other would be to templatize D's inline assembler?All the big compiler back ends are not realistically going to implement some random calling convention because we tell them to.
Apr 25 2012
On 25-04-2012 20:41, CTFE-4-the-win wrote:On Wednesday, 25 April 2012 at 17:51:45 UTC, Alex Rønne Petersen wrote:export doesn't currently do anything anywhere but on Windows, and it seems like this situation won't change for some time. -- - AlexHmmm... actually, only the symbols marked with 'export' would matter, we could have our own super optimized calling convention internally... no?Introducing a commen calling convention would be one approach. The other would be to templatize D's inline assembler?All the big compiler back ends are not realistically going to implement some random calling convention because we tell them to.
Apr 25 2012
On Wednesday, April 25, 2012 21:01:39 Alex Rønne Petersen wrote:export doesn't currently do anything anywhere but on Windows, and it seems like this situation won't change for some time.And I hope that it never does. I hate export with a passion. - Jonathan M Davis
Apr 25 2012
On Wednesday, 25 April 2012 at 17:44:03 UTC, mta`chrono wrote:The other would be to templatize D's inline assembler?Templatize D's inline assembler? Do you mean using compiler intrinsics in place of raw inline assembly? David
Apr 25 2012
On 25-04-2012 20:48, David Nadlinger wrote:On Wednesday, 25 April 2012 at 17:44:03 UTC, mta`chrono wrote:Or perhaps use template arguments to carry info about the calling convention... I'm not sure what was meant either, but it seems like it would be a hack at best. -- - AlexThe other would be to templatize D's inline assembler?Templatize D's inline assembler? Do you mean using compiler intrinsics in place of raw inline assembly? David
Apr 25 2012