1 /* $Id: cs_aux.c,v 1.4 1994/06/24 10:21:52 ceriel Exp $ */
3 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4 * See the copyright notice in the ACK home directory, in the file "Copyright".
6 #include "../share/types.h"
7 #include "../share/debug.h"
8 #include "../share/aux.h"
9 #include "../share/global.h"
10 #include "../share/lset.h"
12 #include "cs_entity.h"
14 offset array_elemsize(vn)
17 /* Vn is the valuenumber of an entity that points to
18 * an array-descriptor. The third element of this descriptor holds
19 * the size of the array-elements.
20 * IF we can find this entity, AND IF we can find the descriptor AND IF
21 * this descriptor is located in ROM, then we return the size.
25 enp = find_entity(vn);
27 if (enp == (entity_p) 0)
30 if (enp->en_kind != ENAEXTERNAL)
33 if (enp->en_ext->o_dblock->d_pseudo != DROM)
36 return aoff(enp->en_ext->o_dblock->d_values, 2);
42 return (occur_p) Lelem(i);
48 return (entity_p) Lelem(i);
51 /* The value numbers associated with each distinct value
59 /* Return a completely new value number. */
66 /* Restart value numbering. */