aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/show-parse.c
diff options
authorLinus Torvalds <torvalds@home.transmeta.com>2003-05-31 17:21:09 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:00:47 -0700
commit047821f7db2a4c4dd348bbc30d1cbcd46d404e5a (patch)
treea00e0288eecf1218d6270900fcc954f387242ff6 /show-parse.c
parent32dc632cf37e8a7a9443e6b38085420ec74ac9ac (diff)
downloadsparse-dev-047821f7db2a4c4dd348bbc30d1cbcd46d404e5a.tar.gz
Make function returns a bit more realistic
Diffstat (limited to 'show-parse.c')
-rw-r--r--show-parse.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/show-parse.c b/show-parse.c
index 509403a9..a689205f 100644
--- a/show-parse.c
+++ b/show-parse.c
@@ -305,6 +305,8 @@ void show_symbol(struct symbol *sym)
case SYM_FN:
printf("\n");
show_statement(type->stmt);
+ printf(".L%p:\n", type->stmt->ret);
+ printf("\tret\n");
break;
default:
@@ -319,14 +321,15 @@ void show_symbol(struct symbol *sym)
static int show_return_stmt(struct statement *stmt)
{
- struct expression *expr = stmt->expression;
+ struct expression *expr = stmt->ret_value;
+ struct symbol *target = stmt->ret_target;
if (expr && expr->ctype) {
int val = show_expression(expr);
printf("\tmov.%d\t\tretval,v%d\n",
expr->ctype->bit_size, val);
}
- printf("\tret\n");
+ printf("\tgoto .L%p\n", target);
return 0;
}