]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
A bit more inlining of small fns.
authorJulian Seward <jseward@acm.org>
Thu, 14 Oct 2004 10:42:15 +0000 (10:42 +0000)
committerJulian Seward <jseward@acm.org>
Thu, 14 Oct 2004 10:42:15 +0000 (10:42 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@340

VEX/priv/host-generic/h_generic_regs.c
VEX/priv/host-generic/h_generic_regs.h

index ee103504dee13fb66e23ae6ee6bdc2bbb5819842..abbdfa4a5db085fee0e5da2bf7023f90b1c5e071 100644 (file)
 #include "host-generic/h_generic_regs.h"
 
 
-HReg mkHReg ( UInt regno, HRegClass rc, Bool virtual )
-{
-   UInt r24 = regno & 0x00FFFFFF;
-   /* This is critical.  The register number field may only
-      occupy 24 bits. */
-   if (r24 != regno)
-      vpanic("mkHReg: regno exceeds 2^24");
-   return regno | (((UInt)rc) << 28) | (virtual ? (1<<24) : 0);
-}
-
 void ppHRegClass ( HRegClass hrc )
 {
    switch (hrc) {
@@ -75,12 +65,6 @@ void ppHRegUsage ( HRegUsage* tab )
 }
 
 
-void initHRegUsage ( HRegUsage* tab )
-{
-   tab->n_used = 0;
-}
-
-
 /* Add a register to a usage table.  Combine incoming read uses with
    existing write uses into a modify use, and vice versa.  Do not
    create duplicate entries -- each reg should only be mentioned once.  
index a3e446f0f3f27f9c4e6ad2e23dda927e2f56b06e..b6d7151a81e5060c135dc747d12acbd2cb2e403e 100644 (file)
@@ -63,7 +63,14 @@ extern void ppHRegClass ( HRegClass );
 extern void ppHReg ( HReg );
 
 /* Construct/destruct. */
-extern HReg mkHReg ( UInt regno, HRegClass rc, Bool virtual );
+static inline HReg mkHReg ( UInt regno, HRegClass rc, Bool virtual ) {
+   UInt r24 = regno & 0x00FFFFFF;
+   /* This is critical.  The register number field may only
+      occupy 24 bits. */
+   if (r24 != regno)
+      vpanic("mkHReg: regno exceeds 2^24");
+   return regno | (((UInt)rc) << 28) | (virtual ? (1<<24) : 0);
+}
 
 static inline HRegClass hregClass ( HReg r ) {
    UInt rc = r;
@@ -111,7 +118,9 @@ typedef
 
 extern void ppHRegUsage ( HRegUsage* );
 
-extern void initHRegUsage ( HRegUsage* );
+static inline void initHRegUsage ( HRegUsage* tab ) {
+   tab->n_used = 0;
+}
 
 /* Add a register to a usage table.  Combine incoming read uses with
    existing write uses into a modify use, and vice versa.  Do not