18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ciThis file is part of GNU CC.
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#include <asm/export.h>
98c2ecf20Sopenharmony_ci	.text
108c2ecf20Sopenharmony_ci	.align 4
118c2ecf20Sopenharmony_ci	.globl __muldi3
128c2ecf20Sopenharmony_ci__muldi3:
138c2ecf20Sopenharmony_ci	save  %sp, -104, %sp
148c2ecf20Sopenharmony_ci	wr  %g0, %i1, %y
158c2ecf20Sopenharmony_ci	sra  %i3, 0x1f, %g2
168c2ecf20Sopenharmony_ci	and  %i1, %g2, %g2
178c2ecf20Sopenharmony_ci	andcc  %g0, 0, %g1
188c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
198c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
208c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
218c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
228c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
238c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
248c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
258c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
268c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
278c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
288c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
298c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
308c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
318c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
328c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
338c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
348c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
358c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
368c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
378c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
388c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
398c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
408c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
418c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
428c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
438c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
448c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
458c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
468c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
478c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
488c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
498c2ecf20Sopenharmony_ci	mulscc  %g1, %i3, %g1
508c2ecf20Sopenharmony_ci	mulscc  %g1, 0, %g1
518c2ecf20Sopenharmony_ci	add  %g1, %g2, %l2
528c2ecf20Sopenharmony_ci	rd  %y, %o1
538c2ecf20Sopenharmony_ci	mov  %o1, %l3
548c2ecf20Sopenharmony_ci	mov  %i1, %o0
558c2ecf20Sopenharmony_ci	mov  %i2, %o1
568c2ecf20Sopenharmony_ci	umul %o0, %o1, %o0
578c2ecf20Sopenharmony_ci	mov  %o0, %l0
588c2ecf20Sopenharmony_ci	mov  %i0, %o0
598c2ecf20Sopenharmony_ci	mov  %i3, %o1
608c2ecf20Sopenharmony_ci	umul %o0, %o1, %o0
618c2ecf20Sopenharmony_ci	add  %l0, %o0, %l0
628c2ecf20Sopenharmony_ci	mov  %l2, %i0
638c2ecf20Sopenharmony_ci	add  %l2, %l0, %i0
648c2ecf20Sopenharmony_ci	ret
658c2ecf20Sopenharmony_ci	restore  %g0, %l3, %o1
668c2ecf20Sopenharmony_ciEXPORT_SYMBOL(__muldi3)
67