Commit f9dbb051 authored by Doug Nazar's avatar Doug Nazar Committed by Sebastian Dröge

orc: Consolidate orc_program_has_float()

parent 643130c3
......@@ -35,6 +35,7 @@ extern int _orc_cpu_stepping;
extern const char *_orc_cpu_name;
void orc_compiler_emit_invariants (OrcCompiler *compiler);
int orc_program_has_float (OrcCompiler *compiler);
#endif
ORC_END_DECLS
......
......@@ -10,6 +10,7 @@
#include <orc/orcpowerpc.h>
#include <orc/orcprogram.h>
#include <orc/orcdebug.h>
#include <orc/orcinternal.h>
void orc_compiler_powerpc_register_rules (OrcTarget *target);
......@@ -174,18 +175,6 @@ powerpc_load_inner_constants (OrcCompiler *compiler)
}
}
static int
orc_program_has_float (OrcCompiler *compiler)
{
int j;
for(j=0;j<compiler->n_insns;j++){
OrcInstruction *insn = compiler->insns + j;
OrcStaticOpcode *opcode = insn->opcode;
if (opcode->flags & ORC_STATIC_OPCODE_FLOAT) return TRUE;
}
return FALSE;
}
static void
orc_compiler_powerpc_assemble (OrcCompiler *compiler)
{
......
......@@ -739,20 +739,6 @@ orc_emit_split_2_regions (OrcCompiler *compiler)
(int)ORC_STRUCT_OFFSET(OrcExecutor,counter3), compiler->exec_reg);
}
#ifndef MMX
static int
orc_program_has_float (OrcCompiler *compiler)
{
int j;
for(j=0;j<compiler->n_insns;j++){
OrcInstruction *insn = compiler->insns + j;
OrcStaticOpcode *opcode = insn->opcode;
if (opcode->flags & ORC_STATIC_OPCODE_FLOAT) return TRUE;
}
return FALSE;
}
#endif
#define LABEL_REGION1_SKIP 1
#define LABEL_INNER_LOOP_START 2
#define LABEL_REGION2_SKIP 3
......
......@@ -739,20 +739,6 @@ orc_emit_split_2_regions (OrcCompiler *compiler)
(int)ORC_STRUCT_OFFSET(OrcExecutor,counter3), compiler->exec_reg);
}
#ifndef MMX
static int
orc_program_has_float (OrcCompiler *compiler)
{
int j;
for(j=0;j<compiler->n_insns;j++){
OrcInstruction *insn = compiler->insns + j;
OrcStaticOpcode *opcode = insn->opcode;
if (opcode->flags & ORC_STATIC_OPCODE_FLOAT) return TRUE;
}
return FALSE;
}
#endif
#define LABEL_REGION1_SKIP 1
#define LABEL_INNER_LOOP_START 2
#define LABEL_REGION2_SKIP 3
......
......@@ -8,6 +8,7 @@
#include <orc/orcprogram.h>
#include <orc/orcdebug.h>
#include <orc/orcinternal.h>
/**
* SECTION:orcprogram
......@@ -1190,3 +1191,14 @@ orc_program_take_code (OrcProgram *program)
return code;
}
int
orc_program_has_float (OrcCompiler *compiler)
{
int j;
for(j=0;j<compiler->n_insns;j++){
OrcInstruction *insn = compiler->insns + j;
OrcStaticOpcode *opcode = insn->opcode;
if (opcode->flags & ORC_STATIC_OPCODE_FLOAT) return TRUE;
}
return FALSE;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment