Thread overview
[Issue 20652] extern(C++) doesn't seem to mangle the types in core.simd right
Dec 22, 2020
Walter Bright
Dec 30, 2020
Iain Buclaw
Dec 30, 2020
Dlang Bot
Dec 30, 2020
Iain Buclaw
Dec 30, 2020
Iain Buclaw
Jan 01, 2021
Dlang Bot
Jan 01, 2021
Dlang Bot
December 22, 2020
https://issues.dlang.org/show_bug.cgi?id=20652

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |SIMD
                 CC|                            |bugzilla@digitalmars.com

--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> ---
What does it mangle to and what should it mangle to?

--
December 30, 2020
https://issues.dlang.org/show_bug.cgi?id=20652

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw@gdcproject.org

--- Comment #2 from Iain Buclaw <ibuclaw@gdcproject.org> ---
And on what ABI?  MSVC++ or Itanium?

--
December 30, 2020
https://issues.dlang.org/show_bug.cgi?id=20652

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
@ibuclaw created dlang/dmd pull request #12080 "fix Issue 20652 - extern(C++) doesn't seem to mangle the types in core.simd right" fixing this issue:

- fix Issue 20652 - extern(C++) doesn't seem to mangle the types in core.simd
right

https://github.com/dlang/dmd/pull/12080

--
December 30, 2020
https://issues.dlang.org/show_bug.cgi?id=20652

--- Comment #4 from Iain Buclaw <ibuclaw@gdcproject.org> ---
(In reply to Iain Buclaw from comment #2)
> And on what ABI?  MSVC++ or Itanium?
I've just realised that there's still this in cppmangle.d

---
version (none)
{
    buf.writestring("Dv");
    buf.print((cast(TypeSArray *)t.basetype).dim.toInteger()); // -- Gnu ABI
v.4
    buf.writeByte('_');
}
else
    buf.writestring("U8__vector"); //-- Gnu ABI v.3
---

I thought I dealt with this after introducing target.cpp.typeMangle().  A pull has been raised to enable the V4 ABI path.  The V4 ABI first appeared in g++ 4.5, and became the default in g++ 5.

--
December 30, 2020
https://issues.dlang.org/show_bug.cgi?id=20652

--- Comment #5 from Iain Buclaw <ibuclaw@gdcproject.org> ---
According to the testsuite, it looks like the MSVC mangler is broken too, not just the Itanium one.

DMD: ?test20652@@YAXAET__m128@@@Z
MSVC: ?test20652@@YAXAEBT__m128@@@Z

The B looks to be for const, this has also been addressed in the PR.

--
January 01, 2021
https://issues.dlang.org/show_bug.cgi?id=20652

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #12080 "fix Issue 20652 - extern(C++) doesn't seem to mangle the types in core.simd right" was merged into stable:

- 67cbcf1dceee5b7fd327a774b1a43b6c07175561 by Iain Buclaw:
  fix Issue 20652 - extern(C++) doesn't seem to mangle the types in core.simd
right

https://github.com/dlang/dmd/pull/12080

--
January 01, 2021
https://issues.dlang.org/show_bug.cgi?id=20652

--- Comment #7 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #12088 "merge stable" was merged into master:

- cd5c6d49f3c52945cf8d1eeca4d11db6555d2125 by Iain Buclaw:
  fix Issue 20652 - extern(C++) doesn't seem to mangle the types in core.simd
right

https://github.com/dlang/dmd/pull/12088

--