|
From: <sv...@va...> - 2011-05-09 20:35:50
|
Author: sewardj
Date: 2011-05-09 21:35:41 +0100 (Mon, 09 May 2011)
New Revision: 2149
Log:
s390x: fix DISP20 macro. Remove duplicate defn and avoid problems of
right-shifting negative values. Fixes #272067.
(Florian Krohm, br...@ac...)
Modified:
trunk/priv/host_s390_defs.c
Modified: trunk/priv/host_s390_defs.c
===================================================================
--- trunk/priv/host_s390_defs.c 2011-05-08 22:05:10 UTC (rev 2148)
+++ trunk/priv/host_s390_defs.c 2011-05-09 20:35:41 UTC (rev 2149)
@@ -3400,7 +3400,7 @@
/* 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 @@
}
-/* 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 ---*/
/*---------------------------------------------------------------*/
|