On Mon, 2023-08-07 at 12:01 +0800, chenxiaolong wrote:
> +/* Count the number of functions with "q" as the suffix */
> +static int MATHQ_NUMS=(int)LARCH_MAX_FTYPE_MAX-(int)LARCH_BUILTIN_HUGE_VALQ;
This is obviously not the GCC coding standard... It should have some
white spaces:
static int MATHQ_NUMS = (int)LARCH_MAX_FTYPE_MAX - (int)LARCH_BUILTIN_HUGE_VALQ;
And I guess this variable should be declared const.
> +/* Define an float to do funciton huge_valq*/
> +#define FLOAT_BUILTIN_HUGE(INSN, FUNCTION_TYPE) \
> + { CODE_FOR_ ## INSN, \
> + "__builtin_" #INSN, LARCH_BUILTIN_HUGE_DIRECT, \
> + FUNCTION_TYPE, loongarch_builtin_avail_default }
/* snip */
> +/* Define an float to do funciton nansq*/
> +#define FLOAT_BUILTIN_NANSQ(INSN, FUNCTION_TYPE) \
> + { CODE_FOR_ ## INSN, \
> + "__builtin_" #INSN, LARCH_BUILTIN_NANSQ_DIRECT, \
> + FUNCTION_TYPE, loongarch_builtin_avail_default }
What's the point to define these macros each is only used once?
> + tree type,ftype;
> + tree const_string_type
> +
> =build_pointer_type(build_qualified_type(char_type_node,TYPE_QUAL_CONST));
Really bad format. In GNU coding standard you should have a white space
after '=', and before '(', etc. Please fix the formatting everywhere.
--
Xi Ruoyao <[email protected]>
School of Aerospace Science and Technology, Xidian University