Merge branch 'remove-intel-dri1'
[mesa.git] / src / gallium / auxiliary / rtasm / rtasm_ppc.h
index f194d3be1343c01d596da7ab1e31f395d6ba3367..93e5f5187dea9d3bf4bb02fcab9e4ba302a1abcc 100644 (file)
@@ -1,6 +1,7 @@
 /**************************************************************************
  *
  * Copyright (C) 2008 Tungsten Graphics, Inc.   All Rights Reserved.
+ * Copyright (C) 2009 VMware, Inc.  All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -58,15 +59,22 @@ struct ppc_function
    uint32_t reg_used;   /** used/free general-purpose registers bitmask */
    uint32_t fp_used;   /** used/free floating point registers bitmask */
    uint32_t vec_used;   /** used/free vector registers bitmask */
+   int indent;
+   boolean print;
 };
 
 
 
-extern void ppc_init_func(struct ppc_function *p, unsigned max_inst);
+extern void ppc_init_func(struct ppc_function *p);
 extern void ppc_release_func(struct ppc_function *p);
+extern uint ppc_num_instructions(const struct ppc_function *p);
 extern void (*ppc_get_func( struct ppc_function *p ))( void );
 extern void ppc_dump_func(const struct ppc_function *p);
 
+extern void ppc_print_code(struct ppc_function *p, boolean enable);
+extern void ppc_indent(struct ppc_function *p, int spaces);
+extern void ppc_comment(struct ppc_function *p, int rel_indent, const char *s);
+
 extern int ppc_reserve_register(struct ppc_function *p, int reg);
 extern int ppc_allocate_register(struct ppc_function *p);
 extern void ppc_release_register(struct ppc_function *p, int reg);
@@ -97,10 +105,14 @@ ppc_vminfp(struct ppc_function *p, uint vD, uint vA, uint vB);
 extern void
 ppc_vmaxfp(struct ppc_function *p, uint vD, uint vA, uint vB);
 
-/** vector float mult add */
+/** vector float mult add: vD = vA * vB + vC */
 extern void
 ppc_vmaddfp(struct ppc_function *p, uint vD, uint vA, uint vB, uint vC);
 
+/** vector float negative mult subtract: vD = vA - vB * vC */
+extern void
+ppc_vnmsubfp(struct ppc_function *p, uint vD, uint vA, uint vB, uint vC);
+
 /** vector float compare greater than */
 extern void
 ppc_vcmpgtfpx(struct ppc_function *p, uint vD, uint vA, uint vB);
@@ -158,10 +170,6 @@ ppc_lvx(struct ppc_function *p, uint vR, uint vA, uint vB);
 extern void
 ppc_lvewx(struct ppc_function *p, uint vR, uint vA, uint vB);
 
-/** vector load float: vr = splats(imm) */
-extern void
-ppc_vload_float(struct ppc_function *p, uint vr, float imm);
-
 
 
 /**
@@ -191,7 +199,7 @@ ppc_vxor(struct ppc_function *p, uint vD, uint vA, uint vB);
 
 /** Pseudo-instruction: vector move */
 extern void
-ppc_vecmove(struct ppc_function *p, uint vD, uint vA);
+ppc_vmove(struct ppc_function *p, uint vD, uint vA);
 
 /** Set vector register to {0,0,0,0} */
 extern void
@@ -243,6 +251,9 @@ ppc_add(struct ppc_function *p, uint rt, uint ra, uint rb);
 extern void
 ppc_addi(struct ppc_function *p, uint rt, uint ra, int imm);
 
+extern void
+ppc_addis(struct ppc_function *p, uint rt, uint ra, int imm);
+
 extern void
 ppc_and(struct ppc_function *p, uint rt, uint ra, uint rb);
 
@@ -309,6 +320,9 @@ ppc_stfs(struct ppc_function *p, uint frs, uint ra, int offset);
 extern void
 ppc_stfiwx(struct ppc_function *p, uint frs, uint ra, uint rb);
 
+extern void
+ppc_lfs(struct ppc_function *p, uint frt, uint ra, int offset);
+
 
 
 /**