Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KmQOT-0004rZ-IR for qemu-devel@nongnu.org; Sun, 05 Oct 2008 05:59:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KmQOT-0004r3-2M for qemu-devel@nongnu.org; Sun, 05 Oct 2008 05:59:17 -0400 Received: from [199.232.76.173] (port=60962 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KmQOS-0004qr-G7 for qemu-devel@nongnu.org; Sun, 05 Oct 2008 05:59:16 -0400 Received: from savannah.gnu.org ([199.232.41.3]:60290 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KmQOS-00015L-3w for qemu-devel@nongnu.org; Sun, 05 Oct 2008 05:59:16 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KmQOR-00088n-6E for qemu-devel@nongnu.org; Sun, 05 Oct 2008 09:59:15 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KmQOQ-00088i-VF for qemu-devel@nongnu.org; Sun, 05 Oct 2008 09:59:15 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Sun, 05 Oct 2008 09:59:14 +0000 Subject: [Qemu-devel] [5421] Add some missing static and const qualifiers, reg_names only used if NDEBUG set Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5421 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5421 Author: blueswir1 Date: 2008-10-05 09:59:14 +0000 (Sun, 05 Oct 2008) Log Message: ----------- Add some missing static and const qualifiers, reg_names only used if NDEBUG set Modified Paths: -------------- trunk/tcg/arm/tcg-target.c trunk/tcg/hppa/tcg-target.c trunk/tcg/i386/tcg-target.c trunk/tcg/ppc/tcg-target.c trunk/tcg/ppc64/tcg-target.c trunk/tcg/sparc/tcg-target.c trunk/tcg/x86_64/tcg-target.c Modified: trunk/tcg/arm/tcg-target.c =================================================================== --- trunk/tcg/arm/tcg-target.c 2008-10-05 09:57:08 UTC (rev 5420) +++ trunk/tcg/arm/tcg-target.c 2008-10-05 09:59:14 UTC (rev 5421) @@ -21,7 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -const char *tcg_target_reg_names[TCG_TARGET_NB_REGS] = { + +#ifndef NDEBUG +static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = { "%r0", "%r1", "%r2", @@ -38,8 +40,9 @@ "%r13", "%r14", }; +#endif -int tcg_target_reg_alloc_order[] = { +static const int tcg_target_reg_alloc_order[] = { TCG_REG_R0, TCG_REG_R1, TCG_REG_R2, @@ -57,10 +60,10 @@ TCG_REG_R14, }; -const int tcg_target_call_iarg_regs[4] = { +static const int tcg_target_call_iarg_regs[4] = { TCG_REG_R0, TCG_REG_R1, TCG_REG_R2, TCG_REG_R3 }; -const int tcg_target_call_oarg_regs[2] = { +static const int tcg_target_call_oarg_regs[2] = { TCG_REG_R0, TCG_REG_R1 }; @@ -91,7 +94,7 @@ } /* parse target specific constraints */ -int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str) +static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str) { const char *ct_str; Modified: trunk/tcg/hppa/tcg-target.c =================================================================== --- trunk/tcg/hppa/tcg-target.c 2008-10-05 09:57:08 UTC (rev 5420) +++ trunk/tcg/hppa/tcg-target.c 2008-10-05 09:59:14 UTC (rev 5421) @@ -22,6 +22,7 @@ * THE SOFTWARE. */ +#ifndef NDEBUG static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = { "%r0", "%r1", @@ -56,6 +57,7 @@ "%sp", "%r31", }; +#endif static const int tcg_target_reg_alloc_order[] = { TCG_REG_R4, @@ -106,7 +108,7 @@ } /* parse target specific constraints */ -int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str) +static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str) { const char *ct_str; Modified: trunk/tcg/i386/tcg-target.c =================================================================== --- trunk/tcg/i386/tcg-target.c 2008-10-05 09:57:08 UTC (rev 5420) +++ trunk/tcg/i386/tcg-target.c 2008-10-05 09:59:14 UTC (rev 5421) @@ -21,7 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -const char *tcg_target_reg_names[TCG_TARGET_NB_REGS] = { + +#ifndef NDEBUG +static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = { "%eax", "%ecx", "%edx", @@ -31,8 +33,9 @@ "%esi", "%edi", }; +#endif -int tcg_target_reg_alloc_order[] = { +static const int tcg_target_reg_alloc_order[] = { TCG_REG_EAX, TCG_REG_EDX, TCG_REG_ECX, @@ -42,8 +45,8 @@ TCG_REG_EBP, }; -const int tcg_target_call_iarg_regs[3] = { TCG_REG_EAX, TCG_REG_EDX, TCG_REG_ECX }; -const int tcg_target_call_oarg_regs[2] = { TCG_REG_EAX, TCG_REG_EDX }; +static const int tcg_target_call_iarg_regs[3] = { TCG_REG_EAX, TCG_REG_EDX, TCG_REG_ECX }; +static const int tcg_target_call_oarg_regs[2] = { TCG_REG_EAX, TCG_REG_EDX }; static uint8_t *tb_ret_addr; @@ -80,7 +83,7 @@ } /* parse target specific constraints */ -int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str) +static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str) { const char *ct_str; Modified: trunk/tcg/ppc/tcg-target.c =================================================================== --- trunk/tcg/ppc/tcg-target.c 2008-10-05 09:57:08 UTC (rev 5420) +++ trunk/tcg/ppc/tcg-target.c 2008-10-05 09:59:14 UTC (rev 5421) @@ -39,6 +39,7 @@ #define ADDEND_OFFSET 4 #endif +#ifndef NDEBUG static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = { "r0", "r1", @@ -73,6 +74,7 @@ "r30", "r31" }; +#endif static const int tcg_target_reg_alloc_order[] = { TCG_REG_R14, Modified: trunk/tcg/ppc64/tcg-target.c =================================================================== --- trunk/tcg/ppc64/tcg-target.c 2008-10-05 09:57:08 UTC (rev 5420) +++ trunk/tcg/ppc64/tcg-target.c 2008-10-05 09:59:14 UTC (rev 5421) @@ -42,6 +42,7 @@ #define CMP_L (1<<21) #endif +#ifndef NDEBUG static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = { "r0", "r1", @@ -76,6 +77,7 @@ "r30", "r31" }; +#endif static const int tcg_target_reg_alloc_order[] = { TCG_REG_R14, Modified: trunk/tcg/sparc/tcg-target.c =================================================================== --- trunk/tcg/sparc/tcg-target.c 2008-10-05 09:57:08 UTC (rev 5420) +++ trunk/tcg/sparc/tcg-target.c 2008-10-05 09:59:14 UTC (rev 5421) @@ -22,6 +22,7 @@ * THE SOFTWARE. */ +#ifndef NDEBUG static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = { "%g0", "%g1", @@ -56,6 +57,7 @@ "%i6", "%i7", }; +#endif static const int tcg_target_reg_alloc_order[] = { TCG_REG_L0, Modified: trunk/tcg/x86_64/tcg-target.c =================================================================== --- trunk/tcg/x86_64/tcg-target.c 2008-10-05 09:57:08 UTC (rev 5420) +++ trunk/tcg/x86_64/tcg-target.c 2008-10-05 09:59:14 UTC (rev 5421) @@ -21,7 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -const char *tcg_target_reg_names[TCG_TARGET_NB_REGS] = { + +#ifndef NDEBUG +static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = { "%rax", "%rcx", "%rdx", @@ -39,8 +41,9 @@ "%r14", "%r15", }; +#endif -int tcg_target_reg_alloc_order[] = { +static const int tcg_target_reg_alloc_order[] = { TCG_REG_RDI, TCG_REG_RSI, TCG_REG_RDX, @@ -59,7 +62,7 @@ TCG_REG_R15, }; -const int tcg_target_call_iarg_regs[6] = { +static const int tcg_target_call_iarg_regs[6] = { TCG_REG_RDI, TCG_REG_RSI, TCG_REG_RDX, @@ -68,7 +71,7 @@ TCG_REG_R9, }; -const int tcg_target_call_oarg_regs[2] = { +static const int tcg_target_call_oarg_regs[2] = { TCG_REG_RAX, TCG_REG_RDX };