[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] 'clobber list' in ASM (was Simulation / Hex File mism
Re: [avr-gcc-list] 'clobber list' in ASM (was Simulation / Hex File mismatch)
Tue, 24 Jun 2003 07:30:53 -0700 (PDT)
Just another point...
I was able to solve it by using R0 and R1 instead, as
I didn't need a zero register in my code.
But I'd still be interested in knowing about the
clobber list thing.
--- Colin O'Flynn <address@hidden> wrote:
> Hello All,
> I found my problem I think. When the code is
> optimized, the compiler stores a variable in some
> registers... but I later clobber those registers in
> the ASM file.
> So I have a question: how do you have a 'clobber'
> in a ASM function (not inline ASM)? I want to tell
> compiler I'll be messing around with those registers
> so don't use them...
> I can store and retrieve the registers as well, but
> was wondering if I can just tell the compiler I'll
> using them....
> --- Colin O'Flynn <address@hidden> wrote:
> > Hello,
> > I seem to have encountered a problem, possibly a
> > bug.
> > I have this fairly complex program (RTOS), which
> > doesn't work properly in hardware (at90s8515 +
> > stk500)
> > using the -Os setting (works OK with the -O0
> > setting).
> > It does modify some stack and stuff so I'm
> > to
> > accept that optimizations might break stuff, so
> > got to fix it. But thats not the thing, the thing
> > that it works fine on other chips (Mega16 and
> > mega169)
> > in hardware with the -Os setting. OK, so its just
> > issue with that type of avr. But when I load the
> > .cof
> > file generated by running make extcoff or make
> > into AVR Studio 4, it simulates just fine. AVR
> > Studio's simulator is telling me the program works
> > like it should.
> > Luckily however my trusty ICE200, again with AVR
> > Studio 4 and the .cof file, tell me the program
> > doesn't work (which is the actual case).
> > I've moved project directories around and stuff so
> > know i'm getting a fresh cof file, any ideas?
> > -Colin
> > _______________________________________________
> > avr-gcc-list mailing list
> > address@hidden
> > http://www.avr1.org/mailman/listinfo/avr-gcc-list
> avr-gcc-list mailing list