diff options
author | Torbjorn Granlund <tg@gmplib.org> | 2018-01-01 21:30:04 +0100 |
---|---|---|
committer | Torbjorn Granlund <tg@gmplib.org> | 2018-01-01 21:30:04 +0100 |
commit | 25fbc381b55d521ed945ca20e6167ccd42aced4f (patch) | |
tree | 1970907cba59de5b504931997edab7e35a5c0c8b /mpn/powerpc32 | |
parent | b5bc8a77ba9c8e24b3ea0259d31c5ecd64211cf8 (diff) | |
download | gmp-25fbc381b55d521ed945ca20e6167ccd42aced4f.tar.gz |
Define maddld, maddhdu, popcntd, and divdeu.
Diffstat (limited to 'mpn/powerpc32')
-rw-r--r-- | mpn/powerpc32/powerpc-defs.m4 | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mpn/powerpc32/powerpc-defs.m4 b/mpn/powerpc32/powerpc-defs.m4 index 0c142a2e0..f4cce769f 100644 --- a/mpn/powerpc32/powerpc-defs.m4 +++ b/mpn/powerpc32/powerpc-defs.m4 @@ -2,7 +2,7 @@ divert(-1) dnl m4 macros for PowerPC assembler (32 and 64 bit). -dnl Copyright 2000, 2002, 2003 Free Software Foundation, Inc. +dnl Copyright 2000, 2002, 2003, 2017 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. dnl @@ -100,5 +100,19 @@ define(`ASSERT_counter',incr(ASSERT_counter)) define(ASSERT_counter,1) +dnl Manually assemble some new instructions +dnl + +define(`maddld',m4_assert_numargs(4)`dnl +.long eval(0x10000033+m4_lshift($1,21)+m4_lshift($2,16)+m4_lshift($3,11)+m4_lshift($4,6))') + +define(`maddhdu',m4_assert_numargs(4)`dnl +.long eval(0x10000031+m4_lshift($1,21)+m4_lshift($2,16)+m4_lshift($3,11)+m4_lshift($4,6))') + +define(`popcntd',m4_assert_numargs(2)`dnl +.long eval(0x7c0003f4+m4_lshift($2,21)+m4_lshift($1,16))') + +define(`divdeu',m4_assert_numargs(3)`dnl +.long eval(0x7c000312+m4_lshift($1,21)+m4_lshift($2,16)+m4_lshift($3,11))') divert |