public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: target/8052: NEC v850 has bogus default insn length
@ 2002-10-02  7:16 Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2002-10-02  7:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR target/8052; it has been noted by GNATS.

From: Jeff Law <law@porcupine.cygnus.com>
To: miles@gnu.org
Cc: gcc-gnats@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: target/8052: NEC v850 has bogus default insn length 
Date: Wed, 02 Oct 2002 08:21:09 -0600

 In message <20020926022639.D3D6A3721@mcspd15.ucom.lsi.nec.co.jp>, miles@gnu.org
  writes:
  >
  >>Number:         8052
  >>Category:       target
  >>Synopsis:       NEC v850 has bogus default insn length
  >>Confidential:   no
  >>Severity:       non-critical
  >>Priority:       medium
  >>Responsible:    unassigned
  >>State:          open
  >>Class:          pessimizes-code
  >>Submitter-Id:   net
  >>Arrival-Date:   Wed Sep 25 19:36:00 PDT 2002
  >>Closed-Date:
  >>Last-Modified:
  >>Originator:     Miles Bader
  >>Release:        3.3 20020924 (experimental)
  >>Organization:
  >NEC
  >>Environment:
  >System: Linux mcspd15 2.4.18-ac3 #1 Wed Jul 3 14:28:04 JST 2002 i686 unknown 
  >unknown GNU/Linux
  >Architecture: i686
  >
  >	
  >host: i386-pc-linux-gnu
  >build: i386-pc-linux-gnu
  >target: v850e-unknown-elf
  >configured with: /proj/soft2/uclinux/src/gcc/configure --prefix=/proj/soft2/u
  >clinux/i386-pc-linux-gnu --cache-file=../config.cache --target=v850e-elf --ho
  >st=i386-pc-linux-gnu --with-newlib
  >>Description:
  >
  >The default insn-length in gcc/config/v850/v850.md is 200, which is
  >completely absurd, and has the effect of causing many branches around
  >`asm' statements to be long jumps (since gcc uses the default
  >insn-length to estimate the code-size of asm statements).
  >
  >On the v850, many instructions are 2 bytes, and only one is >4 bytes,
  >so I've used a value of `4' instead for over a year, and it works great.
  >
  >>How-To-Repeat:
  >>Fix:
  >
  >Here's a patch:
  >
  >2002-09-26  Miles Bader  <miles@gnu.org>
  >
  >	* config/v850/v850.md ("length"): Change default value to 4.
 Thanks.  Installed.
 
 Note that you have to be a little careful in that if any insns relied
 upon the default length and generated more than 4 bytes of instruction
 then this change would be wrong.
 
 I double-checked the v850 backend and only one insn relies upon the 
 default length -- and it aborts if it's ever used :-)
 
 
 Jeff
 
 
 
 --g8QH74r03859.1033060046/porcupine.slc.redhat.com--
 
 
 --g8QH74s03859.1033060046/porcupine.slc.redhat.com--
 
 


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

* target/8052: NEC v850 has bogus default insn length
@ 2002-09-25 19:36 miles
  0 siblings, 0 replies; 2+ messages in thread
From: miles @ 2002-09-25 19:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         8052
>Category:       target
>Synopsis:       NEC v850 has bogus default insn length
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          pessimizes-code
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 25 19:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Miles Bader
>Release:        3.3 20020924 (experimental)
>Organization:
NEC
>Environment:
System: Linux mcspd15 2.4.18-ac3 #1 Wed Jul 3 14:28:04 JST 2002 i686 unknown unknown GNU/Linux
Architecture: i686

	
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: v850e-unknown-elf
configured with: /proj/soft2/uclinux/src/gcc/configure --prefix=/proj/soft2/uclinux/i386-pc-linux-gnu --cache-file=../config.cache --target=v850e-elf --host=i386-pc-linux-gnu --with-newlib
>Description:

The default insn-length in gcc/config/v850/v850.md is 200, which is
completely absurd, and has the effect of causing many branches around
`asm' statements to be long jumps (since gcc uses the default
insn-length to estimate the code-size of asm statements).

On the v850, many instructions are 2 bytes, and only one is >4 bytes,
so I've used a value of `4' instead for over a year, and it works great.

>How-To-Repeat:
>Fix:

Here's a patch:

2002-09-26  Miles Bader  <miles@gnu.org>

	* config/v850/v850.md ("length"): Change default value to 4.

Index: gcc/config/v850/v850.md
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/v850/v850.md,v
retrieving revision 1.20
diff -u -r1.20 v850.md
--- gcc/config/v850/v850.md	15 Sep 2002 18:24:07 -0000	1.20
+++ gcc/config/v850/v850.md	26 Sep 2002 02:15:22 -0000
@@ -33,7 +33,7 @@
 ;; The size of instructions in bytes.
 
 (define_attr "length" ""
-  (const_int 200))
+  (const_int 4))
 
 (define_attr "long_calls" "yes,no"
   (const (if_then_else (symbol_ref "TARGET_LONG_CALLS")

>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-10-02 14:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-02  7:16 target/8052: NEC v850 has bogus default insn length Jeff Law
  -- strict thread matches above, loose matches on Subject: below --
2002-09-25 19:36 miles

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).