From: Julian Seward Date: Mon, 9 May 2011 20:35:41 +0000 (+0000) Subject: s390x: fix DISP20 macro. Remove duplicate defn and avoid problems of X-Git-Tag: svn/VALGRIND_3_7_0^2~75 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a7145292f13df10d371b5fbf03181c778c3b4644;p=thirdparty%2Fvalgrind.git s390x: fix DISP20 macro. Remove duplicate defn and avoid problems of right-shifting negative values. Fixes #272067. (Florian Krohm, britzel@acm.org) git-svn-id: svn://svn.valgrind.org/vex/trunk@2149 --- diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index e631cfd0eb..65cd05a8d9 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -3400,7 +3400,7 @@ s390_emit_SXBR(UChar *p, UChar r1, UChar r2) /* Split up a 20-bit displacement into its high and low piece suitable for passing as function arguments */ -#define DISP20(d) ((d) & 0xFFF), (((d) >> 12) & 0xFF) +#define DISP20(d) (((UInt)d) & 0xFFF), ((((UInt)d) >> 12) & 0xFF) /*---------------------------------------------------------------*/ /*--- Helper functions ---*/ @@ -3932,10 +3932,6 @@ s390_emit_LDGRw(UChar *p, UChar r1, UChar r2) } -/* Split up a 20-bit displacement into its high and low piece - suitable for passing as function arguments */ -#define DISP20(d) ((d) & 0xFFF), (((d) >> 12) & 0xFF) - /*---------------------------------------------------------------*/ /*--- Constructors for the various s390_insn kinds ---*/ /*---------------------------------------------------------------*/