]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add support for Loongson EXT2 instructions.
authorpaulhua <paulhua@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Nov 2018 08:42:59 +0000 (08:42 +0000)
committerpaulhua <paulhua@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Nov 2018 08:42:59 +0000 (08:42 +0000)
commit14ae3f09b9bd17c4f6c83ddc7f4b3797babeb3b2
tree3f722255f7e301897a38a5bbf0aa031b62f652fc
parent9ae8553d4ec8da9539372418b61c2440001e7cae
Add support for Loongson EXT2 instructions.

gcc/
* config/mips/mips-protos.h
(mips_loongson_ext2_prefetch_cookie): New prototype.
* config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
(mips_option_override): Enable TARGET_LOONGSON_EXT when
TARGET_LOONGSON_EXT2 is true.
* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
__mips_loongson_ext2, __mips_loongson_ext_rev=2.
(ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
(ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
TARGET_LOONGSON_EXT2.
(ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
(define_insn "ctz<mode>2"): New insn pattern.
(define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
(define_insn "prefetch_indexed_<mode>"): Include
TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
* config/mips/mips.opt (-mloongson-ext2): Add option.
* gcc/doc/invoke.texi (-mloongson-ext2): Document.

gcc/testsuite/
* gcc.target/mips/loongson-ctz.c: New test.
* gcc.target/mips/loongson-dctz.c: Likewise.
* gcc.target/mips/mips.exp (mips_option_groups): Add
-mloongson-ext2 option.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@265864 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/mips/mips-protos.h
gcc/config/mips/mips.c
gcc/config/mips/mips.h
gcc/config/mips/mips.md
gcc/config/mips/mips.opt
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/mips/loongson-ctz.c [new file with mode: 0644]
gcc/testsuite/gcc.target/mips/loongson-dctz.c [new file with mode: 0644]
gcc/testsuite/gcc.target/mips/mips.exp