diff options
| author | Linus Torvalds <torvalds@penguin.transmeta.com> | 2003-05-23 17:41:39 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:00:45 -0700 |
| commit | a10932174ca47672bc8f62a5b98fbcfb34ee534b (patch) | |
| tree | 7365f1793fd1f1f23db7de1704aeb0dbce372da1 /show-parse.c | |
| parent | e5b62a635d5a9d7b5da58922086bb3c9570eb36c (diff) | |
| download | sparse-dev-a10932174ca47672bc8f62a5b98fbcfb34ee534b.tar.gz | |
Parse and evaluate gcc computed goto extensions: label addressing
(&&label) and computed goto (goto *expr).
Add label ctype for __label__ identifier. This is still quite broken
(it should create a block-symbol in the NS_LABEL namespace, right now
it creates a regular symbol).
Diffstat (limited to 'show-parse.c')
| -rw-r--r-- | show-parse.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/show-parse.c b/show-parse.c index 556e01e8..31dfcfb5 100644 --- a/show-parse.c +++ b/show-parse.c @@ -824,6 +824,13 @@ static int show_bitfield_expr(struct expression *expr) return show_access(expr); } +int show_label_expr(struct expression *expr) +{ + int new = new_pseudo(); + printf("\tmovi.%d\t\tv%d,.L%p\n",BITS_IN_POINTER, new, expr->label_symbol); + return new; +} + static int show_conditional_expr(struct expression *expr) { int cond = show_expression(expr->conditional); @@ -931,6 +938,8 @@ int show_expression(struct expression *expr) return show_conditional_expr(expr); case EXPR_STATEMENT: return show_statement_expr(expr); + case EXPR_LABEL: + return show_label_expr(expr); // None of these should exist as direct expressions: they are only // valid as sub-expressions of initializers. |
