tgt-vvp: Remove unused draw_eval_bool64()
Ever since the conversion to use a stack for vectors `draw_eval_bool64()`
has been unused. The last caller of `draw_eval_bool64()` was removed in
commit e4b862f3d1 ("Clean up vector handling dead code.").
Remove `draw_eval_bool64()` and related functions as well.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
0a86773c5e
commit
5a616bcaf4
|
|
@ -49,7 +49,6 @@ LDFLAGS = @LDFLAGS@
|
|||
|
||||
O = vvp.o draw_class.o draw_delay.o draw_enum.o draw_mux.o draw_net_input.o \
|
||||
draw_substitute.o draw_switch.o draw_ufunc.o draw_vpi.o \
|
||||
eval_bool.o \
|
||||
eval_condit.o \
|
||||
eval_expr.o eval_object.o eval_real.o eval_string.o \
|
||||
eval_vec4.o \
|
||||
|
|
|
|||
|
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2005-2011 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
* General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file includes functions for evaluating REAL expressions.
|
||||
*/
|
||||
# include "vvp_config.h"
|
||||
# include "vvp_priv.h"
|
||||
# include <string.h>
|
||||
# include <stdlib.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
# ifndef __STDC_FORMAT_MACROS
|
||||
# define __STDC_FORMAT_MACROS 1
|
||||
# endif
|
||||
# include <inttypes.h>
|
||||
#else
|
||||
#endif
|
||||
|
||||
# include <math.h>
|
||||
# include <assert.h>
|
||||
|
||||
/*
|
||||
* Evaluate the bool64 the hard way, by evaluating the logic vector
|
||||
* and converting it to a bool64.
|
||||
*/
|
||||
static int eval_bool64_logic(ivl_expr_t expr)
|
||||
{
|
||||
int res;
|
||||
const char*s_flag = "";
|
||||
|
||||
draw_eval_vec4(expr);
|
||||
res = allocate_word();
|
||||
if (ivl_expr_signed(expr))
|
||||
s_flag = "/s";
|
||||
|
||||
fprintf(vvp_out, " %%ix/vec4%s %d;\n", s_flag, res);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int draw_number_bool64(ivl_expr_t expr)
|
||||
{
|
||||
int res;
|
||||
const char*bits = ivl_expr_bits(expr);
|
||||
uint64_t val = 0;
|
||||
unsigned long idx, low, hig;
|
||||
|
||||
for (idx = 0 ; idx < ivl_expr_width(expr) ; idx += 1) {
|
||||
if (bits[idx] == '1')
|
||||
val |= 1UL << idx;
|
||||
}
|
||||
|
||||
res = allocate_word();
|
||||
low = val % UINT64_C(0x100000000);
|
||||
hig = val / UINT64_C(0x100000000);
|
||||
fprintf(vvp_out, " %%ix/load %d, %lu, %lu;\n", res, low, hig);
|
||||
return res;
|
||||
}
|
||||
|
||||
int draw_eval_bool64(ivl_expr_t expr)
|
||||
{
|
||||
int res;
|
||||
|
||||
switch (ivl_expr_type(expr)) {
|
||||
case IVL_EX_NUMBER:
|
||||
res = draw_number_bool64(expr);
|
||||
break;
|
||||
default:
|
||||
res = eval_bool64_logic(expr);
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
@ -232,15 +232,6 @@ extern void resize_vec4_wid(ivl_expr_t expr, unsigned wid);
|
|||
*/
|
||||
extern void draw_eval_real(ivl_expr_t ex);
|
||||
|
||||
/*
|
||||
* draw_eval_bool64 evaluates a bool expression. The return code from
|
||||
* the function is the index of the word register that contains the
|
||||
* result. The word is allocated with allocate_word(), so the caller
|
||||
* must arrange for it to be released with clr_word(). The width must
|
||||
* be such that it fits in a 64bit word.
|
||||
*/
|
||||
extern int draw_eval_bool64(ivl_expr_t ex);
|
||||
|
||||
/*
|
||||
* The draw_eval_string function evaluates the expression as a string,
|
||||
* and pushes the string onto the string stack.
|
||||
|
|
|
|||
Loading…
Reference in New Issue