summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2009-06-28 00:10:26 -0700
committerDavid Schleef <ds@schleef.org>2009-06-28 00:12:18 -0700
commit7bb86857e788b7a694c812bdcd3d5611cf6f909a (patch)
treeb8241756e870c055b62c130f3807e84704709045 /tools
parent1903feb1a3bc856deb45d0d2e3b73180b6818750 (diff)
orcc: handle constants
Diffstat (limited to 'tools')
-rw-r--r--tools/orcc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/orcc.c b/tools/orcc.c
index fce5ef1..86938cf 100644
--- a/tools/orcc.c
+++ b/tools/orcc.c
@@ -354,8 +354,13 @@ output_code (OrcProgram *p, FILE *output)
for(i=0;i<8;i++){
var = &p->vars[ORC_VAR_C1 + i];
if (var->size) {
- fprintf(output, " orc_program_add_constant (p, %d, %d, \"%s\");\n",
- var->size, var->value, varnames[ORC_VAR_C1 + i]);
+ if (var->value != 0x80000000) {
+ fprintf(output, " orc_program_add_constant (p, %d, %u, \"%s\");\n",
+ var->size, var->value, varnames[ORC_VAR_C1 + i]);
+ } else {
+ fprintf(output, " orc_program_add_constant (p, %d, 0x%08x, \"%s\");\n",
+ var->size, var->value, varnames[ORC_VAR_C1 + i]);
+ }
}
}
for(i=0;i<8;i++){