Warn that &A<> may have problems with a signed select from thread space.
Like the &PV<> code we should warn the user that a signed select
from thread space may not work correctly for &A<>. This will be fixed
in development.
(cherry picked from commit 1851cba955)
This commit is contained in:
parent
9c624a2403
commit
d0a45ffe9d
|
|
@ -155,6 +155,17 @@ static int get_vpi_taskfunc_signal_arg(struct args_info *result,
|
|||
/* Fallback case: evaluate expression. */
|
||||
struct vector_info av;
|
||||
av = draw_eval_expr(word_ex, STUFF_OK_XZ);
|
||||
/* We need to enhance &A<> to support a signed index. */
|
||||
if (ivl_expr_signed(word_ex) &&
|
||||
(ivl_expr_width(word_ex) < 8*sizeof(int))) {
|
||||
fprintf(stderr, "%s:%u: tgt-vvp warning: V0.9 "
|
||||
"may give incorrect results for "
|
||||
"an array select with a signed "
|
||||
"index less than %zu bits.\n",
|
||||
ivl_expr_file(expr),
|
||||
ivl_expr_lineno(expr),
|
||||
8*sizeof(int));
|
||||
}
|
||||
snprintf(buffer, sizeof buffer, "&A<v%p, %u %u>",
|
||||
sig, av.base, av.wid);
|
||||
result->vec = av;
|
||||
|
|
|
|||
Loading…
Reference in New Issue