ashrdi3.S 454 B

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: GPL-2.0-or-later WITH GCC-exception-2.0 */
  2. #include <linux/linkage.h>
  3. #include <asm/asmmacro.h>
  4. #include <asm/core.h>
  5. #ifdef __XTENSA_EB__
  6. #define uh a2
  7. #define ul a3
  8. #else
  9. #define uh a3
  10. #define ul a2
  11. #endif /* __XTENSA_EB__ */
  12. ENTRY(__ashrdi3)
  13. abi_entry_default
  14. ssr a4
  15. bgei a4, 32, .Lhigh_only
  16. src ul, uh, ul
  17. sra uh, uh
  18. abi_ret_default
  19. .Lhigh_only:
  20. sra ul, uh
  21. srai uh, uh, 31
  22. abi_ret_default
  23. ENDPROC(__ashrdi3)