Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Conversation

yebblies
Copy link
Contributor

Requires: dlang/dmd#4984

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need a better name than "ind" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the dmd backend op names. Do you have any ideas on a good namespacing scheme for builtins? Does it make sense to have some common ones?

Something like digitalmars.* gcc.* llvm.* d.*?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a namespace for them could be a possibility. But I would consider volatileLoad and volatileStore common between all compilers - unlike y2lx or cmpxchg - and so will need a meaningful name.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this been taken to the NG? I might need a few days to think it over, but maybe we should talk it out there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, so dmd.yl2x and d.volatileLoad or something...

With the current PR I have it's possible to do this:

version (GDC)
{
    pragma(intrinsic, "gdc.volatileLoad", ...);
}
else version (DMD)
{
    pragma(intrinsic, "dmd.volatileLoad", ...);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. But we should only deviate when we strictly need to. :-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about d.* for intrinsics available on all compilers (e.g. d.volatileLoad) and dmd.*, gdc.*, ldc.*, etc. for the ones that are not portable across compilers?

@dlang-bot dlang-bot added Needs Rebase needs a `git rebase` performed stalled labels Jan 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Needs Rebase needs a `git rebase` performed stalled

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants