Skip to content

New cross target: i686-linux-android #27957

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

Merged
merged 3 commits into from
Aug 25, 2015
Merged

New cross target: i686-linux-android #27957

merged 3 commits into from
Aug 25, 2015

Conversation

overminder
Copy link
Contributor

  • All the libstd tests are passing in the optimized build against
    a Zenfone2 and the x86 Android emulator.

I haven't tested the other libraries though.

- All the libstd tests are now passing in the optimized build against
  a Zenfone2 and the x86 Android simulator.
@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (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. 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.

@hanna-kruppe
Copy link
Contributor

If I read this correctly, this target won't use SSE and SSE2 instructions, instead restricting itself to x87. Correct?

That would be inconsistent with all other i686 targets (in tree, at least), leave performance on the table, and cause many floating point operations to occasionally be slightly inaccurate (i.e., have more rounding error than necessary), from basic arithmetic to the parsing of decimal strings. Assuming x86 Android phones don't use ancient hardware like Pentium < 4 or Athlon XP, there is no harm in using a baseline microarchitecture that has SSE and SSE2, such as Pentium 4. See the other i686 targets in librustc_back/target.

@overminder
Copy link
Contributor Author

Thanks for the pointers! I didn't know that :P
I will set its CPU to 'pentium4' and test libstd again.

That line is in a `#[cfg(target_os = "macos")]` block..
@alexcrichton
Copy link
Member

@bors: r+ 6887d8c

Thanks!

@bors
Copy link
Collaborator

bors commented Aug 25, 2015

⌛ Testing commit 6887d8c with merge 19aadd5...

bors added a commit that referenced this pull request Aug 25, 2015
- All the libstd tests are passing in the optimized build against
  a Zenfone2 and the x86 Android emulator.

I haven't tested the other libraries though.
@bors bors merged commit 6887d8c into rust-lang:master Aug 25, 2015
@overminder
Copy link
Contributor Author

Thanks.

By the way, one of the most time-consuming work during the porting was to ensure that the FFI types defined in Rust (e.g., libc::stat) are exactly the same as defined in the target's C headers. I eventually just made a build script to generate C functions to return the sizeofs and offsets of some of the fields and structs, and compare them with the Rust ones. Do we have a more automatic way to do that?

Another thing that I didn't quite understand was that there were two stat definitions in Rust, one in liblibc and the other in libstd (std::os::unix::raw). That also caused me some troubles.. Could someone explain why it's the case?

@overminder overminder deleted the aug23-i686-android branch August 27, 2015 03:01
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