i965: Move brw_land_fwd_jump() to compilation unit of its use.
authorMatt Turner <mattst88@gmail.com>
Mon, 19 May 2014 21:02:26 +0000 (14:02 -0700)
committerMatt Turner <mattst88@gmail.com>
Sun, 25 May 2014 06:03:24 +0000 (23:03 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_eu.h
src/mesa/drivers/dri/i965/brw_eu_emit.c
src/mesa/drivers/dri/i965/brw_sf_emit.c

index 3c89365..7be0cce 100644 (file)
@@ -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);
 
 
 
index 1810233..3bf2de1 100644 (file)
@@ -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?
index 8664741..2488a01 100644 (file)
@@ -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;