Permalink
Browse files

attempt to refactor fp_equality.pasm to use macro_local's

  • Loading branch information...
1 parent 10496ba commit 4087984e1115d34243daa0c3d38207194eb46977 @leto leto committed Aug 12, 2009
Showing with 11 additions and 9 deletions.
  1. +11 −9 runtime/parrot/include/fp_equality.pasm
@@ -24,16 +24,18 @@ The same macros are also provided for PASM.
.endm
.macro fp_eq_ok ( J, K, L )
- set $N10, .J
- set $N11, .K
- sub $N12, $N11, $N10
- abs $N12, $N12
-
- set $I0, 0
- gt $N12, 0.000001, .$FPEQNOK
- set $I0, 1
+ macro_local num $J, $K, $L
+ macro_local int $i
+ set $J, .J
+ set $K, .K
+ sub $K, $K, $J
+ abs $K, $K
+
+ set $I, 0
+ gt $K, 0.000001, .$FPEQNOK
+ set $I, 1
.label $FPEQNOK:
- ok( $I0, .L )
+ ok( i, .$L )
.endm
.macro fp_ne ( J, K, L )

0 comments on commit 4087984

Please sign in to comment.