Re: Warning on migrating to ATMega8515 - eeprom problem
From: jetmarc (jetmarc_at_hotmail.com)
Date: 11/03/04
- Next message: Mike V.: "Remote Monitoring of embedded devices"
- Previous message: Calin Dorohoi: "Re: I need some consultancy from someone with ATAPI design expertise"
- In reply to: Ulf Samuelsson: "Re: Warning on migrating to ATMega8515 - eeprom problem"
- Next in thread: Mike Harrison: "Re: Warning on migrating to ATMega8515 - eeprom problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 3 Nov 2004 04:31:53 -0800
> r10 is normally not used anyway by the IAR compiler.
Caution! Unless you specifically instruct the compiler to not use r10,
it DOES use it. An r10 is a must-preserve register, so even when you
dont inline assembler but call externally linked assembler code, you
must not scratch r10.
The compiler can be configured to not touch registers r15 and below. To
keep clear r10, you effectively have to forbid usage of r10-r15. Note
that you also have to recompile the runtime library (clib/dlib), because
the precompiled versions that come with the installation binary are
compiled for full register usage.
Reserving R10-R15 wont result in lots of speed reduction. Much code
compiles well without actually needing r10. Thats probably why you
concluded that r10 is not used. However, if you compile complex code
that can take advantage of many registers, r10 will be used. Try for
example a cryptographic algorithm or other large function with lots
of autovars and only few function calls. Set optimization to 9 and
see yourself.
Marc
- Next message: Mike V.: "Remote Monitoring of embedded devices"
- Previous message: Calin Dorohoi: "Re: I need some consultancy from someone with ATAPI design expertise"
- In reply to: Ulf Samuelsson: "Re: Warning on migrating to ATMega8515 - eeprom problem"
- Next in thread: Mike Harrison: "Re: Warning on migrating to ATMega8515 - eeprom problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|