powerpc.asm
Upload User: qaz666999
Upload Date: 2022-08-06
Package Size: 2570k
Code Size: 1k
Category:

Algorithm

Development Platform:

Unix_Linux

  1. dnl  PowerPC mftb_function -- read time base registers.
  2. dnl  Copyright 2002 Free Software Foundation, Inc.
  3. dnl
  4. dnl  This file is part of the GNU MP Library.
  5. dnl
  6. dnl  The GNU MP Library is free software; you can redistribute it and/or
  7. dnl  modify it under the terms of the GNU Lesser General Public License as
  8. dnl  published by the Free Software Foundationn; either version 3 of the
  9. dnl  License, or (at your option) any later version.
  10. dnl
  11. dnl  The GNU MP Library is distributed in the hope that it will be useful,
  12. dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14. dnl  Lesser General Public License for more details.
  15. dnl
  16. dnl  You should have received a copy of the GNU Lesser General Public License
  17. dnl  along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.
  18. include(`../config.m4')
  19. C void mftb_function (unsigned a[2]);
  20. C
  21. ASM_START()
  22. PROLOGUE(mftb_function)
  23. C r3 a
  24. L(again):
  25. mftbu r4
  26. mftb r5
  27. mftbu r6
  28. cmp cr0, r4, r6
  29. bne L(again)
  30. stw r5, 0(r3)
  31. stw r4, 4(r3)
  32. blr
  33. EPILOGUE()