From: Bernd Schmidt <bernds_cb1@t-online.de>
To: binutils@sources.redhat.com
Subject: gas patch: Check TC_EOL_IN_INSN in input-scrub.c
Date: Thu, 05 Oct 2006 14:33:00 -0000 [thread overview]
Message-ID: <4525179B.5050704@t-online.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 469 bytes --]
The Blackfin port tries to use TC_EOL_IN_INSN to check for multi-line
parallel instructions that have one of the following forms:
R0 = R0 +|- R1 ||
R1.L = [I0] ||
NOP;
or
R0 = R0 +|- R1
|| R1.L = [I0]
|| NOP;
Sometimes this fails because we're not looking at a large enough buffer,
and parts of the insn get cut off. We've fixed this in our local
sources with the following patch - is this ok for mainline? Any
suggestions for a better approach?
Bernd
[-- Attachment #2: scrub.diff --]
[-- Type: text/plain, Size: 1324 bytes --]
* input-scrub.c (input_scrub_next_buffer): Use TC_EOL_IN_INSN
in addition to testing for '\n'.
Index: gas/input-scrub.c
===================================================================
RCS file: /cvsroot/gcc3/binutils/binutils-2.17/gas/input-scrub.c,v
retrieving revision 1.1
retrieving revision 1.3
diff -c -p -r1.1 -r1.3
*** gas/input-scrub.c 28 Jun 2006 15:54:14 -0000 1.1
--- gas/input-scrub.c 31 Jul 2006 13:47:25 -0000 1.3
*************** input_scrub_next_buffer (char **bufp)
*** 342,349 ****
if (limit)
{
register char *p; /* Find last newline. */
!
! for (p = limit - 1; *p != '\n'; --p)
;
++p;
--- 342,350 ----
if (limit)
{
register char *p; /* Find last newline. */
! /* Terminate the buffer to avoid confusing TC_EOL_IN_INSN. */
! *limit = '\0';
! for (p = limit - 1; *p != '\n' || TC_EOL_IN_INSN (p); --p)
;
++p;
*************** input_scrub_next_buffer (char **bufp)
*** 369,375 ****
return NULL;
}
! for (p = limit - 1; *p != '\n'; --p)
;
++p;
}
--- 370,378 ----
return NULL;
}
! /* Terminate the buffer to avoid confusing TC_EOL_IN_INSN. */
! *limit = '\0';
! for (p = limit - 1; *p != '\n' || TC_EOL_IN_INSN (p); --p)
;
++p;
}
next reply other threads:[~2006-10-05 14:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-05 14:33 Bernd Schmidt [this message]
2006-10-13 11:37 ` Nick Clifton
2006-10-16 20:53 ` Bernd Schmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4525179B.5050704@t-online.de \
--to=bernds_cb1@t-online.de \
--cc=binutils@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).