Patchwork [i386] : Declare some variables bool

login
register
mail settings
Submitter Uros Bizjak
Date March 4, 2012, 9:34 p.m.
Message ID <CAFULd4YGnitCP51RBq-rcR7UKvaVdjC6n0PuX5+7VZ3hvmgmXw@mail.gmail.com>
Download mbox | patch
Permalink /patch/144537/
State New
Headers show

Comments

Uros Bizjak - March 4, 2012, 9:34 p.m.
Hello!

2012-03-04  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.c (ix86_print_operand) <case '+'>: Declare
	taken and cputaken as bool.

Tested on x86_64-pc-linux-gnu {,-m32}, committed to mainline as obvious.

Uros.

Patch

Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c	(revision 184886)
+++ config/i386/i386.c	(working copy)
@@ -14147,8 +14148,9 @@  ix86_print_operand (FILE *file, rtx x, int code)
 		if (pred_val < REG_BR_PROB_BASE * 45 / 100
 		    || pred_val > REG_BR_PROB_BASE * 55 / 100)
 		  {
-		    int taken = pred_val > REG_BR_PROB_BASE / 2;
-		    int cputaken = final_forward_branch_p (current_output_insn) == 0;
+		    bool taken = pred_val > REG_BR_PROB_BASE / 2;
+		    bool cputaken
+		      = final_forward_branch_p (current_output_insn) == 0;
 
 		    /* Emit hints only in the case default branch prediction
 		       heuristics would fail.  */