This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Chris Lattner wrote:
_now_ and follows what master copy of longlong.h does. Also, there is
no simple solution for 128bit "mul" and "div" insns, which are of most
interest here.
What is the issue here?unsigned long long int t(unsigned int a, unsigned int b) { return a * b; }
doesn't compile to "mul" as one would expect (but to "imul"):
gcc -O2 -m32 -fomit-frame-pointer:
t: movl 8(%esp), %eax xorl %edx, %edx imull 4(%esp), %eax ret
unsigned long long int t2(unsigned int a, unsigned int b) { return (unsigned long long)a * b; }
_t2: movl 8(%esp), %eax mull 4(%esp) ret
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |