Skip to content

make check is failing with "Illegal instruction" #48

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
nham opened this issue Sep 3, 2014 · 8 comments · Fixed by #263
Closed

make check is failing with "Illegal instruction" #48

nham opened this issue Sep 3, 2014 · 8 comments · Fixed by #263
Assignees
Labels

Comments

@nham
Copy link

nham commented Sep 3, 2014

As part of running make check on servo, tests in rust-geom are failing. This is what I get:

: ./geom-test 

running 9 tests
test length::tests::test_length ... ok
test matrix::test_ortho ... ok
test rect::test_contains ... ok
test rect::test_intersection ... ok
test rect::test_min_max ... ok
test rect::test_union ... ok
test rect::test_translate ... ok
test scale_factor::tests::test_scale_factor ... ok
Illegal instruction

It appears that the failing test is side_offsets::test_is_zero.

Since this seems to have something to do with the inline assembly in is_zero, you probably want something about my processor information? I'm not sure exactly what you need. My OS is 64-bit Arch Linux.

@nham nham changed the title make check is failing make check is failing with "Illegal instruction" Sep 3, 2014
@nham
Copy link
Author

nham commented Sep 6, 2014

I'm not too familiar with this stuff, but after further research I think that the ptest instruction in is_zero is an instruction for SSE4.1. I'm on a netbook with an AMD C-60 processor, which does not support this.

@jdm
Copy link
Member

jdm commented Sep 6, 2014

@bjz: you wrote the assembly, right?

@ghost
Copy link

ghost commented Oct 29, 2014

Ran into this on a Core2 Duo (SSSE3 only).

@frewsxcv
Copy link
Contributor

I think it might be safe to close this since this hasn't been reported in a while.

@pmarcelll
Copy link

A redditor pointed out (probably @Jurily) that this is still an issue, the code contains a PTEST SSE4 instruction here, but the function on older x86_64 platforms without SSE4 causes an "Illegal instruction" error.

@frewsxcv
Copy link
Contributor

@pmarcelll Can you link to the comment in question?

@frewsxcv frewsxcv reopened this Jun 13, 2016
@pmarcelll
Copy link

@frewsxcv Sure, you can see the whole conversation here.

@pmarcelll
Copy link

I did a bit of research and I found rust-lang/rust#29717. target_feature is still unstable, but locally it works (I changed #[cfg(target_arch = "x86_64")] to #[cfg(target_feature = "sse4.1")]).
The other option is rewriting the assembly, but I can't really help with that.

mbrubeck added a commit to mbrubeck/rust-geom that referenced this issue Jun 14, 2016
Fixes servo#48.

Enabling the SIMD code path now requires building with
`RUSTFLAGS="-C target-feature=+sse4.1"` or similar.
@mbrubeck mbrubeck self-assigned this Jun 14, 2016
@mbrubeck mbrubeck added the bug label Jun 14, 2016
mbrubeck added a commit to mbrubeck/rust-geom that referenced this issue Jun 14, 2016
Fixes servo#48.

Enabling the SIMD code path now requires building with
`RUSTFLAGS="-C target-feature=+sse4.1"` or similar.
nical pushed a commit to nical/euclid that referenced this issue Jan 17, 2018
Fixes servo#48.

Enabling the SIMD code path now requires building with
`RUSTFLAGS="-C target-feature=+sse4.1"` or similar.
bors-servo pushed a commit that referenced this issue Jan 17, 2018
Don't use SSE4.1 instructions unless the target supports it

This is a rebase of #140.

Fixes #140, fixes #48.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/euclid/263)
<!-- Reviewable:end -->
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants