Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/orc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2012-09-03 05:36:21 +0400
committerDavid Schleef <ds@schleef.org>2012-09-03 23:31:05 +0400
commit299bc5ea3de69c3cfe391b57214c3fb2926608c8 (patch)
tree8257c383b88c4f60dec58163ab18c55d678ea04a
parent71d638d473105204ac5ac8bfc6b9536d252847b2 (diff)
Break ABI to head towards 0.6
-rw-r--r--configure.ac4
-rw-r--r--orc/orccompiler.c14
-rw-r--r--orc/orcexecutor.c14
-rw-r--r--orc/orcprogram.c3
-rw-r--r--orc/orcprogram.h42
-rw-r--r--testsuite/Makefile.am3
-rw-r--r--testsuite/abi.c33
-rw-r--r--testsuite/memcpy_speed.c6
8 files changed, 16 insertions, 103 deletions
diff --git a/configure.ac b/configure.ac
index c7eb199..8703b5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ([2.58])
-AC_INIT(orc,0.4.16.1)
+AC_INIT(orc,0.5.0.1)
dnl don't forget to update libversion
AS_NANO(ORC_GIT=no,ORC_GIT=yes)
@@ -7,7 +7,7 @@ AS_NANO(ORC_GIT=no,ORC_GIT=yes)
AC_CANONICAL_HOST([])
AM_INIT_AUTOMAKE(1.6)
-ORC_MAJORMINOR=0.4
+ORC_MAJORMINOR=0.6
AC_SUBST(ORC_MAJORMINOR)
AM_CONFIG_HEADER(config.h)
diff --git a/orc/orccompiler.c b/orc/orccompiler.c
index 68eb01e..477bc91 100644
--- a/orc/orccompiler.c
+++ b/orc/orccompiler.c
@@ -194,11 +194,6 @@ orc_program_compile_full (OrcProgram *program, OrcTarget *target,
compiler = malloc (sizeof(OrcCompiler));
memset (compiler, 0, sizeof(OrcCompiler));
- if (program->backup_func) {
- program->code_exec = program->backup_func;
- } else {
- program->code_exec = (void *)orc_executor_emulate;
- }
compiler->program = program;
compiler->target = target;
@@ -293,7 +288,11 @@ orc_program_compile_full (OrcProgram *program, OrcTarget *target,
program->orccode->is_2d = program->is_2d;
program->orccode->constant_n = program->constant_n;
program->orccode->constant_m = program->constant_m;
- program->orccode->exec = program->code_exec;
+ if (program->backup_func) {
+ program->orccode->exec = program->backup_func;
+ } else {
+ program->orccode->exec = (void *)orc_executor_emulate;
+ }
program->orccode->n_insns = compiler->n_insns;
program->orccode->insns = malloc(sizeof(OrcInstruction) * compiler->n_insns);
@@ -316,7 +315,6 @@ orc_program_compile_full (OrcProgram *program, OrcTarget *target,
}
if (_orc_compiler_flag_emulate || target == NULL) {
- program->code_exec = (void *)orc_executor_emulate;
program->orccode->exec = (void *)orc_executor_emulate;
orc_compiler_error (compiler, "Compilation disabled, using emulation");
compiler->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE;
@@ -353,8 +351,6 @@ orc_program_compile_full (OrcProgram *program, OrcTarget *target,
compiler->target->flush_cache (program->orccode);
}
- program->code_exec = program->orccode->exec;
-
program->asm_code = compiler->asm_code;
result = compiler->result;
diff --git a/orc/orcexecutor.c b/orc/orcexecutor.c
index a1b3840..2a3d0b0 100644
--- a/orc/orcexecutor.c
+++ b/orc/orcexecutor.c
@@ -40,13 +40,9 @@ void
orc_executor_run (OrcExecutor *ex)
{
void (*func) (OrcExecutor *);
+ OrcCode *code = (OrcCode *)ex->arrays[ORC_VAR_A2];
- if (ex->program) {
- func = ex->program->code_exec;
- } else {
- OrcCode *code = (OrcCode *)ex->arrays[ORC_VAR_A2];
- func = code->exec;
- }
+ func = code->exec;
if (func) {
func (ex);
//ORC_ERROR("counters %d %d %d", ex->counter1, ex->counter2, ex->counter3);
@@ -78,11 +74,7 @@ void
orc_executor_set_program (OrcExecutor *ex, OrcProgram *program)
{
ex->program = program;
- if (program->code_exec) {
- ex->arrays[ORC_VAR_A1] = (void *)program->code_exec;
- } else {
- ex->arrays[ORC_VAR_A1] = (void *)orc_executor_emulate;
- }
+ ex->arrays[ORC_VAR_A1] = (void *)orc_executor_emulate;
}
void
diff --git a/orc/orcprogram.c b/orc/orcprogram.c
index 13c219c..653220f 100644
--- a/orc/orcprogram.c
+++ b/orc/orcprogram.c
@@ -260,9 +260,6 @@ void
orc_program_set_backup_function (OrcProgram *program, OrcExecutorFunc func)
{
program->backup_func = func;
- if (program->code_exec == NULL) {
- program->code_exec = func;
- }
}
/**
diff --git a/orc/orcprogram.h b/orc/orcprogram.h
index 6c442e1..089a66e 100644
--- a/orc/orcprogram.h
+++ b/orc/orcprogram.h
@@ -26,43 +26,6 @@ ORC_BEGIN_DECLS
*/
struct _OrcProgram {
/*< private >*/
- struct {
- OrcStaticOpcode *opcode;
- int dest_args[ORC_STATIC_OPCODE_N_DEST];
- int src_args[ORC_STATIC_OPCODE_N_SRC];
-
- OrcRule *rule;
- } _unused[ORC_N_INSNS]; /* needed for ABI compatibility */
- int n_insns;
-
- struct {
- char *name;
- char *type_name;
-
- int size;
- OrcVarType vartype;
-
- int used;
- int first_use;
- int last_use;
- int replaced;
- int replacement;
-
- int alloc;
- int is_chained;
- int is_aligned;
- int is_uncached;
-
- int value;
-
- int ptr_register;
- int ptr_offset;
- int mask_alloc;
- int aligned_data;
- int param_type;
- int load_dest;
- } _unused3[ORC_N_VARIABLES]; /* needed for ABI compatibility */
-
int n_src_vars;
int n_dest_vars;
int n_param_vars;
@@ -73,10 +36,7 @@ struct _OrcProgram {
char *name;
char *asm_code;
- unsigned char *_unused2;
- /* The offset of code_exec in this structure is part of the ABI */
- void *code_exec;
-
+ int n_insns;
OrcInstruction insns[ORC_N_INSNS];
OrcVariable vars[ORC_N_VARIABLES];
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index 4926454..837f2d0 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -11,8 +11,7 @@ TESTS = \
exec_opcodes_sys \
exec_parse \
perf_opcodes_sys perf_parse \
- memcpy_speed \
- abi
+ memcpy_speed
noinst_PROGRAMS = $(TESTS) generate_xml_table generate_xml_table2 \
generate_opcodes_sys compile_parse compile_parse_c memcpy_speed \
diff --git a/testsuite/abi.c b/testsuite/abi.c
deleted file mode 100644
index 4bf9d01..0000000
--- a/testsuite/abi.c
+++ /dev/null
@@ -1,33 +0,0 @@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <orc/orc.h>
-
-#include <stdio.h>
-
-
-int main (int argc, char *argv[])
-{
- long offset;
- int expected_offset;
- int error = 0;
-
- offset = ORC_STRUCT_OFFSET (OrcProgram, code_exec);
-
- if (sizeof(void *) == 4) {
- expected_offset = 8360;
- } else {
- expected_offset = 9688;
- }
-
- if (offset != expected_offset) {
- printf("ABI bug: OrcProgram->code_exec should be at offset %ld instead of %d\n",
- offset, expected_offset);
- error = 1;
- }
-
- return error;
-}
-
diff --git a/testsuite/memcpy_speed.c b/testsuite/memcpy_speed.c
index dda3de7..3ac48da 100644
--- a/testsuite/memcpy_speed.c
+++ b/testsuite/memcpy_speed.c
@@ -44,6 +44,7 @@ main(int argc, char *argv[])
OrcProgram *p;
int level1, level2, level3;
int max;
+ OrcCode *code;
//const uint8_t zero = 0;
orc_init ();
@@ -87,6 +88,8 @@ main(int argc, char *argv[])
fprintf (stderr, "Failed to compile orc_memcpy\n");
return -1;
}
+
+ code = orc_program_take_code (p);
}
#ifndef M_LN2
@@ -122,12 +125,11 @@ main(int argc, char *argv[])
orc_profile_start(&prof);
//orc_memcpy (dest, src, size);
- ex->program = p;
ex->n = size;
ex->arrays[ORC_VAR_D1] = dest;
ex->arrays[ORC_VAR_S1] = (void *)src;
- func = p->code_exec;
+ func = code->exec;
func (ex);
orc_profile_stop(&prof);