aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-02-13 21:56:33 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-02-17 11:07:25 +0100
commit47bc08be942f2661d4bdd31ebe9c0caed9c8a753 (patch)
treeba3d9ce7f639c62cd903b4b40390ebe948033a66
parent48bda757364b7a2e3b767b401525c94a0cc7b8fa (diff)
downloadsparse-dev-47bc08be942f2661d4bdd31ebe9c0caed9c8a753.tar.gz
rename base_type() to bitfield_base_type()
In linearize.c, base_type() is not some kind of generic helper like get_base_type() but is a more specialized thing used for loads and stores and giving only the base type of bitfields. Rename this helper to bitfield_base_type() to make this more self-explained. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--linearize.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/linearize.c b/linearize.c
index 6f9300e7..c2a129f5 100644
--- a/linearize.c
+++ b/linearize.c
@@ -904,7 +904,7 @@ static int linearize_simple_address(struct entrypoint *ep,
return 1;
}
-static struct symbol *base_type(struct symbol *sym)
+static struct symbol *bitfield_base_type(struct symbol *sym)
{
struct symbol *base = sym;
@@ -936,7 +936,7 @@ static int linearize_address_gen(struct entrypoint *ep,
static pseudo_t add_load(struct entrypoint *ep, struct access_data *ad)
{
- struct symbol *btype = base_type(ad->type);
+ struct symbol *btype = bitfield_base_type(ad->type);
struct instruction *insn;
pseudo_t new;
@@ -955,7 +955,7 @@ static void add_store(struct entrypoint *ep, struct access_data *ad, pseudo_t va
struct basic_block *bb = ep->active;
if (bb_reachable(bb)) {
- struct symbol *btype = base_type(ad->type);
+ struct symbol *btype = bitfield_base_type(ad->type);
struct instruction *store = alloc_typed_instruction(OP_STORE, btype);
store->offset = ad->offset;
use_pseudo(store, value, &store->target);
@@ -969,7 +969,7 @@ static pseudo_t linearize_store_gen(struct entrypoint *ep,
struct access_data *ad)
{
struct symbol *ctype = ad->type;
- struct symbol *btype = base_type(ctype);
+ struct symbol *btype = bitfield_base_type(ctype);
pseudo_t store = value;
if (type_size(btype) != type_size(ctype)) {
@@ -1034,7 +1034,7 @@ static pseudo_t add_symbol_address(struct entrypoint *ep, struct symbol *sym)
static pseudo_t linearize_load_gen(struct entrypoint *ep, struct access_data *ad)
{
struct symbol *ctype = ad->type;
- struct symbol *btype = base_type(ctype);
+ struct symbol *btype = bitfield_base_type(ctype);
pseudo_t new = add_load(ep, ad);
if (ctype->bit_offset) {