summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2011-05-16 11:52:19 -0700
committerDavid Schleef <ds@schleef.org>2011-05-16 11:53:10 -0700
commitfa3263b297ad3c5f8938248498802fe665797087 (patch)
tree6daa0f3ca4afd4be645ceee57e8515fb27c81343 /tools
parent32e045d5a5af3756c6735908bef02677d5ff560d (diff)
parse: Add n modifiers
Diffstat (limited to 'tools')
-rw-r--r--tools/orcc.c36
1 files changed, 32 insertions, 4 deletions
diff --git a/tools/orcc.c b/tools/orcc.c
index 1570946..8177548 100644
--- a/tools/orcc.c
+++ b/tools/orcc.c
@@ -861,6 +861,21 @@ output_program_generation (OrcProgram *p, FILE *output, int is_inline)
fprintf(output, " orc_program_set_constant_n (p, %d);\n",
p->constant_n);
}
+ if (p->n_multiple != 0) {
+ REQUIRE(0,4,14,1);
+ fprintf(output, " orc_program_set_n_multiple (p, %d);\n",
+ p->constant_n);
+ }
+ if (p->n_minimum != 0) {
+ REQUIRE(0,4,14,1);
+ fprintf(output, " orc_program_set_n_minimum (p, %d);\n",
+ p->constant_n);
+ }
+ if (p->n_maximum != 0) {
+ REQUIRE(0,4,14,1);
+ fprintf(output, " orc_program_set_n_maximum (p, %d);\n",
+ p->constant_n);
+ }
if (p->is_2d) {
fprintf(output, " orc_program_set_2d (p);\n");
if (p->constant_m != 0) {
@@ -876,15 +891,28 @@ output_program_generation (OrcProgram *p, FILE *output, int is_inline)
for(i=0;i<4;i++){
var = &p->vars[ORC_VAR_D1 + i];
if (var->size) {
- fprintf(output, " orc_program_add_destination (p, %d, \"%s\");\n",
- var->size, varnames[ORC_VAR_D1 + i]);
+ if (var->alignment != var->size) {
+ REQUIRE(0,4,14,1);
+ fprintf(output, " orc_program_add_destination_full (p, %d, \"%s\", NULL, %d);\n",
+ var->size, varnames[ORC_VAR_D1 + i], var->alignment);
+ } else {
+ fprintf(output, " orc_program_add_destination (p, %d, \"%s\");\n",
+ var->size, varnames[ORC_VAR_D1 + i]);
+ }
}
}
for(i=0;i<8;i++){
var = &p->vars[ORC_VAR_S1 + i];
if (var->size) {
- fprintf(output, " orc_program_add_source (p, %d, \"%s\");\n",
- var->size, varnames[ORC_VAR_S1 + i]);
+ if (var->alignment != var->size) {
+ REQUIRE(0,4,14,1);
+ fprintf(output, " orc_program_add_source_full (p, %d, \"%s\", NULL, %d);\n",
+ var->size, varnames[ORC_VAR_S1 + i],
+ var->alignment);
+ } else {
+ fprintf(output, " orc_program_add_source (p, %d, \"%s\");\n",
+ var->size, varnames[ORC_VAR_S1 + i]);
+ }
}
}
for(i=0;i<4;i++){