aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwelinder@troll.com <welinder@troll.com>2004-08-13 10:25:57 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:02:45 -0700
commit577c02176cebdb28d59db0d29745d8addca297c6 (patch)
treecba969643980ba91e4d818c052e8d3d641829fd2 /show-parse.c
parentlib.c: (diff)
parent[PATCH] teach show_special() to handle tokens introduced by evaluate_comparis... (diff)
downloadsparse-577c02176cebdb28d59db0d29745d8addca297c6.tar.gz
sparse-577c02176cebdb28d59db0d29745d8addca297c6.tar.bz2
sparse-577c02176cebdb28d59db0d29745d8addca297c6.zip
Merge
Diffstat (limited to 'show-parse.c')
-rw-r--r--show-parse.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/show-parse.c b/show-parse.c
index c1a7913..48043c4 100644
--- a/show-parse.c
+++ b/show-parse.c
@@ -632,6 +632,14 @@ static int show_binop(struct expression *expr)
return new;
}
+static int show_slice(struct expression *expr)
+{
+ int target = show_expression(expr->base);
+ int new = new_pseudo();
+ printf("\tslice.%d\t\tv%d,v%d,%d\n", expr->r_nrbits, target, new, expr->r_bitpos);
+ return new;
+}
+
static int show_regular_preop(struct expression *expr)
{
int target = show_expression(expr->unop);
@@ -993,6 +1001,8 @@ int show_expression(struct expression *expr)
return show_statement_expr(expr);
case EXPR_LABEL:
return show_label_expr(expr);
+ case EXPR_SLICE:
+ return show_slice(expr);
// None of these should exist as direct expressions: they are only
// valid as sub-expressions of initializers.