00001 00006 /* 00007 * The contents of this file are subject to the Mozilla Public License 00008 * Version 1.0 (the "License"); you may not use this file except in 00009 * compliance with the License. You may obtain a copy of the License at 00010 * http://www.mozilla.org/MPL/ 00011 * 00012 * Software distributed under the License is distributed on an "AS IS" 00013 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 00014 * License for the specific language governing rights and limitations 00015 * under the License. 00016 * 00017 * The Original Code is legOS code, released October 17, 1999. 00018 * 00019 * The Initial Developer of the Original Code is Markus L. Noga. 00020 * Portions created by Markus L. Noga are Copyright (C) 1999 00021 * Markus L. Noga. All Rights Reserved. 00022 * 00023 * Contributor(s): Markus L. Noga <markus@noga.de> 00024 */ 00025 00027 00031 int __mulhi3(int a,int b); 00032 00033 __asm__ ("\n\ 00034 .section .text\n\ 00035 .global ___mulhi3\n\ 00036 ___mulhi3:\n\ 00037 ; param r0,r1\n\ 00038 ; return r0\n\ 00039 ; clobber r2\n\ 00040 \n\ 00041 mov.w r0,r2\n\ 00042 mulxu.b r1h,r2\n\ 00043 mov.b r0h,r2h\n\ 00044 mulxu.b r1l,r0\n\ 00045 add.b r2l,r0h\n\ 00046 mulxu.b r2h,r1\n\ 00047 add.b r1l,r0h\n\ 00048 rts\n\ 00049 ");