aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorYunQiang Su <yunqiang.su@cipunited.com>2021-05-08 05:45:53 -0400
committerYunQiang Su <yunqiang.su@cipunited.com>2022-10-25 16:44:09 +0800
commit4479f1dc79fc4f1b5e0fed209df35f405bc94589 (patch)
treeede450fd98bcdba7902a3d01ca0759c5f5a9a2e1 /gcc/doc
parent7d888535f7ab80e9b08a633bfd774a923b311cde (diff)
downloadgcc-4479f1dc79fc4f1b5e0fed209df35f405bc94589.zip
gcc-4479f1dc79fc4f1b5e0fed209df35f405bc94589.tar.gz
gcc-4479f1dc79fc4f1b5e0fed209df35f405bc94589.tar.bz2
MIPS: Not trigger error for pre-R6 and -mcompact-branches=always
For MIPSr6, we may wish to use compact-branches only. Currently, we have to use `always' option, while it is mark as conflict with pre-R6. cc1: error: unsupported combination: ‘mips32r2’ -mcompact-branches=always Just ignore -mcompact-branches=always for pre-R6. This patch also defines __mips_compact_branches_never __mips_compact_branches_always __mips_compact_branches_optimal predefined macros gcc/ChangeLog: * config/mips/mips.cc (mips_option_override): not trigger error for compact-branches=always for pre-R6. * config/mips/mips.h (TARGET_RTP_PIC): not trigger error for compact-branches=always for pre-R6. (TARGET_CB_NEVER): Likewise. (TARGET_CB_ALWAYS): Likewise. (struct mips_cpu_info): define macros for compact branch policy. * doc/invoke.texi: Document "always" with pre-R6. gcc/testsuite/ChangeLog: * gcc.target/mips/compact-branches-1.c: add isa_rev>=6. * gcc.target/mips/mips.exp: don't add -mipsXXr6 option for -mcompact-branches=always. It is usable for pre-R6 now. * gcc.target/mips/compact-branches-8.c: New test. * gcc.target/mips/compact-branches-9.c: New test.
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index d49c137..64f77e8 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -27091,11 +27091,13 @@ The @option{-mcompact-branches=never} option ensures that compact branch
instructions will never be generated.
The @option{-mcompact-branches=always} option ensures that a compact
-branch instruction will be generated if available. If a compact branch
-instruction is not available, a delay slot form of the branch will be
-used instead.
+branch instruction will be generated if available for MIPS Release 6 onwards.
+If a compact branch instruction is not available (or pre-R6),
+a delay slot form of the branch will be used instead.
-This option is supported from MIPS Release 6 onwards.
+If it is used for MIPS16/microMIPS targets, it will be just ignored now.
+The behaviour for MIPS16/microMIPS may change in future,
+since they do have some compact branch instructions.
The @option{-mcompact-branches=optimal} option will cause a delay slot
branch to be used if one is available in the current ISA and the delay