diff options
author | J"orn Rennecke <amylaar@cygnus.co.uk> | 1999-04-27 12:23:20 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 1999-04-27 13:23:20 +0100 |
commit | ea3cbda50176e5229b8adc2899a2b8bb05d52360 (patch) | |
tree | 00b7b76b2a03c741cb1bf3f9cf3632c615db6b65 /gcc/final.c | |
parent | f915e937d9428193c15fb01d0d337d8eaeaecf1a (diff) | |
download | gcc-ea3cbda50176e5229b8adc2899a2b8bb05d52360.zip gcc-ea3cbda50176e5229b8adc2899a2b8bb05d52360.tar.gz gcc-ea3cbda50176e5229b8adc2899a2b8bb05d52360.tar.bz2 |
sh.md (insv): Use copy_addr_to_reg.
* sh.md (insv): Use copy_addr_to_reg.
* final.c (insn_lengths_max_uid) New variable.
(init_insn_lengths, shorten_branches): Set it.
(get_attr_lengths): Test insn uid against insn_lengths_max_uid.
From-SVN: r26676
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/final.c b/gcc/final.c index bacc093..4695590 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -627,6 +627,9 @@ dbr_sequence_length () static short *insn_lengths; int *insn_addresses; +/* Max uid for which the above arrays are valid. */ +static int insn_lengths_max_uid; + /* Address of insn being processed. Used by `insn_current_length'. */ int insn_current_address; @@ -673,6 +676,7 @@ init_insn_lengths () { free (insn_lengths); insn_lengths = 0; + insn_lengths_max_uid = 0; } if (insn_addresses) { @@ -698,7 +702,7 @@ get_attr_length (insn) int i; int length = 0; - if (insn_lengths) + if (insn_lengths_max_uid > INSN_UID (insn)) return insn_lengths[INSN_UID (insn)]; else switch (GET_CODE (insn)) @@ -1128,6 +1132,7 @@ shorten_branches (first) /* Allocate the rest of the arrays. */ insn_lengths = (short *) xmalloc (max_uid * sizeof (short)); insn_addresses = (int *) xmalloc (max_uid * sizeof (int)); + insn_lengths_max_uid = max_uid; /* Syntax errors can lead to labels being outside of the main insn stream. Initialize insn_addresses, so that we get reproducible results. */ bzero ((char *)insn_addresses, max_uid * sizeof *insn_addresses); |