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

Add MOVBE x86 CPU feature #57999

Merged
merged 1 commit into from
Jan 31, 2019
Merged

Add MOVBE x86 CPU feature #57999

merged 1 commit into from
Jan 31, 2019

Conversation

jethrogb
Copy link
Contributor

I have no idea if this is correct. I basically copied the ADX feature. I verified the feature is also called movbe in LLVM.

I marked this to become stable immediately, as part of the RFC 2045.

r? @alexcrichton

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 30, 2019
@jethrogb jethrogb changed the title Add MOVBE feature Add MOVBE x86 CPU feature Jan 30, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:144d3956:start=1548855124528382813,finish=1548855126506788706,duration=1978405893
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:04:16]    Compiling rustc_lsan v0.0.0 (/checkout/src/librustc_lsan)
[00:04:17]    Compiling rustc_msan v0.0.0 (/checkout/src/librustc_msan)
[00:04:17]    Compiling rustc_asan v0.0.0 (/checkout/src/librustc_asan)
[00:04:18]    Compiling rustc_tsan v0.0.0 (/checkout/src/librustc_tsan)
[00:04:33] error[E0635]: unknown feature `movbe_target_feature`
[00:04:33]     |
[00:04:33]     |
[00:04:33] 126 | #![feature(movbe_target_feature)]
[00:04:33] 
[00:04:33] error: aborting due to previous error
[00:04:33] 
[00:04:33] For more information about this error, try `rustc --explain E0635`.
[00:04:33] For more information about this error, try `rustc --explain E0635`.
[00:04:33] error: Could not compile `core`.
[00:04:33] 
[00:04:33] To learn more, run the command again with --verbose.
[00:04:33] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:04:33] expected success, got: exit code: 101
[00:04:33] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:04:33] Build completed unsuccessfully in 0:00:29
[00:04:33] Makefile:18: recipe for target 'all' failed
[00:04:33] make: *** [all] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:04833bab
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Wed Jan 30 13:36:55 UTC 2019
---
travis_time:end:06f5d438:start=1548855416353309282,finish=1548855416358356646,duration=5047364
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:04647816
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:0882d5f4
travis_time:start:0882d5f4
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:0823e10c
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@alexcrichton
Copy link
Member

@bors: r+

As written this is unstable, but that's how we add new target features currently anyway.

@bors
Copy link
Contributor

bors commented Jan 30, 2019

📌 Commit 77d5d89f0151856da789454cc0c5456989d9c331 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 30, 2019
@jethrogb
Copy link
Contributor Author

