[rl78] fix 'p' test
diff mbox

Message ID 201503250500.t2P50RWt009151@greed.delorie.com
State New
Headers show

Commit Message

DJ Delorie March 25, 2015, 5 a.m. UTC
Mis-applied patch, committed.

	* config/rl78/rl78.c (rl78_print_operand_1): Move 'p' test to
	correct clause.

Patch
diff mbox

Index: config/rl78/rl78.c
===================================================================
--- config/rl78/rl78.c	(revision 221648)
+++ config/rl78/rl78.c	(working copy)
@@ -1641,20 +1641,20 @@  rl78_print_operand_1 (FILE * file, rtx o
 		   && GET_CODE (XEXP (XEXP (op, 0), 0)) == REG
 		   && REGNO (XEXP (XEXP (op, 0), 0)) == 2)
 	    {
 	      rl78_print_operand_1 (file, XEXP (XEXP (op, 0), 1), 'u');
 	      fprintf (file, "[");
 	      rl78_print_operand_1 (file, XEXP (XEXP (op, 0), 0), 0);
-	      if (letter == 'p' && GET_CODE (XEXP (op, 0)) == REG)
-		fprintf (file, "+0");
 	      fprintf (file, "]");
 	    }
 	  else
 	    {
 	      fprintf (file, "[");
 	      rl78_print_operand_1 (file, XEXP (op, 0), letter);
+	      if (letter == 'p' && GET_CODE (XEXP (op, 0)) == REG)
+		fprintf (file, "+0");
 	      fprintf (file, "]");
 	    }
 	}
       break;
 
     case REG: