diff options
author | Tony Jiang <jtony@ca.ibm.com> | 2017-06-12 17:58:42 +0000 |
---|---|---|
committer | Tony Jiang <jtony@ca.ibm.com> | 2017-06-12 17:58:42 +0000 |
commit | 30a49d1a3d5bd996eb3d6d7403a86dadde75c57c (patch) | |
tree | 0f07780e4051240c1a6558a822d1256bdeaf1efa /llvm/test/MC/Disassembler | |
parent | 4f01175ef926a40569089fc5f7310c64f508bed6 (diff) | |
download | bcm5719-llvm-30a49d1a3d5bd996eb3d6d7403a86dadde75c57c.tar.gz bcm5719-llvm-30a49d1a3d5bd996eb3d6d7403a86dadde75c57c.zip |
[Power9] Added support for the modsw, moduw, modsd, modud hardware instructions.
Note that if we need the result of both the divide and the modulo then we
compute the modulo based on the result of the divide and not using the new
hardware instruction.
Commit on behalf of STEFAN PINTILIE.
Differential Revision: https://reviews.llvm.org/D33940
llvm-svn: 305210
Diffstat (limited to 'llvm/test/MC/Disassembler')
-rw-r--r-- | llvm/test/MC/Disassembler/PowerPC/ppc64-encoding.txt | 12 | ||||
-rw-r--r-- | llvm/test/MC/Disassembler/PowerPC/ppc64le-encoding.txt | 12 |
2 files changed, 24 insertions, 0 deletions
diff --git a/llvm/test/MC/Disassembler/PowerPC/ppc64-encoding.txt b/llvm/test/MC/Disassembler/PowerPC/ppc64-encoding.txt index a6d079297bc..25ed35fcb1c 100644 --- a/llvm/test/MC/Disassembler/PowerPC/ppc64-encoding.txt +++ b/llvm/test/MC/Disassembler/PowerPC/ppc64-encoding.txt @@ -352,6 +352,18 @@ # CHECK: divweu. 2, 3, 4 0x7c 0x43 0x23 0x17 +# CHECK: modsw 2, 3, 4 +0x7c 0x43 0x26 0x16 + +# CHECK: moduw 2, 3, 4 +0x7c 0x43 0x22 0x16 + +# CHECK: modsd 2, 3, 4 +0x7c 0x43 0x26 0x12 + +# CHECK: modud 2, 3, 4 +0x7c 0x43 0x22 0x12 + # CHECK: mulld 2, 3, 4 0x7c 0x43 0x21 0xd2 diff --git a/llvm/test/MC/Disassembler/PowerPC/ppc64le-encoding.txt b/llvm/test/MC/Disassembler/PowerPC/ppc64le-encoding.txt index 9ddc286d8aa..9dc99401055 100644 --- a/llvm/test/MC/Disassembler/PowerPC/ppc64le-encoding.txt +++ b/llvm/test/MC/Disassembler/PowerPC/ppc64le-encoding.txt @@ -349,6 +349,18 @@ # CHECK: divweu. 2, 3, 4 0x17 0x23 0x43 0x7c +# CHECK: modsw 2, 3, 4 +0x16 0x26 0x43 0x7c + +# CHECK: moduw 2, 3, 4 +0x16 0x22 0x43 0x7c + +# CHECK: modsd 2, 3, 4 +0x12 0x26 0x43 0x7c + +# CHECK: modud 2, 3, 4 +0x12 0x22 0x43 0x7c + # CHECK: mulld 2, 3, 4 0xd2 0x21 0x43 0x7c |