-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
[spec] Add reserved version for Xtensa architecture #3894
Conversation
Thanks for your pull request and interest in making D better, @thewilsonator! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
ESP32 is LX6, -S2,S3 are LX7, which has some additional instructions. It's always 32bit as far as I know. LX7 has some rudimentary SIMD stuff, a MAC instruction in particular is something the backend will want to take advantage of. It'll be nice to feed as much knowledge as possible through |
See here: https://github.com/espressif/llvm-project/blob/xtensa_release_18.1.2/llvm/lib/Target/Xtensa/Xtensa.td#L194 |
@TurkeyMan Doesn't LDC's |
Sure. How do we know what all those features are named to test for them? |
Yeah that sounds like CPU variants, not something that should have different version.
the string is the first argument of import std.stdio;
void main() {
writeln("CPU = ", __traits(targetCPU));
writeln("Has 'sse4.1' = ", __traits(targetHasFeature, "sse4.1"));
}
in the features will be writeln("CPU = ", __traits(targetCPU)); // prints e.g. `esp32s2`
writeln("Has 'density' = ", __traits(targetHasFeature, "density"));
writeln("Has 'fp' = ", __traits(targetHasFeature, "fp"));
// ditto for "windowed", "bool", etc. |
Yes, this sounds perfect to me! |
See also ldc-developers/ldc#4725
cc @TurkeyMan is Xtensa ESP always 32-bit? What to do about Xtensa-S2/Xtensa-S3? I assume they will be specified in the target triple and any information they provide can be done through other means (e.g.
__traits(getTargetInfo)
)