Re: Problem reading corefiles on ARM

Paul Koning
2008-08-07T17:29:46Z

>>>>> "Joe" == Joe Buck <Joe.Buck@synopsys.COM> writes:

Joe> ...OK, consider this case:

Joe> int func1(int); void func2(int); bool test(void); void
Joe> func3(int);

Joe> void func(int arg) { int v1 = func1(arg); func2(v1); if (test())
Joe> { func3(v1); } }

Joe> Here if we put v1 in a register, we obviously have to save it
Joe> across the call to test(), unless we know that test() will never
Joe> return true, in which case we don't need to save v1.

Joe> But what about replacing the "if" by

Joe> if (!test()) abort(); func3(v1);

Joe> Now, if I read you right, we'd have so save v1 even if we know
Joe> that test() returns false.

All I meant is "treat abort() like a regular function that returns,
from the point of view of what state is saved. If in this case it
means that normal GCC processing would mean "save v1" that's what it
means. No special handling to save more than the usual -- but no
saving less than the usual either.

paul