prc-tools-0.6.0beta users,
I have received a bug report from Jeffery Collins which is indeed a real bug.
The bug is in the SET_A4_FOR_GLIB macro in set_a4.h and causes functions using
this macro to corrupt A4 on return. This is of course a very serious bug and I
have promptly fixed it. The fixed set_a4.h is in /pub/embedded/palmos on
ivan.Harhan.ORG and is also appended at the end of this message.
Thanks Jeffery for reporting!
--
Michael Sokolov Harhan Engineering Laboratory
Public Service Agent International Free Computing Task Force
International Engineering and Science Task Force
615 N GOOD LATIMER EXPY STE #4
DALLAS TX 75204-5852 USA
Phone: +1-214-824-7693 (Harhan Eng Lab office)
E-mail: [EMAIL PROTECTED] (ARPA TCP/SMTP) (UUCP coming soon)
Fixed set_a4.h follows:
#ifndef __SET_A4_H
#define __SET_A4_H
register void *reg_a4 asm("%a4");
#define SET_A4_FROM_A5 \
void *save_a4 = reg_a4; asm("moveal %a5,%a4; subal #edata,%a4");
#define SET_A4_FROM_FTR(id, num) \
void *save_a4 = reg_a4, *my_a4; FtrGet(id, num, (DWord *) &my_a4); \
reg_a4 = my_a4;
#define SET_A4_FOR_GLIB(id) \
void *save_a4 = reg_a4; struct LibRef *my_libref; FtrGet(id, 0, (DWord *) \
&my_libref); reg_a4 = my_libref->globals;
#define RESTORE_A4 reg_a4 = save_a4;
/* return the size of the data segment in a ULong variable */
#define RETURN_DATA_SIZE(datasize) asm("movel #edata,%0" : "=g" (datasize) :)
#endif
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html