1 dnl AMD64 MULX/ADX simulation support, inline version.
3 dnl Contributed to the GNU project by Torbjörn Granlund.
5 dnl Copyright 2013 Free Software Foundation, Inc.
7 dnl This file is part of the GNU MP Library.
9 dnl The GNU MP Library is free software; you can redistribute it and/or modify
10 dnl it under the terms of either:
12 dnl * the GNU Lesser General Public License as published by the Free
13 dnl Software Foundation; either version 3 of the License, or (at your
14 dnl option) any later version.
18 dnl * the GNU General Public License as published by the Free Software
19 dnl Foundation; either version 2 of the License, or (at your option) any
22 dnl or both in parallel, as here.
24 dnl The GNU MP Library is distributed in the hope that it will be useful, but
25 dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
26 dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
29 dnl You should have received copies of the GNU General Public License and the
30 dnl GNU Lesser General Public License along with the GNU MP Library. If not,
31 dnl see https://www.gnu.org/licenses/.
42 C copy 0(%rsp):11 to 0(%rsp):0
48 C put manipulated flags into eflags, execute a plain adc
51 C copy CF to 0(%rsp):11
53 sbb R32(%rax), R32(%rax)
54 and $`'0x800, R32(%rax)
55 and $`'0xfffffffffffff7ff, %rbx
58 C put manipulated flags into eflags
75 sbb R32(%rax), R32(%rax)
76 and $`'0xfffffffffffffffe, %rbx
90 pushfq C preserve all flags
95 popfq C restore eflags