Attachment: pasm.el
Description: application/emacs-lisp

Index: core.ops
===================================================================
RCS file: /cvs/public/parrot/core.ops,v
retrieving revision 1.120
diff -u -r1.120 core.ops
--- core.ops	14 Apr 2002 02:05:46 -0000	1.120
+++ core.ops	14 Apr 2002 18:11:08 -0000
@@ -2571,6 +2571,80 @@
 
 ########################################
 
+=item B<loop_down>(in INT, in INT, in INT)
+
+$1: counter
+$2: target value
+$3: continue loop location
+
+If $1 is not equal to $2 (we haven't reached the target value) branch
+to the location specified in $3 and decrement $1.
+
+=cut
+
+inline op loop_down (out INT, in INT, in INT) {
+  if ($1-- != $2) {
+    goto OFFSET($3);
+  }
+  goto NEXT();
+}
+
+=item B<loop_downz>(out INT, in INT)
+
+$1: counter
+$2: continue loop location
+
+If $1 is not zero decrement $1 and branch to the location specified in
+$2.
+
+=cut
+
+inline op loop_downz (out INT, in INT) {
+  if ($1-- != 0) {
+    goto OFFSET($2);
+  }
+  goto NEXT();
+}
+
+=item B<loop_up>(out INT, in INT, in INT)
+
+$1: counter
+$2: target value
+$3: continue loop location
+
+If $1 is not equal to $2 increment $1 and branch to the location
+specified in $3.
+
+=cut
+
+inline op loop_up (in INT, in INT, in INT) {
+  if ($1++ != $2) {
+    goto OFFSET($3);
+  }
+  goto NEXT();
+}
+
+=item B<loop_upz>(in INT, in INT, in INT)
+
+$1: counter
+$2: continue loop location
+
+If $1 is not equal to 0 increment $1 and branch to the location
+specified in $2. Note: This op is exists mainly for completeness, it
+is not expected to get used a lot.
+
+=cut
+
+inline op loop_upz (in INT, in INT) {
+  if ($1++ != 0) {
+    goto OFFSET($2);
+  }
+  goto NEXT();
+}
+
+
+########################################
+
 =item B<branch>(in INT)
 
 Branch forward or backward by the amount in $1.



-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There's a crack in everything.
It's how the light gets in.
     -Isonard Cohen

Reply via email to