1/* 2 * linux/arch/arm/lib/muldi3.S 3 * 4 * Author: Nicolas Pitre 5 * Created: Oct 19, 2005 6 * Copyright: Monta Vista Software, Inc. 7 * 8 * SPDX-License-Identifier: GPL-2.0 9 */ 10 11#include <linux/linkage.h> 12#include <asm/assembler.h> 13 14#ifdef __ARMEB__ 15#define xh r0 16#define xl r1 17#define yh r2 18#define yl r3 19#else 20#define xl r0 21#define xh r1 22#define yl r2 23#define yh r3 24#endif 25 26ENTRY(__muldi3) 27ENTRY(__aeabi_lmul) 28 29 mul xh, yl, xh 30 mla xh, xl, yh, xh 31 mov ip, xl, lsr #16 32 mov yh, yl, lsr #16 33 bic xl, xl, ip, lsl #16 34 bic yl, yl, yh, lsl #16 35 mla xh, yh, ip, xh 36 mul yh, xl, yh 37 mul xl, yl, xl 38 mul ip, yl, ip 39 adds xl, xl, yh, lsl #16 40 adc xh, xh, yh, lsr #16 41 adds xl, xl, ip, lsl #16 42 adc xh, xh, ip, lsr #16 43 ret lr 44 45ENDPROC(__muldi3) 46ENDPROC(__aeabi_lmul) 47