avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] GCC 3.0 thread


From: J Wunsch
Subject: Re: [avr-gcc-list] GCC 3.0 thread
Date: Thu Jan 18 01:21:04 2001

Denis Chertykov <address@hidden> wrote:

> Current avr-as understands `__tmp_reg__ = 0' and
> (for example) `mov __tmp_reg__, r29'.

Ah, ok.  I guess this also solves the problem that the old avr-gcc
produced invalid code for something like:

int r24;

void main(void) { r24 = 13; }

% avr-gcc -mmcu=at90s2313 -c foo.c
foo.c: In function `main':
foo.c:4: warning: return type of `main' is not `int'
/var/tmp/ccr59056.s: Assembler messages:
/var/tmp/ccr59056.s:32: Error: Ignoring attempt to re-define symbol

(r24 is being used directly as the assembler name for the variable in
the .data section, but is a reserved word for the assembler.)

>> (Actually, there was a bug in my report, regarding the number of
>> parameters to REGISTER_MOVE_COST() ...

> Show me a code examples and GCC version.

gcc-core-20010101.tar.gz:

gcc-20010101/gcc/config/avr/avr.h (and all the other MD files)
contains:

#define REGISTER_MOVE_COST(MODE, FROM, TO) ((FROM) == STACK_REG ? 6 \
                                            : (TO) == STACK_REG ? 12 \
                                            : 2)

gcc-20010101/gcc/regclass.c (and other files) use:

  for (i = 0; i < N_REG_CLASSES; i++)
    for (j = 0; j < N_REG_CLASSES; j++)
      {
        int cost = i == j ? 2 : REGISTER_MOVE_COST (i, j);
                                                    ^^^^ only 2 params

That's been the last version i tried...

-- 
J"org Wunsch                                           Unix support engineer
address@hidden         http://www.interface-systems.de/~j



reply via email to

[Prev in Thread] Current Thread [Next in Thread]