Skip to content
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

Update i686-linux-android features to match android x86 ABI. #33651

Merged

Conversation

Nercury
Copy link
Contributor

@Nercury Nercury commented May 15, 2016

Based on android's official x86 ABI info, the x86 baseline CPU can be safely updated to pentiumpro, with the addition of MMX, SSE, SSE2, SSE3, SSSE3 features.

r? @alexcrichton

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@Nercury Nercury force-pushed the update-i686-android-target-to-match-abi branch from 0b213d1 to 148b5e4 Compare May 15, 2016 11:34
@nagisa
Copy link
Member

nagisa commented May 16, 2016

Despite Android docs claiming this is supposed to target PentiumPRO (which is what i686 is, in fact), the SSSE3 was introduced with Intel Core. Thus, I think pentium4 (a 2 generation predecessor for Core) is a safe-enough choice and downgrading to pentiumpro is a pessimisation.

@MagaTailor
Copy link

32-bit x86 compiler development is pretty much in maintenance mode so this change could probably end up a very small optimisation (as long as all those sse feature sets are available). But yeah, it's cleaner and more consistent to just add +sse3, +ssse3 to the currently exposed cpu.

@Nercury
Copy link
Contributor Author

Nercury commented May 16, 2016

I have no idea why Google used PentiumPro as the base CPU, and that might be "pessimisation", but I included a link to official docs in this PR, and I think that having CPU (or any features for that matter) that differ from official requirement will only add to slight confusion in the future for anyone following the link.

@nagisa
Copy link
Member

nagisa commented May 16, 2016

@Nercury they refer to the PentiumPro as the instruction set (i.e. the -mcpu=i686 thing), and not the PentiumPro, the processor generation. As far as instruction sets go, Pentium4 (pre-2004 ones, at least) is the same thing as PentiumPro + mmx + sse + sse2 (p4 has no ssse3 or sse3).

That being said and looking some history up, turns out pentium4 was such a disaster in core design that optimising for it might end up with worse results than optimising for PentiumPro. I guess the only true way to decide on the right choice would be to benchmark.

@Nercury
Copy link
Contributor Author

Nercury commented May 16, 2016

@petevine this target is most useful for running in emulator, until we get the x86_64 target up.

@MagaTailor
Copy link

@Nercury Absolutely, this change is necessary to correct the target spec - you could even bump the cpu to core, as @nagisa implied, and call it a day. And besides, on a funny note, if you put the word pentiumpro anywhere near i686 that might give people ideas ;)

@alexcrichton
Copy link
Member

@bors: r+ 148b5e4

Thanks!

bors added a commit that referenced this pull request May 17, 2016
…i, r=alexcrichton

Update i686-linux-android features to match android x86 ABI.

Based on [android's official x86 ABI info](http://developer.android.com/ndk/guides/abis.html#x86), the x86 baseline CPU can be safely updated to `pentiumpro`, with the addition of `MMX`, `SSE`, `SSE2`, `SSE3`, `SSSE3` features.

r? @alexcrichton
@bors
Copy link
Contributor

bors commented May 17, 2016

⌛ Testing commit 148b5e4 with merge 5743564...

@bors bors merged commit 148b5e4 into rust-lang:master May 17, 2016
@Nercury Nercury deleted the update-i686-android-target-to-match-abi branch May 17, 2016 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants