verilator: update to 4.210

This commit is contained in:
umarcor
2021-07-08 03:30:40 +02:00
parent d440dcb738
commit a3cbfce6ea
2 changed files with 2 additions and 69 deletions

View File

@@ -1,64 +0,0 @@
From 0c4d88baccd3d253479ac94f444b0f3c621807a2 Mon Sep 17 00:00:00 2001
From: Geza Lore <gezalore@gmail.com>
Date: Sun, 13 Jun 2021 20:04:26 +0100
Subject: [PATCH] Fix V3Hash when building -m32
---
src/V3Hash.h | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/src/V3Hash.h b/src/V3Hash.h
index b28b3bf1..06223567 100644
--- a/src/V3Hash.h
+++ b/src/V3Hash.h
@@ -26,6 +26,10 @@
class V3Hash final {
uint32_t m_value; // The 32-bit hash value.
+ inline static uint32_t combine(uint32_t a, uint32_t b) {
+ return a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2));
+ }
+
public:
// CONSTRUCTORS
V3Hash()
@@ -34,8 +38,10 @@ public:
: m_value{val} {}
explicit V3Hash(int32_t val)
: m_value{static_cast<uint32_t>(val)} {}
- explicit V3Hash(size_t val)
- : m_value{static_cast<uint32_t>(val)} {}
+ explicit V3Hash(uint64_t val)
+ : m_value{combine(static_cast<uint32_t>(val), static_cast<uint32_t>(val >> 32))} {}
+ explicit V3Hash(int64_t val)
+ : m_value{combine(static_cast<uint32_t>(val), static_cast<uint32_t>(val >> 32))} {}
explicit V3Hash(const std::string& val);
// METHODS
@@ -48,20 +54,12 @@ public:
bool operator<(const V3Hash& rh) const { return m_value < rh.m_value; }
// '+' combines hashes
- V3Hash operator+(const V3Hash& that) const {
- return V3Hash(m_value ^ (that.m_value + 0x9e3779b9 + (m_value << 6) + (m_value >> 2)));
+ template <class T> V3Hash operator+(T that) const {
+ return V3Hash(combine(m_value, V3Hash(that).m_value));
}
- V3Hash operator+(uint32_t value) const { return *this + V3Hash(value); }
- V3Hash operator+(int32_t value) const { return *this + V3Hash(value); }
- V3Hash operator+(size_t value) const { return *this + V3Hash(value); }
- V3Hash operator+(const std::string& value) const { return *this + V3Hash(value); }
// '+=' combines in place
- V3Hash& operator+=(const V3Hash& that) { return *this = *this + that; }
- V3Hash& operator+=(uint32_t value) { return *this += V3Hash(value); }
- V3Hash& operator+=(int32_t value) { return *this += V3Hash(value); }
- V3Hash& operator+=(size_t value) { return *this += V3Hash(value); }
- V3Hash& operator+=(const std::string& that) { return *this += V3Hash(that); }
+ template <class T> V3Hash& operator+=(T that) { return *this = *this + that; }
};
std::ostream& operator<<(std::ostream& os, const V3Hash& rhs);
--
2.32.0

View File

@@ -3,7 +3,7 @@
_realname=verilator
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=4.204
pkgver=4.210
pkgrel=1
pkgdesc="The fastest free Verilog HDL simulator (mingw-w64)"
arch=('any')
@@ -16,18 +16,15 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
source=(
"${_realname}::https://codeload.github.com/${_realname}/${_realname}/tar.gz/v${pkgver}"
'0001-Fix-V3Hash-when-building-m32.patch'
)
sha256sums=(
'dbad9bd3cac34e63bbd945fff9a59eaabe31dae1e1c93c847d0f894db9919498'
'9c2a039f72d14896e9def846f4f274ce98cde52ee34cd3adad2c715b8e93c000'
'3a2e6f27a5d80116a268ba054a3be61aca924bc54c5556ea25e75ee974201abb'
)
prepare() {
[[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}"
cp -rf "${srcdir}/${_realname}-${pkgver}" "${srcdir}/build-${MINGW_CHOST}"
cd "${srcdir}/build-${MINGW_CHOST}"
patch -p1 < ${srcdir}/0001-Fix-V3Hash-when-building-m32.patch
sh autoconf
}