From: David Schleef Date: Mon, 20 Sep 2010 20:09:16 +0000 (-0700) Subject: Handle ORC_CODE=emulate to force emulation X-Git-Tag: orc-0.4.10~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e28caafb84aeb8444a644a15912e1ac4bfd2a4d1;p=platform%2Fupstream%2Forc.git Handle ORC_CODE=emulate to force emulation --- diff --git a/orc/orccompiler.c b/orc/orccompiler.c index 7d60eb9..7f44de0 100644 --- a/orc/orccompiler.c +++ b/orc/orccompiler.c @@ -43,6 +43,7 @@ void orc_compiler_check_sizes (OrcCompiler *compiler); static char **_orc_compiler_flag_list; int _orc_compiler_flag_backup; +int _orc_compiler_flag_emulate; int _orc_compiler_flag_debug; void @@ -56,6 +57,7 @@ _orc_compiler_init (void) } _orc_compiler_flag_backup = orc_compiler_flag_check ("backup"); + _orc_compiler_flag_emulate = orc_compiler_flag_check ("emulate"); _orc_compiler_flag_debug = orc_compiler_flag_check ("debug"); } @@ -206,6 +208,12 @@ orc_program_compile_full (OrcProgram *program, OrcTarget *target, goto error; } + if (_orc_compiler_flag_emulate) { + program->code_exec = (void *)orc_executor_emulate; + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; + goto error; + } + if (target == NULL) { ORC_COMPILER_ERROR(compiler, "No target given"); compiler->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; diff --git a/orc/orcprogram.h b/orc/orcprogram.h index c88ccf2..14a6949 100644 --- a/orc/orcprogram.h +++ b/orc/orcprogram.h @@ -766,6 +766,7 @@ extern int _orc_cpu_stepping; extern const char *_orc_cpu_name; extern int _orc_compiler_flag_backup; +extern int _orc_compiler_flag_emulate; extern int _orc_compiler_flag_debug; void orc_code_chunk_free (OrcCodeChunk *chunk);