diff options
| author | aarne <unknown> | 2004-09-25 08:24:11 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2004-09-25 08:24:11 +0000 |
| commit | 5a208ce3ea26726d15e814c0498680597cca45fa (patch) | |
| tree | 89ca12f9b6f9fe16cf4bcd6d165e13f3021ce619 /examples/gfcc/compiler/runtime.j | |
| parent | ff2a2895c08b667894b565c8d39f0bf63d85492a (diff) | |
compiler works on abs and fibonacci
Diffstat (limited to 'examples/gfcc/compiler/runtime.j')
| -rw-r--r-- | examples/gfcc/compiler/runtime.j | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/examples/gfcc/compiler/runtime.j b/examples/gfcc/compiler/runtime.j index c99523cc7..88db0b9b8 100644 --- a/examples/gfcc/compiler/runtime.j +++ b/examples/gfcc/compiler/runtime.j @@ -19,7 +19,37 @@ Label0: iconst_0 ireturn - Label1: .end method -; TODO: flt missing +.method public static flt(FF)I +.limit locals 2 +.limit stack 2 + fload_0 + fload_1 + fcmpl + ifge Label0 + iconst_1 + ireturn + Label0: + iconst_0 + ireturn +.end method + +.method public static iprintf(I)V +.limit locals 1 +.limit stack 1000 + getstatic java/lang/System/out Ljava/io/PrintStream; + iload_0 + invokevirtual java/io/PrintStream/println(I)V + return +.end method + +.method public static fprintf(F)V +.limit locals 1 +.limit stack 1000 + getstatic java/lang/System/out Ljava/io/PrintStream; + fload_0 + invokevirtual java/io/PrintStream/println(F)V + return +.end method + |
