This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

target/8052: NEC v850 has bogus default insn length

>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
>Originator:     Miles Bader
>Release:        3.3 20020924 (experimental)
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

The default insn-length in gcc/config/v850/ 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.


Here's a patch:

2002-09-26  Miles Bader  <>

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

Index: gcc/config/v850/
RCS file: /cvsroot/gcc/gcc/gcc/config/v850/,v
retrieving revision 1.20
diff -u -r1.20
--- gcc/config/v850/	15 Sep 2002 18:24:07 -0000	1.20
+++ gcc/config/v850/	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")


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]