libipt: change sign extension algorithm
libipt: change sign extension algorithm

The current sign extension algorithm used in pt_last_ip.c assumes arithmetic
shift right on signed values, which is not guaranteed.

Change the algorithm to avoid this.

Change-Id: Icbbc16f1e8617d4f64fd5622d3092ef020010b03
Signed-off-by: Markus Metzger <5f675b2b36595f90898e014b548ff7d9bbff2ab7@intel.com>

drupalhunter-team/processor-trace,hoangt/processor-trace,breadbaconic/processor-trace,andikleen/processor-trace,01org/processor-trace,shadown/processor-trace,shadown/processor-trace,01org/processor-trace,drupalhunter-team/processor-trace,hoangt/processor-trace,pombreda/processor-trace,01org/processor-trace,pombreda/processor-trace,breadbaconic/processor-trace,andikleen/processor-trace