Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Testing latest pari + WASM + node.js... and it works?! Wow.

28494 views
License: GPL3
ubuntu2004
1
/* Copyright (C) 2000 The PARI group.
2
3
This file is part of the PARI/GP package.
4
5
PARI/GP is free software; you can redistribute it and/or modify it under the
6
terms of the GNU General Public License as published by the Free Software
7
Foundation; either version 2 of the License, or (at your option) any later
8
version. It is distributed in the hope that it will be useful, but WITHOUT
9
ANY WARRANTY WHATSOEVER.
10
11
Check the License for details. You should have received a copy of it, along
12
with the package; see the file 'COPYING'. If not, write to the Free Software
13
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
14
/*
15
ASM divll
16
*/
17
#ifdef ASMINLINE
18
#define divll(a,b) \
19
__extension__ ({ ulong __value, __arg1 = (a), __arg2 = (b), __tmp; \
20
__asm__( "mov %1, %%y; nop;nop;nop;\n\t\
21
udivcc %3,%4,%0;\n\tumul %0,%4,%2;\n\tsub %3,%2,%1"\
22
: "=&r" (__value), "=&r" (hiremainder), "=&r" (__tmp) \
23
: "r" (__arg1), "r" (__arg2), "1" (hiremainder) \
24
: "cc"); \
25
__value;})
26
#endif
27
28