diff options
author | 2004-07-23 22:35:46 -0700 | |
---|---|---|
committer | 2005-04-07 21:02:18 -0700 | |
commit | 9c2ebe3f27f19095e2822463aa713be4b8b523d2 (patch) | |
tree | 8fc6a25bc864b026da78824d9c961e8536f06084 /show-parse.c | |
parent | [PATCH] evaluate_conditional() prepared for FP (diff) | |
download | sparse-9c2ebe3f27f19095e2822463aa713be4b8b523d2.tar.gz sparse-9c2ebe3f27f19095e2822463aa713be4b8b523d2.tar.bz2 sparse-9c2ebe3f27f19095e2822463aa713be4b8b523d2.zip |
[PATCH] FP handling
FP handling added, everything straightforward by now.
Diffstat (limited to 'show-parse.c')
-rw-r--r-- | show-parse.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/show-parse.c b/show-parse.c index 517719b..efe5581 100644 --- a/show-parse.c +++ b/show-parse.c @@ -842,6 +842,15 @@ static int show_value(struct expression *expr) return new; } +static int show_fvalue(struct expression *expr) +{ + int new = new_pseudo(); + long double value = expr->fvalue; + + printf("\tmovf.%d\t\tv%d,$%Lf\n", expr->ctype->bit_size, new, value); + return new; +} + static int show_string_expr(struct expression *expr) { int new = new_pseudo(); @@ -969,6 +978,8 @@ int show_expression(struct expression *expr) return show_cast_expr(expr); case EXPR_VALUE: return show_value(expr); + case EXPR_FVALUE: + return show_fvalue(expr); case EXPR_STRING: return show_string_expr(expr); case EXPR_BITFIELD: |