aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/loongarch/loongarch.h
diff options
context:
space:
mode:
authorLi Wei <liwei@loongson.cn>2023-11-28 15:56:35 +0800
committerLulu Cheng <chenglulu@loongson.cn>2023-12-02 16:41:36 +0800
commit3266091741bbcca27ed1a315214cb82c8f912009 (patch)
tree462316f330beaef61bec4ffc262a2938449cd44e /gcc/config/loongarch/loongarch.h
parent1461b431da51f80c90c3bea03d587d76e3e50843 (diff)
downloadgcc-3266091741bbcca27ed1a315214cb82c8f912009.zip
gcc-3266091741bbcca27ed1a315214cb82c8f912009.tar.gz
gcc-3266091741bbcca27ed1a315214cb82c8f912009.tar.bz2
LoongArch: Remove duplicate definition of CLZ_DEFINED_VALUE_AT_ZERO.
In the r14-5547 commit, C[LT]Z_DEFINED_VALUE_AT_ZERO were defined at the same time, but in fact, CLZ_DEFINED_VALUE_AT_ZERO has already been defined, so remove the duplicate definition. gcc/ChangeLog: * config/loongarch/loongarch.h (CTZ_DEFINED_VALUE_AT_ZERO): Add description. (CLZ_DEFINED_VALUE_AT_ZERO): Remove duplicate definition.
Diffstat (limited to 'gcc/config/loongarch/loongarch.h')
-rw-r--r--gcc/config/loongarch/loongarch.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/config/loongarch/loongarch.h b/gcc/config/loongarch/loongarch.h
index 115222e..fa8a3f5 100644
--- a/gcc/config/loongarch/loongarch.h
+++ b/gcc/config/loongarch/loongarch.h
@@ -288,10 +288,12 @@ along with GCC; see the file COPYING3. If not see
/* Define if loading short immediate values into registers sign extends. */
#define SHORT_IMMEDIATES_SIGN_EXTEND 1
-/* The clz.{w/d} instructions have the natural values at 0. */
+/* The clz.{w/d}, ctz.{w/d} instructions have the natural values at 0. */
#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
((VALUE) = GET_MODE_UNIT_BITSIZE (MODE), 2)
+#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
+ ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE), 2)
/* Standard register usage. */
@@ -1239,8 +1241,3 @@ struct GTY (()) machine_function
#define TARGET_EXPLICIT_RELOCS \
(la_opt_explicit_relocs == EXPLICIT_RELOCS_ALWAYS)
-
-#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
- ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE), 2)
-#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
- ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE), 2)