[Bug 223415] lang/rust: don't require SSE2 on i386 (at least for binary packages)

2017-12-10 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223415

Jan Beich  changed:

   What|Removed |Added

 CC||bs...@phoe.frmug.org,
   ||truck...@freebsd.org

--- Comment #10 from Jan Beich  ---
Don or Bertrand, can you check ripgrep binary package from /latest set works
fine on a machine without SSE2? Building locally isn't recommended:
textproc/ripgrep as -j1 has MaxRSS ~539 MiB.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 223415] lang/rust: don't require SSE2 on i386 (at least for binary packages)

2017-12-10 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223415

--- Comment #11 from Jan Beich  ---
If you're short on time here're the QA steps:

$ mkdir -p /usr/local/etc/pkg/repos/
$ sed -En '/url/s/quarterly/latest/; /{|}/p' /etc/pkg/FreeBSD.conf \
  >/usr/local/etc/pkg/repos/FreeBSD.conf

$ pkg install ripgrep

$ rg --version
ripgrep 0.7.1
-AVX -SIMD

$ command time -l rg shenanigan /usr/src
/usr/src/share/dict/web2
180127:shenanigan

/usr/src/sys/dev/ciss/ciss.c
3046:* The reason for all these shenanigans is to create a maxio value that

/usr/src/contrib/llvm/lib/Target/X86/X86FastISel.cpp
1089:// Handle extension to 64-bits via sub-register shenanigans.

/usr/src/crypto/heimdal/appl/telnet/telnetd/sys_term.c
485: * Here are some shenanigans to make sure that there
0.62 real 2.80 user 1.91 sys
 13200  maximum resident set size
  2572  average shared memory size
44  average unshared data size
   128  average unshared stack size
  2251  page reclaims
 0  page faults
 0  swaps
  8292  block input operations
 0  block output operations
 0  messages sent
 0  messages received
 0  signals received
  2631  voluntary context switches
  2156  involuntary context switches

$ pkg delete ripgrep

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 223415] lang/rust: don't require SSE2 on i386 (at least for binary packages)

2017-12-10 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223415

--- Comment #12 from Bertrand Petit  ---
(In reply to Jan Beich from comment #11)
Jan, I took another route:

$ fetch http://pkg.freebsd.org/FreeBSD:11:i386/latest/All/ripgrep-0.7.1_3.txz
[...]
$ sha256 ripgrep-0.7.1_3.txz 
SHA256 (ripgrep-0.7.1_3.txz) =
501e31aef29bf5cd7c73bdea4eca376126ee2bf1b06da044071e0d8c3179af51
$ tar xf ripgrep-0.7.1_3.txz
$ objdump -d usr/local/bin/rg | grep xmm
  1d922c:   f2 0f 2a 4c 24 08   cvtsi2sd 0x8(%esp),%xmm1
  1d9232:   f3 0f 10 44 24 04   movss  0x4(%esp),%xmm0
  1d923e:   f2 0f 59 88 13 62 05mulsd  0x56213(%eax),%xmm1
  1d9246:   f2 0f 10 90 03 62 05movsd  0x56203(%eax),%xmm2
  1d924e:   f2 0f 5c ca subsd  %xmm2,%xmm1
  1d9252:   66 0f 56 c2 orpd   %xmm2,%xmm0
  1d9256:   f2 0f 58 c1 addsd  %xmm1,%xmm0
  1d925a:   f2 0f 11 44 24 04   movsd  %xmm0,0x4(%esp)
  1d9268:   f3 0f 10 4c 24 08   movss  0x8(%esp),%xmm1
  1d926e:   f3 0f 10 44 24 04   movss  0x4(%esp),%xmm0
  1d927a:   66 0f 56 88 07 62 05orpd   0x56207(%eax),%xmm1
  1d9282:   f2 0f 5c 88 f7 61 05subsd  0x561f7(%eax),%xmm1
  1d928a:   66 0f 56 80 e7 61 05orpd   0x561e7(%eax),%xmm0
  1d9292:   f2 0f 58 c1 addsd  %xmm1,%xmm0
  1d9296:   f2 0f 11 44 24 04   movsd  %xmm0,0x4(%esp)

Unfortunately cvtsi2sd is an SSE2 instruction, this package wont run on non
SSE2 hosts unless that operation is located in dead code.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 223415] lang/rust: don't require SSE2 on i386 (at least for binary packages)

2017-12-10 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223415

--- Comment #13 from Jan Beich  ---
(In reply to Bertrand Petit from comment #12)
> $ objdump -d usr/local/bin/rg | grep xmm
[...]

WITH_DEBUG=1 port build contains symbol names. It seems xmm registers are used
by __floatdidf and __floatundidf from compiler-rt. Rust compiler always
includes optimized routines on i386 but not always uses them. If my
understanding is correct then the code is dead.

# Rust 1.22.1
https://github.com/rust-lang-nursery/compiler-builtins/blob/0b9844764ea1/build.rs#L3977
https://github.com/rust-lang-nursery/compiler-builtins/blob/0b9844764ea1/src/float/conv.rs#L91
https://github.com/rust-lang-nursery/compiler-builtins/blob/0b9844764ea1/src/float/conv.rs#L120
https://github.com/rust-lang/compiler-rt/blob/c8a8767c56ad/lib/builtins/i386/floatdidf.S
https://github.com/rust-lang/compiler-rt/blob/c8a8767c56ad/lib/builtins/i386/floatundidf.S

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 223415] lang/rust: don't require SSE2 on i386 (at least for binary packages)

2017-12-10 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223415

--- Comment #14 from Bertrand Petit  ---
(In reply to Jan Beich from comment #13)

You are likely correct. However you have just uncovered a different bug, a
replication on one already fixed in src:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221733
You may want to adress it to rid the rust bootstrap of SIMD instructions.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"