Re: [PATCH 2/2] Fix minor glitches with basic asm

2015-12-07 Thread Richard Biener
On Sun, 6 Dec 2015, Bernd Edlinger wrote:

> 
> Hi,
> 
> while looking at the handling of basic asm statements
> I noticed two minor glitches, which I want to fix now.
> 
> Secondly there is a wrong check in shorten_branches in final.c
> 
> Here we check if GET_CODE (body) == ASM_INPUT, that is
> never true, because GET_CODE (body) == SEQUENCE here.
> The right object to check is PATTERN (inner_insn).
> 
> 
> Boot-strapped and reg-tested on x86_64-pc-linux-gnu,
> OK for trunk?

Ok.

Richard.


[PATCH 2/2] Fix minor glitches with basic asm

2015-12-06 Thread Bernd Edlinger

Hi,

while looking at the handling of basic asm statements
I noticed two minor glitches, which I want to fix now.

Secondly there is a wrong check in shorten_branches in final.c

Here we check if GET_CODE (body) == ASM_INPUT, that is
never true, because GET_CODE (body) == SEQUENCE here.
The right object to check is PATTERN (inner_insn).


Boot-strapped and reg-tested on x86_64-pc-linux-gnu,
OK for trunk?


Thanks
Bernd.2015-12-06  Bernd Edlinger  

	* final.c (shorten_branches): Fix check for basic asm.

Index: gcc/final.c
===
--- gcc/final.c	(revision 231320)
+++ gcc/final.c	(working copy)
@@ -1157,7 +1157,7 @@ shorten_branches (rtx_insn *first)
 	  int inner_uid = INSN_UID (inner_insn);
 	  int inner_length;
 
-	  if (GET_CODE (body) == ASM_INPUT
+	  if (GET_CODE (PATTERN (inner_insn)) == ASM_INPUT
 		  || asm_noperands (PATTERN (inner_insn)) >= 0)
 		inner_length = (asm_insn_count (PATTERN (inner_insn))
 * insn_default_length (inner_insn));