Testing latest pari + WASM + node.js... and it works?! Wow.
License: GPL3
ubuntu2004
#line 2 "../src/kernel/m68k/asm0.h"1/* Copyright (C) 2006 The PARI group.23This file is part of the PARI/GP package.45PARI/GP is free software; you can redistribute it and/or modify it under the6terms of the GNU General Public License as published by the Free Software7Foundation; either version 2 of the License, or (at your option) any later8version. It is distributed in the hope that it will be useful, but WITHOUT9ANY WARRANTY WHATSOEVER.1011Check the License for details. You should have received a copy of it, along12with the package; see the file 'COPYING'. If not, write to the Free Software13Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */1415/* Written by Bill Allombert and dedicated to thoses who wrote the original16* m68k kernel mp.s */1718/*19ASM addll mulll bfffo divll20*/2122#ifdef ASMINLINE23#define LOCAL_HIREMAINDER register ulong hiremainder24#define LOCAL_OVERFLOW register ulong overflow2526#define addll(a,b) \27__extension__ ({ ulong __value, __arg1 = (a), __arg2 = (b); \28__asm__ ("add.l %2,%0 ; addx.l %1,%1" \29: "=&d" (__value), "=d" (overflow) \30: "rm" (__arg1), "0" (__arg2), "1" (0UL) \31: "cc"); \32__value; \33})3435#define addllx(a,b) \36__extension__ ({ ulong __value, __arg1 = (a), __arg2 = (b), __temp; \37__asm__ ("neg.l %2 ; addx.l %4,%0 ; addx.l %1,%1" \38: "=d" (__value), "=d" (overflow), "=d" (__temp) \39: "0" (__arg1), "d" (__arg2), "2" (overflow), "1" (0UL) \40: "cc"); \41__value; \42})4344#define subll(a,b) \45__extension__ ({ ulong __value, __arg1 = (a), __arg2 = (b); \46__asm__ ("sub.l %3,%0 ; addx.l %1,%1" \47: "=&d" (__value), "=d" (overflow) \48: "0" (__arg1), "rm" (__arg2), "1" (0UL) \49: "cc"); \50__value; \51})5253#define subllx(a,b) \54__extension__ ({ ulong __value, __arg1 = (a), __arg2 = (b), __temp; \55__asm__ ("neg.l %2 ; subx.l %4,%0 ; addx.l %1,%1" \56: "=d" (__value), "=d" (overflow), "=d" (__temp) \57: "0" (__arg1), "d" (__arg2), "2" (overflow), "1" (0UL) \58: "cc"); \59__value; \60})6162#define mulll(a, b) \63__extension__ ({ \64ulong __arg1 = (a), __arg2 = (b), __value; \65__asm__ ("mulu.l %2, %0:%1" \66: "=d" (hiremainder), "=d" (__value) \67: "md" (__arg1) , "1" (__arg2) \68: "cc"); \69__value; \70})7172#define addmul(a, b) \73__extension__ ({ \74ulong __arg1 = (a), __arg2 = (b), __value; \75__asm__ ("mulu.l %2, %0:%1; add.l %4,%1; addx.l %5,%0" \76: "=&d" (hiremainder), "=&d" (__value) \77: "md" (__arg1), "1" (__arg2), "d" (hiremainder), "d" (0UL) \78: "cc" ); \79__value; \80})8182#define bfffo(a) \83__extension__ ({ \84ulong __arg1 = (a), __value; \85__asm__ ("bfffo %1{#0:#0}, %0" \86: "=d" (__value) \87: "md" (__arg1) \88: "cc" ); \89__value; \90})9192#define divll(a, b) \93__extension__ ({ \94ulong __arg2 = (b), __value =(a); \95__asm__ ("divu.l %2, %0:%1" \96: "+d" (hiremainder), "+d" (__value) \97: "md" (__arg2) \98: "cc"); \99__value; \100})101#endif102103104