April 25, 2012 Re: Can we kill the D calling convention already? | ||||
---|---|---|---|---|
| ||||
Posted in reply to mta`chrono | 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
|
April 25, 2012 Re: Can we kill the D calling convention already? | ||||
---|---|---|---|---|
| ||||
Posted in reply to CTFE-4-the-win | 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: >>> 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. > > Hmmm... actually, only the symbols marked with 'export' would matter, we > could have our own super optimized calling convention internally... no? > export doesn't currently do anything anywhere but on Windows, and it seems like this situation won't change for some time. -- - Alex |
April 25, 2012 Re: Can we kill the D calling convention already? | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Nadlinger | On 25-04-2012 20:48, David Nadlinger wrote: > 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 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. -- - Alex |
April 25, 2012 Re: Can we kill the D calling convention already? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alex Rønne Petersen | 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
|
April 26, 2012 Re: Can we kill the D calling convention already? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alex Rønne Petersen | 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.
|
April 26, 2012 Re: Can we kill the D calling convention already? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kagamin | On 26-04-2012 13:37, Kagamin wrote: > 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. 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. -- - Alex |
Copyright © 1999-2021 by the D Language Foundation