public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 2/2] Fix minor glitches with basic asm
@ 2015-12-06  8:59 Bernd Edlinger
  2015-12-07  8:32 ` Richard Biener
  0 siblings, 1 reply; 2+ messages in thread
From: Bernd Edlinger @ 2015-12-06  8:59 UTC (permalink / raw)
  To: gcc-patches; +Cc: Richard Biener

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]


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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch-final.diff --]
[-- Type: text/x-patch; name="patch-final.diff", Size: 646 bytes --]

2015-12-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* 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));

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/2] Fix minor glitches with basic asm
  2015-12-06  8:59 [PATCH 2/2] Fix minor glitches with basic asm Bernd Edlinger
@ 2015-12-07  8:32 ` Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2015-12-07  8:32 UTC (permalink / raw)
  To: Bernd Edlinger; +Cc: gcc-patches

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-07  8:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-06  8:59 [PATCH 2/2] Fix minor glitches with basic asm Bernd Edlinger
2015-12-07  8:32 ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).