From cec29b2aa8b33a04b2a436ca326bbf0b0d6994ec Mon Sep 17 00:00:00 2001 From: David Schleef Date: Mon, 14 Jun 2010 15:54:15 -0700 Subject: [PATCH] Fix ABI issues caused by 5bfde389c78155 Although OrcVariable and OrcProgram are completely private, orcc generates code that digs deep into OrcProgram for code_exec. We're requiring that generated code is ABI compatible, so that means the offset of code_exec in OrcProgram is part of the ABI. Oops. --- orc/orcprogram-c.c | 24 +++--------------------- orc/orcprogram.c | 2 +- orc/orcprogram.h | 4 +--- 3 files changed, 5 insertions(+), 25 deletions(-) diff --git a/orc/orcprogram-c.c b/orc/orcprogram-c.c index 424d41c..844a8b5 100644 --- a/orc/orcprogram-c.c +++ b/orc/orcprogram-c.c @@ -275,27 +275,9 @@ orc_compiler_c_assemble (OrcCompiler *compiler) char s1[20], s2[20]; get_varname(s1, compiler, i); get_varname_stride(s2, compiler, i); - switch (var->sampling_type) { - case ORC_SAMPLE_REGULAR: - ORC_ASM_CODE(compiler, - " ptr%d = ORC_PTR_OFFSET(%s, %s * j);\n", - i, s1, s2); - break; - case ORC_SAMPLE_TRANSPOSED: - ORC_ASM_CODE(compiler, - " ptr%d = ORC_PTR_OFFSET(%s, %d * j);\n", - i, s1, var->size); - break; - case ORC_SAMPLE_NEAREST: - case ORC_SAMPLE_BILINEAR: - case ORC_SAMPLE_FOUR_TAP: - ORC_ASM_CODE(compiler, - " ptr%d = ORC_PTR_OFFSET(%s, %s * j);\n", - i, s1, s2); - break; - default: - ORC_COMPILER_ERROR(compiler, "eeek"); - } + ORC_ASM_CODE(compiler, + " ptr%d = ORC_PTR_OFFSET(%s, %s * j);\n", + i, s1, s2); } break; case ORC_VAR_TYPE_DEST: diff --git a/orc/orcprogram.c b/orc/orcprogram.c index a8bd9d4..5018101 100644 --- a/orc/orcprogram.c +++ b/orc/orcprogram.c @@ -430,7 +430,7 @@ void orc_program_set_sampling_type (OrcProgram *program, int var, int sampling_type) { - program->vars[var].sampling_type = sampling_type; + /* This doesn't do anything yet */ } /** diff --git a/orc/orcprogram.h b/orc/orcprogram.h index 73cdf73..41216ba 100644 --- a/orc/orcprogram.h +++ b/orc/orcprogram.h @@ -205,10 +205,8 @@ struct _OrcVariable { int ptr_offset; int mask_alloc; int aligned_data; - int sampling_type; - int load_dest; - double float_value; int is_float_param; + int load_dest; }; /** -- 2.7.4