https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102143
--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Uroš Bizjak from comment #3) > gcc has also some problems in this area. With -mregparm=3, one would expect > arguments obeying integer ABI to be passed in registers, but regparm flag > has no effect and the same code is produced: > > foo: > movd 4(%esp), %xmm0 > movd 8(%esp), %xmm1 > paddw %xmm1, %xmm0 > movd %xmm0, %eax > ret (sorry, sent the message too fast) However, with -mno-sse -mregparm=3, regparm does have effect and produces: foo: leal (%eax,%edx), %ecx sarl $16, %eax sarl $16, %edx addl %eax, %edx movzwl %cx, %eax sall $16, %edx orl %edx, %eax ret vs -mno-sse -mregparm=0: foo: movl 4(%esp), %edx movl 8(%esp), %ecx leal (%edx,%ecx), %eax sarl $16, %edx sarl $16, %ecx addl %ecx, %edx movzwl %ax, %eax sall $16, %edx orl %edx, %eax ret