summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-05-19 14:02:26 -0700
committerMatt Turner <[email protected]>2014-05-24 23:03:24 -0700
commitf3cb2e6ed7059b22752a6b7d7a98c07ba6b5552e (patch)
treed50270af3a05672d1d4d38acb276c5ea4f6d44ef
parent424303db7f9ad47524ec5f3e38500620c16ab5a1 (diff)
i965: Move brw_land_fwd_jump() to compilation unit of its use.
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu.h3
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_emit.c20
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf_emit.c16
3 files changed, 16 insertions, 23 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h
index 3c89365e3a4..7be0ccecaae 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_eu.h
@@ -337,9 +337,6 @@ struct brw_instruction *brw_BREAK(struct brw_compile *p);
struct brw_instruction *brw_CONT(struct brw_compile *p);
struct brw_instruction *gen6_CONT(struct brw_compile *p);
struct brw_instruction *gen6_HALT(struct brw_compile *p);
-/* Forward jumps:
- */
-void brw_land_fwd_jump(struct brw_compile *p, int jmp_insn_idx);
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index 1810233c143..3bf2de14565 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -1769,26 +1769,6 @@ struct brw_instruction *brw_WHILE(struct brw_compile *p)
return insn;
}
-
-/* FORWARD JUMPS:
- */
-void brw_land_fwd_jump(struct brw_compile *p, int jmp_insn_idx)
-{
- struct brw_context *brw = p->brw;
- struct brw_instruction *jmp_insn = &p->store[jmp_insn_idx];
- unsigned jmpi = 1;
-
- if (brw->gen >= 5)
- jmpi = 2;
-
- assert(jmp_insn->header.opcode == BRW_OPCODE_JMPI);
- assert(jmp_insn->bits1.da1.src1_reg_file == BRW_IMMEDIATE_VALUE);
-
- jmp_insn->bits3.ud = jmpi * (p->nr_insn - jmp_insn_idx - 1);
-}
-
-
-
/* To integrate with the above, it makes sense that the comparison
* instruction should populate the flag register. It might be simpler
* just to use the flag reg for most WM tasks?
diff --git a/src/mesa/drivers/dri/i965/brw_sf_emit.c b/src/mesa/drivers/dri/i965/brw_sf_emit.c
index 866474121cd..2488a019d6b 100644
--- a/src/mesa/drivers/dri/i965/brw_sf_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_sf_emit.c
@@ -719,6 +719,22 @@ void brw_emit_point_setup(struct brw_sf_compile *c, bool allocate)
}
}
+static void
+brw_land_fwd_jump(struct brw_compile *p, int jmp_insn_idx)
+{
+ struct brw_context *brw = p->brw;
+ struct brw_instruction *jmp_insn = &p->store[jmp_insn_idx];
+ unsigned jmpi = 1;
+
+ if (brw->gen >= 5)
+ jmpi = 2;
+
+ assert(jmp_insn->header.opcode == BRW_OPCODE_JMPI);
+ assert(jmp_insn->bits1.da1.src1_reg_file == BRW_IMMEDIATE_VALUE);
+
+ jmp_insn->bits3.ud = jmpi * (p->nr_insn - jmp_insn_idx - 1);
+}
+
void brw_emit_anyprim_setup( struct brw_sf_compile *c )
{
struct brw_compile *p = &c->func;