On Sat, Mar 03, 2012 at 03:17:32AM +0000, Takeshi Nakayama wrote: > Module Name: src > Committed By: nakayama > Date: Sat Mar 3 03:17:32 UTC 2012 > > Modified Files: > src/sys/arch/sparc64/sparc64: locore.s > > Log Message: > Fix the root cause of the hack "disable optimizations for uvm_bio.c > on 32 bit kernels". > > gcc converts a division in the calculation of UBC_UMAP_ADDR macro > to multiplication (smul or combination of add/sll), and the > register of its result contains a garbage in upper 32 bits (the > upper 32 bits of smul/add/sll's result isn't zero cleared). > > Then it passes to pseg_get{,_real} through pmap_extract without the > zero clear of upper 32 bits in the optimization case. So the > result of pseg_get and pmap_extact sometimes gets screwed up.
Is that a gcc bug? Or are the high register bits usually undefined for 32bit values, and this to do with using 64bit asm in a 32bit kernel? David -- David Laight: da...@l8s.co.uk