s390x: fix cksm instruction
commit5b185639c5740998de403415c749ac98e13418fd
authorAlexander Graf <agraf@suse.de>
Mon, 30 May 2011 08:49:45 +0000 (30 10:49 +0200)
committerAlexander Graf <agraf@suse.de>
Fri, 3 Jun 2011 11:34:02 +0000 (3 13:34 +0200)
treeb499248c9d82b974cade11ac4888bce7b67e4827
parent87b0b70513fb554ff20374707d7e90b0bc6ffb2d
s390x: fix cksm instruction

The cksm instruction was implemented incorrectly, rendering UDP and TCP
checksum calculation wrong, making an emulated s390x Linux guest break
in most networking operations.

This patch fixes odd end checksum calculation, takes the input register
as input for the checksum and optimizes the overflow pieces by a bit.

Signed-off-by: Alexander Graf <agraf@suse.de>
target-s390x/op_helper.c