[Top][All Lists]

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

Re: [avr-gcc-list] Using X and Z register in global variables

From: Ben L. Titzer
Subject: Re: [avr-gcc-list] Using X and Z register in global variables
Date: Tue, 6 Sep 2005 09:36:08 -0700


On Sep 4, 2005, at 1:22 PM, User Tomdean wrote:

When I use a register like this, I ALWAYS use avr-objdump and sed to
check for conflicts!  I spent some time trying to build an analysis
tool, but, for my latest app, 288 lines of code produced 101 lines, 32
of them comments.  All registers were used except r2-r5, r7-r14, r16,
and r18-23.  Easy enough to read.

On uIL-avr, 3543 lines of code it prduced 3295 lines.  All registers
are used except r2-r9.  Difficult to read.

This sounds a lot like the analysis that I implemented in Avrora a few months ago: inter-procedural side-effect analysis. For each procedure in the program, it computes the set of used and modified registers by following all the control flow paths (merging at join points). It is available in 1.6.0 and 1.7.x series.

In Avrora, in addition to the simulator and other tools, there is a pretty decent cleaned-up view of AVR instructions that gives access to all of the operands, sizes, clock cycles, etc. Since you seem to be interested in doing some analysis of AVR code, maybe you will find it useful.



Before we work on artificial intelligence, why don't we do something about natural stupidity?

--Steve Polyak

reply via email to

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