diff options
author | joerg <joerg@pkgsrc.org> | 2015-09-13 15:08:09 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2015-09-13 15:08:09 +0000 |
commit | 227089221b3e5de159e26be62153166a015bc5e2 (patch) | |
tree | 34f569bcabcec5a3fb1dd57026e4b36b6e666106 /emulators | |
parent | a94051eb602a14188e4e09bd2c165c5c986ecae0 (diff) | |
download | pkgsrc-227089221b3e5de159e26be62153166a015bc5e2.tar.gz |
Avoid left-shifting negative values, which is undefined behavior.
Bump revision just in case.
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/tme/Makefile | 4 | ||||
-rw-r--r-- | emulators/tme/distinfo | 6 | ||||
-rw-r--r-- | emulators/tme/patches/patch-libtme_memory-auto.sh | 13 | ||||
-rw-r--r-- | emulators/tme/patches/patch-machine_sun4_sun4-timer.c | 15 | ||||
-rw-r--r-- | emulators/tme/patches/patch-tme_common.h | 13 | ||||
-rw-r--r-- | emulators/tme/patches/patch-tme_generic_float.h | 22 |
6 files changed, 70 insertions, 3 deletions
diff --git a/emulators/tme/Makefile b/emulators/tme/Makefile index 2746ce69b95..64da72092d7 100644 --- a/emulators/tme/Makefile +++ b/emulators/tme/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.58 2015/06/12 10:50:04 wiz Exp $ +# $NetBSD: Makefile,v 1.59 2015/09/13 15:08:09 joerg Exp $ # DISTNAME= tme-0.8 -PKGREVISION= 27 +PKGREVISION= 28 CATEGORIES= emulators MASTER_SITES= http://csail.mit.edu/~fredette/tme/ diff --git a/emulators/tme/distinfo b/emulators/tme/distinfo index 05b9e6faf76..23632a32a2e 100644 --- a/emulators/tme/distinfo +++ b/emulators/tme/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.19 2013/12/28 19:16:47 martin Exp $ +$NetBSD: distinfo,v 1.20 2015/09/13 15:08:09 joerg Exp $ SHA1 (tme-0.8.tar.gz) = dd4f3421c20ceed548c5328a21dbb26e80f46b9c RMD160 (tme-0.8.tar.gz) = 6bd505c5fa7810d37f436883383c4ba655df2ded @@ -16,13 +16,17 @@ SHA1 (patch-ic_m68k_m6888x.c) = fe42dce7bf5abc69e2c9e15967d5e862ef651a0e SHA1 (patch-ic_m68k_m68k-insns-auto.sh) = c493b4c6b066135e093abd7482e0a1e99294848b SHA1 (patch-ic_m68k_m68k-m68k-insns.c) = 1a9d8e3d4e11c5710d1f67b65954d6e3de68d99f SHA1 (patch-ic_m68k_m68k-misc.c) = 7aeef098631196fe60b9940600cf90c86d1be375 +SHA1 (patch-libtme_memory-auto.sh) = 156766edad59b563f13c4dfd19f581b2950cc384 SHA1 (patch-machine_sun2_SUN2-MULTIBUS) = dc44d9c842277a2f4ff55b0200edbc990ee86669 SHA1 (patch-machine_sun2_sun2-mainbus.c) = 91b901d37d5f9a72064831d440c4371b81857640 SHA1 (patch-machine_sun3_SUN3-CARRERA) = 73b8f3a5a7c587aa726db4fa53844f2a0dc82a24 SHA1 (patch-machine_sun3_sun3-mainbus.c) = bfe56fdee109824ccf8a81760406b6c5d1ab7157 SHA1 (patch-machine_sun4_SUN4-75) = 02218192d50e7679358e822515210711602c3271 SHA1 (patch-machine_sun4_sun4-mainbus.c) = 9dda3c5365e608cce2faa180d6a58351c8e58095 +SHA1 (patch-machine_sun4_sun4-timer.c) = 979e62cd68d1e8f9b15ba9511d798cbb4c0e2105 SHA1 (patch-machine_sun4u_SUN-ULTRA-1) = e2bd0b991acf47ff01658f2f692913c24d7478b5 +SHA1 (patch-tme_common.h) = 1c07068397022ff349c283cbbfaa804deeb2aabf +SHA1 (patch-tme_generic_float.h) = 4f48ebdd713367d47784caa990d46990e4f8108f SHA1 (patch-tmesh_Makefile.in) = 850adc8390ea3031ee3d55396373be8507a43c32 SHA1 (patch-tmesh_tmesh-cmds.c) = 6fffc98ea828e0b58261d810382665ae56da03ff SHA1 (patch-tmesh_tmesh-input.y) = 1337a8faa4bc1a90a14c29d0d6853ec8f86b4cf2 diff --git a/emulators/tme/patches/patch-libtme_memory-auto.sh b/emulators/tme/patches/patch-libtme_memory-auto.sh new file mode 100644 index 00000000000..53a84473e2b --- /dev/null +++ b/emulators/tme/patches/patch-libtme_memory-auto.sh @@ -0,0 +1,13 @@ +$NetBSD: patch-libtme_memory-auto.sh,v 1.1 2015/09/13 15:08:09 joerg Exp $ + +--- libtme/memory-auto.sh.orig 2015-09-03 14:35:30.000000000 +0000 ++++ libtme/memory-auto.sh +@@ -129,7 +129,7 @@ if $header; then + + /* this returns a mask of all-bits-one in given type: */ + #define _tme_memory_type_mask(type, shift) \\ +- ((type) ((((type) 0) - ((type) 1)) shift)) ++ ((type) (UINTMAX_MAX shift)) + + EOF + fi diff --git a/emulators/tme/patches/patch-machine_sun4_sun4-timer.c b/emulators/tme/patches/patch-machine_sun4_sun4-timer.c new file mode 100644 index 00000000000..a9521468b10 --- /dev/null +++ b/emulators/tme/patches/patch-machine_sun4_sun4-timer.c @@ -0,0 +1,15 @@ +$NetBSD: patch-machine_sun4_sun4-timer.c,v 1.1 2015/09/13 15:08:09 joerg Exp $ + +--- machine/sun4/sun4-timer.c.orig 2015-09-03 14:47:23.000000000 +0000 ++++ machine/sun4/sun4-timer.c +@@ -44,8 +44,8 @@ _TME_RCSID("$Id: sun4-timer.c,v 1.3 2010 + + /* real sun4/4c timer bits: */ + #define TME_SUN4_32_TIMER_LIMIT TME_BIT(31) +-#define TME_SUN44C_TIMER_MASK (0x7ffffc00) +-#define TME_SUN4M_TIMER_MASK (0x7ffffe00) ++#define TME_SUN44C_TIMER_MASK (0x7ffffc00U) ++#define TME_SUN4M_TIMER_MASK (0x7ffffe00U) + + /* define this to track interrupt rates, reporting once every N + seconds: */ diff --git a/emulators/tme/patches/patch-tme_common.h b/emulators/tme/patches/patch-tme_common.h new file mode 100644 index 00000000000..9952284f975 --- /dev/null +++ b/emulators/tme/patches/patch-tme_common.h @@ -0,0 +1,13 @@ +$NetBSD: patch-tme_common.h,v 1.1 2015/09/13 15:08:09 joerg Exp $ + +--- tme/common.h.orig 2015-09-03 14:41:12.000000000 +0000 ++++ tme/common.h +@@ -169,7 +169,7 @@ _TME_RCSID("$Id: common.h,v 1.16 2010/02 + #define TME_FIELD_DEPOSIT8(v, s, l, x) _TME_FIELD_DEPOSIT(tme_uint8_t, v, s, l, x) + #define TME_FIELD_DEPOSIT16(v, s, l, x) _TME_FIELD_DEPOSIT(tme_uint16_t, v, s, l, x) + #define TME_FIELD_DEPOSIT32(v, s, l, x) _TME_FIELD_DEPOSIT(tme_uint32_t, v, s, l, x) +-#define _TME_FIELD_MASK_FACTOR(m) (((m) | ((m) << 1)) ^ ((m) << 1)) ++#define _TME_FIELD_MASK_FACTOR(m) (((m) | ((m) * 2)) ^ ((m) * 2)) + #define TME_FIELD_MASK_EXTRACTU(v, m) (((v) & (m)) / _TME_FIELD_MASK_FACTOR(m)) + #define TME_FIELD_MASK_DEPOSITU(v, m, x) ((v) = (((v) & ~(m)) | (((x) * _TME_FIELD_MASK_FACTOR(m)) & (m)))) + #define _TME_FIELD_MASK_MSBIT(m) (((m) | ((m) >> 1)) ^ ((m) >> 1)) diff --git a/emulators/tme/patches/patch-tme_generic_float.h b/emulators/tme/patches/patch-tme_generic_float.h new file mode 100644 index 00000000000..d2879292950 --- /dev/null +++ b/emulators/tme/patches/patch-tme_generic_float.h @@ -0,0 +1,22 @@ +$NetBSD: patch-tme_generic_float.h,v 1.1 2015/09/13 15:08:09 joerg Exp $ + +--- tme/generic/float.h.orig 2015-09-03 14:45:16.000000000 +0000 ++++ tme/generic/float.h +@@ -308,13 +308,13 @@ tme_float_assert_formats(_tme_const stru + + /* these return the exponents of values in the IEEE 754 formats: */ + #define tme_float_value_ieee754_exponent_single(x) \ +- TME_FIELD_MASK_EXTRACTU((x)->tme_float_value_ieee754_single, 0x7f800000) ++ TME_FIELD_MASK_EXTRACTU((x)->tme_float_value_ieee754_single, 0x7f800000U) + #define tme_float_value_ieee754_exponent_double(x) \ +- TME_FIELD_MASK_EXTRACTU((x)->tme_float_value_ieee754_double.tme_value64_uint32_hi, 0x7ff00000) ++ TME_FIELD_MASK_EXTRACTU((x)->tme_float_value_ieee754_double.tme_value64_uint32_hi, 0x7ff00000U) + #define tme_float_value_ieee754_exponent_extended80(x) \ +- TME_FIELD_MASK_EXTRACTU((x)->tme_float_value_ieee754_extended80.tme_float_ieee754_extended80_sexp, 0x7fff) ++ TME_FIELD_MASK_EXTRACTU((x)->tme_float_value_ieee754_extended80.tme_float_ieee754_extended80_sexp, 0x7fffU) + #define tme_float_value_ieee754_exponent_quad(x) \ +- TME_FIELD_MASK_EXTRACTU((x)->tme_float_value_ieee754_quad.tme_float_ieee754_quad_hi.tme_value64_uint32_hi, 0x7fff0000) ++ TME_FIELD_MASK_EXTRACTU((x)->tme_float_value_ieee754_quad.tme_float_ieee754_quad_hi.tme_value64_uint32_hi, 0x7fff0000U) + + /* these return a bitwise-or of the fraction bits in values in the + IEEE 754 formats (and, for the IEEE 754 80-bit extended precision |