https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88877
Bug ID: 88877 Summary: rs6000 emits signed extension for unsigned int type(__floatunsidf). Product: gcc Version: 8.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: kamleshbhalui at gmail dot com Target Milestone: --- 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 .__floatunsidf nop mr 9,3 std 9,120(1) nop addi 1,1,128 .LCFI1: ld 0,16(1) mtlr 0 blr .long 0 .byte 0,0,0,1,128,0,0,1 Here, you can see that sign extension before calling the __floatunsidf routine. As per my understanding it should emit zero extension here because __floatunsidf has its argument as unsigned int type.