diff options
| author | aarne <aarne@chalmers.se> | 2010-03-02 19:10:56 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2010-03-02 19:10:56 +0000 |
| commit | e4748e998453b979af46983a079f2ec3d307ada4 (patch) | |
| tree | ef1c2b278850a7f6a95959b6f18469645cf1094c /examples/gfcc/runtime.j | |
| parent | 21b10f91cbbd0a2d369dc55306bad53df1502cd7 (diff) | |
restored gfcc example (GF C compiler)
Diffstat (limited to 'examples/gfcc/runtime.j')
| -rw-r--r-- | examples/gfcc/runtime.j | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/examples/gfcc/runtime.j b/examples/gfcc/runtime.j new file mode 100644 index 000000000..88db0b9b8 --- /dev/null +++ b/examples/gfcc/runtime.j @@ -0,0 +1,55 @@ +.class public runtime +.super java/lang/Object +; +; standard initializer +.method public <init>()V + aload_0 + invokenonvirtual java/lang/Object/<init>()V + return +.end method + +.method public static ilt(II)I +.limit locals 2 +.limit stack 2 + iload_0 + iload_1 + if_icmpge Label0 + iconst_1 + ireturn + Label0: + iconst_0 + ireturn +.end method + +.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 + |
