[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: User Tomdean
Subject: Re: [avr-gcc-list] Using X and Z register in global variables
Date: Sun, 4 Sep 2005 13:22:48 -0700 (PDT)

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.


# 20050805 address@hidden
if [ -f $1 ]; then
    avr-objdump -d $1 > temp_xx_temp
    while [ $x -lt 26 ]; do
        echo "=== `printf "r%d" $x` =========================="
        cat temp_xx_temp | sed -n \
            -e `printf "/r%d,/p" $x` -e `printf "/r%d$/p" $x`
        x=`expr $x + 1`
    echo "=== X =========================="
    cat temp_xx_temp | sed -n -e '/r26/p' -e '/r27/p' -e '/X/p'
    echo "=== Y =========================="
    cat temp_xx_temp | sed -n -e '/r28/p' -e '/r29/p' -e '/Y/p'
    echo "=== Z =========================="
    cat temp_xx_temp | sed -n -e '/r30/p' -e '/r31/p' -e '/Z/p'
    rm temp_xx_temp

reply via email to

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