This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

profiling (-pg) breaks regparm() attribute



I found this out while trying to optimize my software with regparm.

First I thought ``oh well maybe it doesnt work like I thought it would''
but then I recalled that Im currently compiling with -pg (gprof
profiling).

Seems like noone thought of what registers would be trashed because of
the added profiling code. Maybe time to think this over again?

Since it might not be possible to work out a simple(tm) sollution to
this problem, a #define like ``__profiling__'' and/or a compiler
warning/error when it encounters ``regparm'' attributes when profiling
is active might be a good quick fix?

I havent had time to try much gcc versions but this blows up in
my face with both egcs-2.91.66 and pgcc-2.95.2 so I assume its in
all gcc versions.

Keep up the good work =)

/proton

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]