summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2009-03-02 16:57:33 -0800
committerDavid Schleef <ds@schleef.org>2009-03-02 16:57:33 -0800
commite0b0c13096d42ca8e0b5c51589fa217ca823ef33 (patch)
tree04c599fb3663b9962ea1afa3d0cadc213addfed8 /examples
parent1cc75c69bf3c0f225ff82b20b4ac13b5e80f33d2 (diff)
Replace "s16" notation with "w"
Diffstat (limited to 'examples')
-rw-r--r--examples/jit.c14
-rw-r--r--examples/simple.c20
2 files changed, 17 insertions, 17 deletions
diff --git a/examples/jit.c b/examples/jit.c
index d3fc7f6..92ca490 100644
--- a/examples/jit.c
+++ b/examples/jit.c
@@ -35,15 +35,15 @@ main (int argc, char *argv[])
offset = orc_program_add_constant (p, 2, 1, "offset");
shift = orc_program_add_constant (p, 2, 1, "shift");
- orc_program_append (p, "add_s16", t1, s1, s2);
- orc_program_append (p, "add_s16", t1, t1, offset);
- orc_program_append (p, "rshift_s16", d1, t1, shift);
+ orc_program_append (p, "addw", t1, s1, s2);
+ orc_program_append (p, "addw", t1, t1, offset);
+ orc_program_append (p, "shrsw", d1, t1, shift);
#if 0
- orc_program_append (p, "lshift_s16", d1, s1, shift);
- //orc_program_append (p, "sub_s16", t1, t1, shift);
- //orc_program_append (p, "mul_s16", d1, s1, s2);
- //orc_program_append (p, "_loadi_s16", t1, t1, shift);
+ orc_program_append (p, "shlw", d1, s1, shift);
+ //orc_program_append (p, "subw", t1, t1, shift);
+ //orc_program_append (p, "mullw", d1, s1, s2);
+ //orc_program_append (p, "_loadiw", t1, t1, shift);
#endif
orc_program_compile (p);
diff --git a/examples/simple.c b/examples/simple.c
index f1f3a72..77031c1 100644
--- a/examples/simple.c
+++ b/examples/simple.c
@@ -39,7 +39,7 @@ test1(void)
p = orc_program_new_dss (2, 2, 2);
- orc_program_append_str (p, "add_s16", "d1", "s1", "s2");
+ orc_program_append_str (p, "addw", "d1", "s1", "s2");
orc_program_compile (p);
@@ -94,12 +94,12 @@ test2(void)
t1 = orc_program_add_temporary (p, 2, "t1");
t2 = orc_program_add_temporary (p, 2, "t2");
- orc_program_append (p, "add_s16", t1, s2, s3);
- orc_program_append (p, "add_s16", t2, s1, s4);
- orc_program_append (p, "mul_s16", t1, t1, c1);
- orc_program_append (p, "sub_s16", t1, t1, t2);
- orc_program_append (p, "add_s16", t1, t1, c2);
- orc_program_append (p, "rshift_s16", d1, t1, c3);
+ orc_program_append (p, "addw", t1, s2, s3);
+ orc_program_append (p, "addw", t2, s1, s4);
+ orc_program_append (p, "mullw", t1, t1, c1);
+ orc_program_append (p, "subw", t1, t1, t2);
+ orc_program_append (p, "addw", t1, t1, c2);
+ orc_program_append (p, "shrsw", d1, t1, c3);
orc_program_compile (p);
@@ -163,9 +163,9 @@ test3(void)
t1 = orc_program_add_temporary (p, 2, "t1");
t2 = orc_program_add_temporary (p, 2, "t2");
- orc_program_append (p, "add_s16", t1, s1, s2);
- orc_program_append (p, "add_s16", t2, t1, c1);
- orc_program_append (p, "rshift_s16", d1, t2, c2);
+ orc_program_append (p, "addw", t1, s1, s2);
+ orc_program_append (p, "addw", t2, t1, c1);
+ orc_program_append (p, "shrsw", d1, t2, c2);
orc_program_compile (p);