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

improve mips backend #5431

Merged
merged 3 commits into from
Apr 4, 2013
Merged

improve mips backend #5431

merged 3 commits into from
Apr 4, 2013

Conversation

crabtw
Copy link
Contributor

@crabtw crabtw commented Mar 19, 2013

Because the PTHREAD_STACK_MIN of my system is larger than default size, I add the stack_sz check to prevent assertion failure.

Besides, libuv has to be modified because some flags are different from other targets. Instead of using hardcoded numbers, I change them to predefined symbols.

By the way, the toolchain I used is http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/mips-gnu-linux

libuv patch: http://people.cs.nctu.edu.tw/~jyyou/rust/mips-uv.patch

Below is the current test result.

  • core test

    stackwalk tests can cause segfault so I ignored them.

failures:
    io::tests::test_read_be_int_n
    io::tests::test_read_buffer_big_enough
    io::tests::test_read_f32
    io::tests::test_read_write_be
    io::tests::test_read_write_f32
    io::tests::test_read_write_le
    io::tests::test_simple
    io::tests::test_write_empty
    rand::tests::rng_seeded_custom_seed2
    unstable::uvll::test::test_uv_ll_struct_size_addrinfo
    unstable::uvll::test::test_uv_ll_struct_size_uv_timer_t

result: FAILED. 596 passed; 11 failed; 49 ignored
  • std test:
failures:
    time::tests::run_tests

result: FAILED. 330 passed; 1 failed; 21 ignored

@sanxiyn
Copy link
Member

sanxiyn commented Mar 19, 2013

How did you ignore stackwalking tests?

@crabtw
Copy link
Contributor Author

crabtw commented Mar 19, 2013

I added #[ignore(cfg(target_arch="mips"))] before #[test].

@yichoi
Copy link
Contributor

yichoi commented Mar 19, 2013

It will be better above libuv path and your libuv modification get merged to brson libuv branch

@crabtw
Copy link
Contributor Author

crabtw commented Mar 19, 2013

libuv is quite easy to cross compile.
It only has to specify toolchain paths and flags https:/mozilla/rust/pull/5431/files#L1R184

As for core and std tests, I did not use makefile but compiled them manually.
Here are my scripts https://gist.github.com/crabtw/5150198

@brson
Copy link
Contributor

brson commented Mar 29, 2013

Since this doesn't impact other platforms I think we can go ahead and merge this even though it looks like it won't quite work without the uv patch. I wonder what upstream's reasons are for not using the O_NONBLOCK etc. constants...

It would be nice to have a comment on the stack size code.

@crabtw
Copy link
Contributor Author

crabtw commented Mar 29, 2013

I included limits.h to expose PTHREAD_STACK_MIN and commented on stack size code

@crabtw
Copy link
Contributor Author

crabtw commented Apr 4, 2013

bors failed to merge it. Should I rebase against incoming and force push?

@thestinger
Copy link
Contributor

@crabtw: yeah, rebasing it is the best idea

@crabtw
Copy link
Contributor Author

crabtw commented Apr 4, 2013

I rebased and pushed.

bors added a commit that referenced this pull request Apr 4, 2013
Because the PTHREAD_STACK_MIN of my system is larger than default size, I add the stack_sz check to prevent assertion failure.

Besides, libuv has to be modified because some flags are different from other targets. Instead of using hardcoded numbers, I change them to predefined symbols.

By the way, the toolchain I used is http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/mips-gnu-linux

libuv patch: http://people.cs.nctu.edu.tw/~jyyou/rust/mips-uv.patch

Below is the current test result.

* core test

  stackwalk tests can cause segfault so I ignored them.

```
failures:
    io::tests::test_read_be_int_n
    io::tests::test_read_buffer_big_enough
    io::tests::test_read_f32
    io::tests::test_read_write_be
    io::tests::test_read_write_f32
    io::tests::test_read_write_le
    io::tests::test_simple
    io::tests::test_write_empty
    rand::tests::rng_seeded_custom_seed2
    unstable::uvll::test::test_uv_ll_struct_size_addrinfo
    unstable::uvll::test::test_uv_ll_struct_size_uv_timer_t

result: FAILED. 596 passed; 11 failed; 49 ignored
```

* std test:

```
failures:
    time::tests::run_tests

result: FAILED. 330 passed; 1 failed; 21 ignored
```
@bors bors closed this Apr 4, 2013
@bors bors merged commit 4f1d8cb into rust-lang:incoming Apr 4, 2013
oli-obk pushed a commit to oli-obk/rust that referenced this pull request May 2, 2020
This change adds a check to the `inconsistent_digit_grouping` to add a check for
NumericLiterals that follow the UUID format of 8-4-4-4-12.

If the NumericLiteral matches the UUID format, no further inconsistent grouping checks
will be performed.

Closes rust-lang#5431
oli-obk pushed a commit to oli-obk/rust that referenced this pull request May 2, 2020
… r=phansch

Allow UUID style formatting for `inconsistent_digit_grouping` lint

This change adds a check to the `inconsistent_digit_grouping` to add a check for
NumericLiterals that follow the UUID format of 8-4-4-4-12.

If the NumericLiteral matches the UUID format, no further inconsistent grouping checks
will be performed.

Closes rust-lang#5431

changelog: Allow UUID style formatting for `inconsistent_digit_grouping` lint
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