You're right, version number in the feature declaration confused me.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:028328dc:start=1548857934856210822,finish=1548857936932583265,duration=2076372443
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[01:07:33] 
[01:07:33] ---- [ui] ui/target-feature-gate.rs stdout ----
[01:07:33] diff of stderr:
[01:07:33] 
[01:07:33] 1 error[E0658]: the target feature `avx512bw` is currently unstable (see issue #44839)
[01:07:33] +   --> $DIR/target-feature-gate.rs:28:18
[01:07:33] 3    |
[01:07:33] 3    |
[01:07:33] 4 LL | #[target_feature(enable = "avx512bw")]
[01:07:33] 
[01:07:33] 
[01:07:33] The actual stderr differed from the expected stderr.
[01:07:33] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/target-feature-gate/target-feature-gate.stderr
[01:07:33] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/target-feature-gate/target-feature-gate.stderr
[01:07:33] To update references, rerun the tests and pass the `--bless` flag
[01:07:33] To only update this specific test, also pass `--test-args target-feature-gate.rs`
[01:07:33] error: 1 errors occurred comparing output.
[01:07:33] status: exit code: 1
[01:07:33] status: exit code: 1
[01:07:33] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/target-feature-gate.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/target-feature-gate/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/target-feature-gate/auxiliary" "-A" "unused"
[01:07:33] ------------------------------------------
[01:07:33] 
[01:07:33] ------------------------------------------
[01:07:33] stderr:
[01:07:33] stderr:
[01:07:33] ------------------------------------------
[01:07:33] {"message":"the target feature `avx512bw` is currently unstable (see issue #44839)","code":{"code":"E0658","explanation":"\nAn unstable feature was used.\n\nErroneous code example:\n\n```compile_fail,E658\n#[repr(u128)] // error: use of unstable library feature 'repr128'\nenum Foo {\n    Bar(u64),\n}\n```\n\nIf you're using a stable or a beta version of rustc, you won't be able to use\nany unstable features. In order to do so, please switch to a nightly version of\nrustc (by using rustup).\n\nIf you're using a nightly version of rustc, just add the corresponding feature\nto be able to use it:\n\n```\n#![feature(repr128)]\n\n#[repr(u128)] // ok!\nenum Foo {\n    Bar(u64),\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/target-feature-gate.rs","byte_start":696,"byte_end":715,"line_start":28,"line_end":28,"column_start":18,"column_end":37,"is_primar 
[01:07:33] 
[01:07:33] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:07:33] 
[01:07:33] 
[01:07:33] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:07:33] Build completed unsuccessfully in 0:04:13
[01:07:33] Build completed unsuccessfully in 0:04:13
[01:07:33] make: *** [check] Error 1
[01:07:33] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:170e5d59
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Wed Jan 30 15:26:41 UTC 2019

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@jethrogb
Copy link
Contributor Author

I don't understand what's wrong with the test

@jethrogb
Copy link
Contributor Author

Nevermind, figured it out

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Jan 30, 2019

📌 Commit a3f0af2 has been approved by alexcrichton

Centril added a commit to Centril/rust that referenced this pull request Jan 30, 2019
…ichton

Add MOVBE x86 CPU feature

I have no idea if this is correct. I basically copied the ADX feature. I verified the feature is also called `movbe` in LLVM.

I marked this to become stable immediately, as part of the RFC 2045.

r? @alexcrichton
Centril added a commit to Centril/rust that referenced this pull request Jan 30, 2019
…ichton

Add MOVBE x86 CPU feature

I have no idea if this is correct. I basically copied the ADX feature. I verified the feature is also called `movbe` in LLVM.

I marked this to become stable immediately, as part of the RFC 2045.

r? @alexcrichton
Centril added a commit to Centril/rust that referenced this pull request Jan 31, 2019
…ichton

Add MOVBE x86 CPU feature

I have no idea if this is correct. I basically copied the ADX feature. I verified the feature is also called `movbe` in LLVM.

I marked this to become stable immediately, as part of the RFC 2045.

r? @alexcrichton
bors added a commit that referenced this pull request Jan 31, 2019
Rollup of 12 pull requests

Successful merges:

 - #57008 (suggest `|` when `,` founds in invalid match value)
 - #57106 (Mark str::trim.* functions as #[must_use].)
 - #57920 (use `SOURCE_DATE_EPOCH` for man page time if set)
 - #57934 (Introduce into_raw_non_null on Rc and Arc)
 - #57971 (SGX target: improve panic & exit handling)
 - #57980 (Add the edition guide to the bookshelf)
 - #57984 (Improve bug message in check_ty)
 - #57999 (Add MOVBE x86 CPU feature)
 - #58000 (Fixes and cleanups)
 - #58005 (update docs for fix_start/end_matches)
 - #58007 (Don't panic when accessing enum variant ctor using `Self` in match)
 - #58008 (Pass correct arguments to places_conflict)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Jan 31, 2019

⌛ Testing commit a3f0af2 with merge f40aaa6...

@bors bors merged commit a3f0af2 into rust-lang:master Jan 31, 2019
Centril added a commit to Centril/rust that referenced this pull request Apr 18, 2019
whitelist RTM x86 target cpu feature

This PR adds support for intels restricted transactional memory cpu feature. I mostly copied what was done for the [movbe](rust-lang#57999) feature.

rust-lang/stdarch#718
Centril added a commit to Centril/rust that referenced this pull request Apr 18, 2019
whitelist RTM x86 target cpu feature

This PR adds support for intels restricted transactional memory cpu feature. I mostly copied what was done for the [movbe](rust-lang#57999) feature.

rust-lang/stdarch#718
Centril added a commit to Centril/rust that referenced this pull request Apr 18, 2019
whitelist RTM x86 target cpu feature

This PR adds support for intels restricted transactional memory cpu feature. I mostly copied what was done for the [movbe](rust-lang#57999) feature.

rust-lang/stdarch#718
Centril added a commit to Centril/rust that referenced this pull request Apr 18, 2019
whitelist RTM x86 target cpu feature

This PR adds support for intels restricted transactional memory cpu feature. I mostly copied what was done for the [movbe](rust-lang#57999) feature.

rust-lang/stdarch#718
Centril added a commit to Centril/rust that referenced this pull request Apr 18, 2019
whitelist RTM x86 target cpu feature

This PR adds support for intels restricted transactional memory cpu feature. I mostly copied what was done for the [movbe](rust-lang#57999) feature.

rust-lang/stdarch#718
Centril added a commit to Centril/rust that referenced this pull request Apr 18, 2019
whitelist RTM x86 target cpu feature

This PR adds support for intels restricted transactional memory cpu feature. I mostly copied what was done for the [movbe](rust-lang#57999) feature.

rust-lang/stdarch#718
Centril added a commit to Centril/rust that referenced this pull request Apr 18, 2019
whitelist RTM x86 target cpu feature

This PR adds support for intels restricted transactional memory cpu feature. I mostly copied what was done for the [movbe](rust-lang#57999) feature.

rust-lang/stdarch#718
Centril added a commit to Centril/rust that referenced this pull request Apr 19, 2019
whitelist RTM x86 target cpu feature

This PR adds support for intels restricted transactional memory cpu feature. I mostly copied what was done for the [movbe](rust-lang#57999) feature.

rust-lang/stdarch#718
Centril added a commit to Centril/rust that referenced this pull request Apr 19, 2019
whitelist RTM x86 target cpu feature

This PR adds support for intels restricted transactional memory cpu feature. I mostly copied what was done for the [movbe](rust-lang#57999) feature.

rust-lang/stdarch#718
Centril added a commit to Centril/rust that referenced this pull request Apr 19, 2019
whitelist RTM x86 target cpu feature

This PR adds support for intels restricted transactional memory cpu feature. I mostly copied what was done for the [movbe](rust-lang#57999) feature.

rust-lang/stdarch#718
Centril added a commit to Centril/rust that referenced this pull request Apr 19, 2019
whitelist RTM x86 target cpu feature

This PR adds support for intels restricted transactional memory cpu feature. I mostly copied what was done for the [movbe](rust-lang#57999) feature.

rust-lang/stdarch#718
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants