Re: RS6000 emitting sign extention for unsigned type

2019-01-18 Thread Jakub Jelinek
On Fri, Jan 18, 2019 at 11:03:28PM +1030, Alan Modra wrote: > On Tue, Jan 15, 2019 at 04:48:27PM +0530, kamlesh kumar wrote: > > Hi all, > > > > Analysed it further and find out that > > function ' rs6000_promote_function_mode ' (rs6000.c) needs modifcation. > > """ > > static machine_mode > > rs6

Re: RS6000 emitting sign extention for unsigned type

2019-01-18 Thread Alan Modra
On Tue, Jan 15, 2019 at 04:48:27PM +0530, kamlesh kumar wrote: > Hi all, > > Analysed it further and find out that > function ' rs6000_promote_function_mode ' (rs6000.c) needs modifcation. > """ > static machine_mode > rs6000_promote_function_mode (const_tree type ATTRIBUTE_UNUSED, >

Re: RS6000 emitting sign extention for unsigned type

2019-01-15 Thread kamlesh kumar
Hi all, Analysed it further and find out that function ' rs6000_promote_function_mode ' (rs6000.c) needs modifcation. """ static machine_mode rs6000_promote_function_mode (const_tree type ATTRIBUTE_UNUSED, machine_mode mode, int *punsigne

RS6000 emitting sign extention for unsigned type

2019-01-14 Thread kamlesh kumar
Hi devs, consider below testcase: $cat test.c void foo(){ unsigned int x=-1; double d=x; } $./cc1 test.c -msoft-float -m64 $cat test.s .foo: .LFB0: mflr 0 std 0,16(1) stdu 1,-128(1) .LCFI0: li 9,-1 stw 9,112(1) lwa 9,112(1) mr 3,9 bl