On Nov 30, 2011, at 6:28 AM, Iain Sandoe wrote: > While trying to track down the vector unwind problems on ppc-darwin, I made > some tidy-ups for "save_world()". > In the end, that was not where the main problem, lay - but I did find a few > things wrong there on the way - they should be fixed, even if there's no > specific bug filed at present. > > I'm also attaching a second patch which is purely cosmetic > white-space/comment tidies I'd also like to apply. > > checked on powerpc-darwin{8-G4,9-G5} and crosses to powerpc-eabisim and > powerpc-ibm-aix6.1.3.0
> - /* On Darwin, the unwind routines are compiled without > - TARGET_ALTIVEC, and use save_world to save/restore the > - altivec registers when necessary. */ > + /* When generating code for earlier versions of Darwin, which might run on > + hardware with or without Altivec, we use out-of-line save/restores in > + function prologues/epilogues that require it. These routines determine > + whether to save/restore Altivec at runtime. */ So, we need to first settle on how the library is compiled before this becomes true... > +save_world: > + trap > + > + .private_extern eh_rest_world_r10 > +eh_rest_world_r10: > + trap So, I can't see the necessity of doing this. I think it is bad style to generate code that will die at runtime. I'd rather have it not link. > - /* We should really use VRSAVE to figure out which vector regs > + /* ??? We should really use VRSAVE to figure out which vector regs > we actually need to save and restore. Some other time :-/ */ Why add ???? Could you elaborate. I see two possibilities, you think it impossible, and thus the comment should be changes to say, we need to save all the register because..., or you don't understand what is meant by the comment... Patch 2 is fine without this change.