[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130421193531.43965f592f00dfd6e3cfcf45@canb.auug.org.au>
Date: Sun, 21 Apr 2013 19:35:31 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: "Maciej W. Rozycki" <macro@...ux-mips.org>
Cc: "H. Peter Anvin" <hpa@...or.com>,
Linux Arch Mailing List <linux-arch@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Using __int128 on 64-bit architectures
On Sun, 21 Apr 2013 05:29:28 +0100 (BST) "Maciej W. Rozycki" <macro@...ux-mips.org> wrote:
>
> Hmm, nobody has replied, so just FYI such widening multiplication is
> available in all 64-bit MIPS hardware and GCC has supported it since 4.4
> or mid 2008 (older versions used a libgcc __multi3 helper, not quite so
> efficient as you can imagine).
$ powerpc64-linux-gcc --version
powerpc64-linux-gcc (GCC) 4.6.3
...
$ powerpc64-linux-gcc -O2 -c mulditi3.c
$ powerpc64-linux-objdump -d -r mulditi3.o
mulditi3.o: file format elf64-powerpc
Disassembly of section .text:
0000000000000000 <.mulditi3>:
0: 7c 08 02 a6 mflr r0
4: 7c 86 23 78 mr r6,r4
8: 7c c5 fe 76 sradi r5,r6,63
c: f8 01 00 10 std r0,16(r1)
10: 7c 64 1b 78 mr r4,r3
14: f8 21 ff 91 stdu r1,-112(r1)
18: 7c 63 fe 76 sradi r3,r3,63
1c: 48 00 00 01 bl 1c <.mulditi3+0x1c>
1c: R_PPC64_REL24 __multi3
20: 60 00 00 00 nop
24: 38 21 00 70 addi r1,r1,112
28: e8 01 00 10 ld r0,16(r1)
2c: 7c 08 03 a6 mtlr r0
30: 4e 80 00 20 blr
34: 00 00 00 00 .long 0x0
38: 00 00 00 01 .long 0x1
3c: 80 00 00 00 lwz r0,0(0)
$
i.e. for gcc 4.6.3, 64 bit powerpc calls out to __multi3
The same is true for sparc64.
--
Cheers,
Stephen Rothwell sfr@...b.auug.org.au
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists