------- Additional Comments From fjahanian at apple dot com 2004-10-25 23:58 ------- I tried the last patch and for the following statement built with -O2 -mcpu=G5 (aaple's mixed mode) I get the following instruction sequence. It looks OK to me. But David's case might be different than what I am looking at:
clock_start=(((double)clock())/((double)(100))); bl L_clock$stub rldicl r3,r3,0,32 lha r0,232(r29) addis r2,r31,ha16(LC40-"L00000000008$pb") std r3,456(r1) lfd f12,lo16(LC40-"L00000000008$pb")(r2) cmpwi cr7,r0,0 nop lfd f13,456(r1) fcfid f0,f13 fdiv f0,f0,f12 fctidz f0,f0 stfd f0,528(r1) nop nop nop ld r19,528(r1) ble cr7,L147 ... ti+=((((double)clock())/((double)(100)))-clock_start); L186: bl L_clock$stub rldicl r3,r3,0,32 rldicl r2,r19,0,32 std r3,464(r1) std r2,472(r1) addis r2,r31,ha16(LC40-"L00000000008$pb") lfd f0,464(r1) lfd f13,472(r1) lwz r0,816(r30) cmpwi cr7,r0,0 fcfid f12,f0 lfd f0,lo16(LC40-"L00000000008$pb")(r2) fcfid f11,f13 addis r2,r31,ha16(LC39-"L00000000008$pb") fdiv f12,f12,f0 lfd f0,lo16(LC39-"L00000000008$pb")(r2) fsub f12,f12,f11 ... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15286