diff options
author | David Schleef <ds@schleef.org> | 2009-03-02 15:27:57 -0800 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2009-03-02 15:27:57 -0800 |
commit | 1cc75c69bf3c0f225ff82b20b4ac13b5e80f33d2 (patch) | |
tree | c1b7b3823d93a23f2456a3533c1c4f88eaf4e2fa /examples | |
parent | 277df32cf10b1896a2d868446efca7290ca126db (diff) | |
download | orc-1cc75c69bf3c0f225ff82b20b4ac13b5e80f33d2.tar.gz |
Remove types, use a size instead
Diffstat (limited to 'examples')
-rw-r--r-- | examples/jit.c | 12 | ||||
-rw-r--r-- | examples/simple.c | 36 |
2 files changed, 24 insertions, 24 deletions
diff --git a/examples/jit.c b/examples/jit.c index 52cd1be..d3fc7f6 100644 --- a/examples/jit.c +++ b/examples/jit.c @@ -28,12 +28,12 @@ main (int argc, char *argv[]) p = orc_program_new (); - d1 = orc_program_add_destination (p, "s16", "d1"); - s1 = orc_program_add_source (p, "s16", "s1"); - s2 = orc_program_add_source (p, "s16", "s2"); - t1 = orc_program_add_temporary (p, "s16", "t1"); - offset = orc_program_add_constant (p, "s16", 1, "offset"); - shift = orc_program_add_constant (p, "s16", 1, "shift"); + d1 = orc_program_add_destination (p, 2, "d1"); + s1 = orc_program_add_source (p, 2, "s1"); + s2 = orc_program_add_source (p, 2, "s2"); + t1 = orc_program_add_temporary (p, 2, "t1"); + 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); diff --git a/examples/simple.c b/examples/simple.c index 1f32f7a..f1f3a72 100644 --- a/examples/simple.c +++ b/examples/simple.c @@ -37,7 +37,7 @@ test1(void) OrcProgram *p; OrcExecutor *ex; - p = orc_program_new_dss ("s16", "s16", "s16"); + p = orc_program_new_dss (2, 2, 2); orc_program_append_str (p, "add_s16", "d1", "s1", "s2"); @@ -83,16 +83,16 @@ test2(void) p = orc_program_new (); - d1 = orc_program_add_destination (p, "s16", "d1"); - s1 = orc_program_add_source (p, "s16", "s1"); - s2 = orc_program_add_source (p, "s16", "s2"); - s3 = orc_program_add_source (p, "s16", "s3"); - s4 = orc_program_add_source (p, "s16", "s4"); - c1 = orc_program_add_constant (p, "s16", 3, "c1"); - c2 = orc_program_add_constant (p, "s16", 4, "c2"); - c3 = orc_program_add_constant (p, "s16", 3, "c3"); - t1 = orc_program_add_temporary (p, "s16", "t1"); - t2 = orc_program_add_temporary (p, "s16", "t2"); + d1 = orc_program_add_destination (p, 2, "d1"); + s1 = orc_program_add_source (p, 2, "s1"); + s2 = orc_program_add_source (p, 2, "s2"); + s3 = orc_program_add_source (p, 2, "s3"); + s4 = orc_program_add_source (p, 2, "s4"); + c1 = orc_program_add_constant (p, 2, 3, "c1"); + c2 = orc_program_add_constant (p, 2, 4, "c2"); + c3 = orc_program_add_constant (p, 2, 3, "c3"); + 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); @@ -155,13 +155,13 @@ test3(void) p = orc_program_new (); - d1 = orc_program_add_destination (p, "s16", "d1"); - s1 = orc_program_add_source (p, "s16", "s1"); - s2 = orc_program_add_source (p, "s16", "s2"); - c1 = orc_program_add_constant (p, "s16", -1, "c1"); - c2 = orc_program_add_constant (p, "s16", 1, "c2"); - t1 = orc_program_add_temporary (p, "s16", "t1"); - t2 = orc_program_add_temporary (p, "s16", "t2"); + d1 = orc_program_add_destination (p, 2, "d1"); + s1 = orc_program_add_source (p, 2, "s1"); + s2 = orc_program_add_source (p, 2, "s2"); + c1 = orc_program_add_constant (p, 2, -1, "c1"); + c2 = orc_program_add_constant (p, 2, 1, "c2"); + 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); |