diff options
author | Kevin Ryde <user42@zip.com.au> | 2002-06-03 03:22:50 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2002-06-03 03:22:50 +0200 |
commit | 98a86948864f9dba03176964a4221492a538f2c3 (patch) | |
tree | 599c4195b3b2f6004030e3dd013b02dd21f5695d /tune/powerpc64.asm | |
parent | e1af14c55e9a26e000149a17a288b81b1d615e70 (diff) | |
download | gmp-98a86948864f9dba03176964a4221492a538f2c3.tar.gz |
* tune/powerpc.asm, tune/powerpc64.asm: New files.
Diffstat (limited to 'tune/powerpc64.asm')
-rw-r--r-- | tune/powerpc64.asm | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tune/powerpc64.asm b/tune/powerpc64.asm new file mode 100644 index 000000000..4aea1cd66 --- /dev/null +++ b/tune/powerpc64.asm @@ -0,0 +1,44 @@ +dnl PowerPC mftb_function -- read time base registers, 64-bit integer. + +dnl Copyright 2002 Free Software Foundation, Inc. +dnl +dnl This file is part of the GNU MP Library. +dnl +dnl The GNU MP Library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public License as +dnl published by the Free Software Foundationn; either version 2.1 of the +dnl License, or (at your option) any later version. +dnl +dnl The GNU MP Library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with the GNU MP Library; see the file COPYING.LIB. If +dnl not, write to the Free Software Foundation, Inc., 59 Temple Place - +dnl Suite 330, Boston, MA 02111-1307, USA. + +include(`../config.m4') + + +C void mftb_function (unsigned a[2]); +C + +ASM_START() +PROLOGUE(mftb_function) + + C r3 a + +L(again): + mftbu r4 + mftb r5 + mftbu r6 + cmpd cr0, r4, r6 + bne L(again) + + std r5, 0(r3) + std r4, 8(r3) + blr + +EPILOGUE() |