mbox series

[v2,0/6] s390x/tcg: Vector instruction fixes

Message ID 20191021085715.3797-1-david@redhat.com
Headers show
Series s390x/tcg: Vector instruction fixes | expand

Message

David Hildenbrand Oct. 21, 2019, 8:57 a.m. UTC
Ivan reported that a simple
    $ go get -v -d github.com/FactomProject/factom

Will result in errors when vector instructions are in use. Turns out
golang makes excessive use of vector instructions, e.g., for crypto, hashes
but also basic math.

I tracked the involved vector instructions and started writing more
tests for them (will upstream them once they are in a better shape). Turns
out there are quite some issues remaining. golang uses instructions not
yet used by the kernel or by glibc.

With these patches, "go get" works again. It wouldn't surprise me if there
are more BUGs in the vector instructions. Will continue writing more tests.

Cc: Ivan Warren <ivan@vmfacility.fr>

v1 -> v2:
- "s390x/tcg: Fix VECTOR SUBTRACT COMPUTE BORROW INDICATION"
-- Fix by inverting the result
- "s390x/tcg: Fix VECTOR SUBTRACT WITH BORROW INDICATION"
-- Reuse gen_ac2_i64()
- "s390x/tcg: Fix VECTOR SUBTRACT WITH BORROW COMPUTE BORROW INDICATION"
-- Reuse gen_accc2_i64()
- Ran against more tests

David Hildenbrand (6):
  s390x/tcg: Fix VECTOR MULTIPLY LOGICAL ODD
  s390x/tcg: Fix VECTOR MULTIPLY AND ADD *
  s390x/tcg: Fix VECTOR SHIFT RIGHT ARITHMETIC BY BYTE
  s390x/tcg: Fix VECTOR SUBTRACT COMPUTE BORROW INDICATION
  s390x/tcg: Fix VECTOR SUBTRACT WITH BORROW INDICATION
  s390x/tcg: Fix VECTOR SUBTRACT WITH BORROW COMPUTE BORROW INDICATION

 target/s390x/translate_vx.inc.c | 30 ++++++++++++------------------
 target/s390x/vec_int_helper.c   | 18 ++++++++++--------
 2 files changed, 22 insertions(+), 26 deletions(-)

Comments

Cornelia Huck Oct. 21, 2019, 4:01 p.m. UTC | #1
On Mon, 21 Oct 2019 10:57:09 +0200
David Hildenbrand <david@redhat.com> wrote:

> Ivan reported that a simple
>     $ go get -v -d github.com/FactomProject/factom
> 
> Will result in errors when vector instructions are in use. Turns out
> golang makes excessive use of vector instructions, e.g., for crypto, hashes
> but also basic math.
> 
> I tracked the involved vector instructions and started writing more
> tests for them (will upstream them once they are in a better shape). Turns
> out there are quite some issues remaining. golang uses instructions not
> yet used by the kernel or by glibc.
> 
> With these patches, "go get" works again. It wouldn't surprise me if there
> are more BUGs in the vector instructions. Will continue writing more tests.
> 
> Cc: Ivan Warren <ivan@vmfacility.fr>
> 
> v1 -> v2:
> - "s390x/tcg: Fix VECTOR SUBTRACT COMPUTE BORROW INDICATION"
> -- Fix by inverting the result
> - "s390x/tcg: Fix VECTOR SUBTRACT WITH BORROW INDICATION"
> -- Reuse gen_ac2_i64()
> - "s390x/tcg: Fix VECTOR SUBTRACT WITH BORROW COMPUTE BORROW INDICATION"
> -- Reuse gen_accc2_i64()
> - Ran against more tests
> 
> David Hildenbrand (6):
>   s390x/tcg: Fix VECTOR MULTIPLY LOGICAL ODD
>   s390x/tcg: Fix VECTOR MULTIPLY AND ADD *
>   s390x/tcg: Fix VECTOR SHIFT RIGHT ARITHMETIC BY BYTE
>   s390x/tcg: Fix VECTOR SUBTRACT COMPUTE BORROW INDICATION
>   s390x/tcg: Fix VECTOR SUBTRACT WITH BORROW INDICATION
>   s390x/tcg: Fix VECTOR SUBTRACT WITH BORROW COMPUTE BORROW INDICATION
> 
>  target/s390x/translate_vx.inc.c | 30 ++++++++++++------------------
>  target/s390x/vec_int_helper.c   | 18 ++++++++++--------
>  2 files changed, 22 insertions(+), 26 deletions(-)
> 

Thanks, applied.