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

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

Re: [avr-gcc-list] Success running the testsuite with avrtest


From: Paulo Marques
Subject: Re: [avr-gcc-list] Success running the testsuite with avrtest
Date: Wed, 16 Jan 2008 14:49:24 +0000
User-agent: Thunderbird 1.5.0.12 (X11/20070509)

address@hidden wrote:
The return from main is specified in dejagnu. gcc documents state to
> use exit and abort

I see.

I did not check if any (execute) testcases return 1. Most abort(),
use exit(0) or return(0). So you may not be far off.

That's good news.

Port = exit code might well be a problem if you have naked function
and -O0. There is no telling what compiler will do. It has no idea that
naked means the prolog is gone. Any temporaries it creates will create
stack slots unless code EXACTLY matches instruction pattern.

I could argue that a compiler that adds local storage for something as simple as "*((volatile unsigned char *) 0x52) = code;" is broken and should in fact FAIL. ;)

Naked is designed for 100% "asm" functions. It seems inappropriate to
use this in this context.

I don't think we really need it either, so I'll just try to remove the naked attribute from my next tests and see how it goes.

Alternatively, we could write both functions with "asm", since they're so simple anyway...

I ran all tests last night and still have a few things to look at
before declaring that mine is working correctly - at least to the
fullest extent that the test harness can support.

So some of my suggestion may not be correct!

Don't worry. Some of mine may not be correct either, but this process really helps to sort out the problems for both of us, so it's all good :)

A quick look showed I had stack underflow again. Unrecognised "asm"
function in abort() - lord know what caused that, but it suggests "asm"
is problematic in some circumstance. And some duplicate definitions of
exit/abort. (perhaps that is a tescase that has its own).

So I got to do some more checking and fixin!

Best of luck to you,

--
Paulo Marques
Software Development Department - Grupo PIE, S.A.
Phone: +351 252 290600, Fax: +351 252 290601
Web: www.grupopie.com

"There cannot be a crisis today; my schedule is already full."




reply via email to

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