-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mangling for fixed point types #56
Comments
Is it expected that the allocation of bits as integer bits and fractional bits would be defined by the target, or should that also be included in the mangling? I'm assuming this is determined by the target. I don't like either of the suggested approaches. The most obvious available space for a mangling here is encodings beginning with
For example:
This anticipates |
The integer and fractional bits are determined by the target. Does the The
|
It's just a shorthand to avoid needing to explicitly list the six options.
The idea would be that
You have no way to know that. An implementation could very reasonably choose to allow it in other places as an extension. |
I see, so it's better to have mangle rules that cover different syntactic type combinations even if the type is invalid? (ie. |
I don't see any particular problem with there being combinations of mangling productions that don't correspond to any valid source program (that's actually really common, eg
[Note: I moved the But I don't want to get bogged down with how we specify the rule. The thing to focus on right now is what rule we use. Does the one in this comment seem OK to you? |
Those rules look fine to me. Thanks! Is there anything else I would need to do to see this in a future ABI? |
Could you open a PR for this and make sure it's linked here? |
Sorry for the delay. I have #161 ready. I'm not familiar with github PRs though to know how to reference this issue with that PR. |
Friendly ping on this. How does this PR look to you? |
This was merged in #161 |
Hi!
We are attempting to implement fixed point types in clang according to Chapter 4 of the Embedded-C Spec / ISO N1169. This extension includes the addition of up to 24 fixed point types that vary in size, sign, fract/accum, and saturated/not saturated.
The standard though does not specify mangling when using these types in C++, so usage of these types is limited to C.
Any suggestions for neatly mangling these types?
For now, we can do something along the lines of
u7fixed00
tou7fixed23
oru4SulA
(for_Sat unsigned long _Accum
as an example), but would like to see what other people's thoughts are.The text was updated successfully, but these errors were encountered: