forked from GitHub/gf-core
compiler works on abs and fibonacci
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user