Fix another 64 bit problem in a part select.
This patch fixes a problem in the .part/v select when the index is undefined. The default value needs to be INT_MIN, so when the long is cast to an int the value is in range.
This commit is contained in:
parent
27f032760e
commit
1b300cb2f6
|
|
@ -248,13 +248,13 @@ bool vvp_fun_part_var::recv_vec4_(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||||
source = bit;
|
source = bit;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
// LONG_MIN is before the vector and is used to
|
// INT_MIN is before the vector and is used to
|
||||||
// represent a 'bx value on the select input.
|
// represent a 'bx value on the select input.
|
||||||
tmp = LONG_MIN;
|
tmp = INT_MIN;
|
||||||
// We need a new .part/v that knows if the index is signed.
|
// We need a new .part/v that knows if the index is signed.
|
||||||
// For now this will work for a normal integer value.
|
// For now this will work for a normal integer value.
|
||||||
vector4_to_value(bit, tmp, false);
|
vector4_to_value(bit, tmp, false);
|
||||||
if ((int)tmp == base) return false;
|
if (tmp == (long)base) return false;
|
||||||
base = tmp;
|
base = tmp;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue