Commit 81a8845c by Jozef Lawrynowicz Committed by Jozef Lawrynowicz

MSP430: Fix whitespace errors and incorrect indentation in config/msp430/*.{c,h} files

2019-08-15  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

	MSP430: Fix whitespace errors and incorrect indentation in
	config/msp430/*.{c,h} files

	* config/msp430/driver-msp430.c (msp430_select_cpu): Fix indentation.
	(msp430_select_hwmult_lib): Likewise.
	* config/msp430/msp430-devices.c (parse_devices_csv_1): Likewise.
	(msp430_extract_mcu_data): Likewise.
	(struct t_msp430_mcu_data): Likewise.
	* config/msp430/msp430.c (struct machine_function): Remove whitespace
	before left square bracket.
	(msp430_option_override): Fix indentation.
	(msp430_hard_regno_nregs_with_padding): Likewise.
	(msp430_initial_elimination_offset): Likewise.
	(msp430_special_register_convention_p): Remove whitespace before left
	square bracket and after exclamation mark.
	(msp430_evaluate_arg): Likewise.
	(msp430_callee_copies): Fix indentation.
	(msp430_gimplify_va_arg_expr): Likewise.
	(msp430_function_arg_advance): Remove whitespace before left square
	bracket.
	(reg_ok_for_addr): Likewise.
	(msp430_preserve_reg_p): Likewise.
	(msp430_compute_frame_info): Likewise.
	(msp430_asm_output_addr_const_extra): Add space between function name
	and open parenthesis.
	(has_section_name): Fix indentation.
	(msp430_attr): Remove trailing whitespace.
	(msp430_section_attr): Likewise.
	(msp430_data_attr): Likewise.
	(struct msp430_attribute_table): Fix comment and whitespace.
	(msp430_start_function): Remove whitespace before left square bracket.
	Add space between function name and open parenthesis.
	(msp430_select_section): Remove trailing whitespace.
	(msp430_section_type_flags): Remove trailing whitespace.
	(msp430_unique_section): Remove space before closing parenthesis.
	(msp430_output_aligned_decl_common): Change 8 spaces to a tab.
	(msp430_builtins): Remove whitespace before left square bracket.
	(msp430_init_builtins):	Fix indentation.
	(msp430_expand_prologue): Remove whitespace before left square bracket.
	Remove space before closing parenthesis.
	(msp430_expand_epilogue): Remove whitespace before left square bracket.
	(msp430_split_movsi): Remove space before closing parenthesis.
	(helper_function_name_mappings): Fix indentation.
	(msp430_use_f5_series_hwmult): Fix whitespace.
	(use_32bit_hwmult): Likewise.
	(msp430_no_hwmult): Likewise.
	(msp430_output_labelref): Remove whitespace before left square bracket.
	(msp430_print_operand_raw): Likewise.
	(msp430_print_operand_addr): Likewise.
	(msp430_print_operand): Add two spaces after '.' in comment.
	Fix trailing whitespace.
	(msp430x_extendhisi): Fix indentation.
	* config/msp430/msp430.h (TARGET_CPU_CPP_BUILTINS): Change 8 spaces to
	tab.
	(PC_REGNUM): Likewise.
	(STACK_POINTER_REGNUM): Likewise.
	(CC_REGNUM): Likewise.

From-SVN: r274536
parent 8ed1d2fa
2019-08-15 Jozef Lawrynowicz <jozef.l@mittosystems.com>
MSP430: Fix whitespace errors and incorrect indentation in
config/msp430/*.{c,h} files
* config/msp430/driver-msp430.c (msp430_select_cpu): Fix indentation.
(msp430_select_hwmult_lib): Likewise.
* config/msp430/msp430-devices.c (parse_devices_csv_1): Likewise.
(msp430_extract_mcu_data): Likewise.
(struct t_msp430_mcu_data): Likewise.
* config/msp430/msp430.c (struct machine_function): Remove whitespace
before left square bracket.
(msp430_option_override): Fix indentation.
(msp430_hard_regno_nregs_with_padding): Likewise.
(msp430_initial_elimination_offset): Likewise.
(msp430_special_register_convention_p): Remove whitespace before left
square bracket and after exclamation mark.
(msp430_evaluate_arg): Likewise.
(msp430_callee_copies): Fix indentation.
(msp430_gimplify_va_arg_expr): Likewise.
(msp430_function_arg_advance): Remove whitespace before left square
bracket.
(reg_ok_for_addr): Likewise.
(msp430_preserve_reg_p): Likewise.
(msp430_compute_frame_info): Likewise.
(msp430_asm_output_addr_const_extra): Add space between function name
and open parenthesis.
(has_section_name): Fix indentation.
(msp430_attr): Remove trailing whitespace.
(msp430_section_attr): Likewise.
(msp430_data_attr): Likewise.
(struct msp430_attribute_table): Fix comment and whitespace.
(msp430_start_function): Remove whitespace before left square bracket.
Add space between function name and open parenthesis.
(msp430_select_section): Remove trailing whitespace.
(msp430_section_type_flags): Remove trailing whitespace.
(msp430_unique_section): Remove space before closing parenthesis.
(msp430_output_aligned_decl_common): Change 8 spaces to a tab.
(msp430_builtins): Remove whitespace before left square bracket.
(msp430_init_builtins): Fix indentation.
(msp430_expand_prologue): Remove whitespace before left square bracket.
Remove space before closing parenthesis.
(msp430_expand_epilogue): Remove whitespace before left square bracket.
(msp430_split_movsi): Remove space before closing parenthesis.
(helper_function_name_mappings): Fix indentation.
(msp430_use_f5_series_hwmult): Fix whitespace.
(use_32bit_hwmult): Likewise.
(msp430_no_hwmult): Likewise.
(msp430_output_labelref): Remove whitespace before left square bracket.
(msp430_print_operand_raw): Likewise.
(msp430_print_operand_addr): Likewise.
(msp430_print_operand): Add two spaces after '.' in comment.
Fix trailing whitespace.
(msp430x_extendhisi): Fix indentation.
* config/msp430/msp430.h (TARGET_CPU_CPP_BUILTINS): Change 8 spaces to
tab.
(PC_REGNUM): Likewise.
(STACK_POINTER_REGNUM): Likewise.
(CC_REGNUM): Likewise.
2019-08-15 Richard Biener <rguenther@suse.de>
PR target/91454
......
......@@ -47,7 +47,7 @@ msp430_select_cpu (int argc, const char ** argv)
case 1: return "-mcpu=msp430x";
case 2: return "-mcpu=msp430xv2";
default:
gcc_unreachable ();
gcc_unreachable ();
}
}
/* MCU wasn't found, the compiler proper will warn about this. */
......@@ -85,41 +85,41 @@ msp430_select_hwmult_lib (int argc ATTRIBUTE_UNUSED, const char ** argv ATTRIBUT
int i;
switch (argc)
{
case 1:
if (strcasecmp (argv[0], "default"))
error ("unexpected argument to msp430_select_hwmult_lib: %s", argv[0]);
break;
{
case 1:
if (strcasecmp (argv[0], "default"))
error ("unexpected argument to msp430_select_hwmult_lib: %s", argv[0]);
break;
default:
/* We can get three or more arguments passed to this function.
This happens when the same option is repeated on the command line.
For example:
msp430-elf-gcc -mhwmult=none -mhwmult=16bit foo.c
We have to use the last argument as our selector. */
if (strcasecmp (argv[0], "hwmult") == 0)
{
static struct hwmult_options
{
const char * name;
const char * lib;
} hwmult_options [] =
default:
/* We can get three or more arguments passed to this function.
This happens when the same option is repeated on the command line.
For example:
msp430-elf-gcc -mhwmult=none -mhwmult=16bit foo.c
We have to use the last argument as our selector. */
if (strcasecmp (argv[0], "hwmult") == 0)
{
{ "none", "-lmul_none" },
{ "auto", "-lmul_AUTO" }, /* Should not see this one... */
{ "16bit", "-lmul_16" },
{ "32bit", "-lmul_32" },
{ "f5series", "-lmul_f5" }
};
static struct hwmult_options
{
const char * name;
const char * lib;
} hwmult_options[] =
{
{ "none", "-lmul_none" },
{ "auto", "-lmul_AUTO" }, /* Should not see this one... */
{ "16bit", "-lmul_16" },
{ "32bit", "-lmul_32" },
{ "f5series", "-lmul_f5" }
};
for (i = ARRAY_SIZE (hwmult_options); i--;)
if (strcasecmp (argv[argc - 1], hwmult_options[i].name) == 0)
return hwmult_options[i].lib;
}
else if (strcasecmp (argv[0], "mcu") == 0)
{
msp430_extract_mcu_data (argv[argc - 1]);
if (extracted_mcu_data.name != NULL)
}
else if (strcasecmp (argv[0], "mcu") == 0)
{
msp430_extract_mcu_data (argv[argc - 1]);
if (extracted_mcu_data.name != NULL)
{
switch (extracted_mcu_data.hwmpy)
{
......@@ -129,21 +129,21 @@ msp430_select_hwmult_lib (int argc ATTRIBUTE_UNUSED, const char ** argv ATTRIBUT
case 4: return "-lmul_32";
case 8: return "-lmul_f5";
default:
/* We have already checked the hwmpy values for
validity in msp430_extract_mcu_data. */
gcc_unreachable ();
/* We have already checked the hwmpy values for
validity in msp430_extract_mcu_data. */
gcc_unreachable ();
break;
}
}
}
else
error ("unexpected first argument to msp430_select_hwmult_lib: %s", argv[0]);
break;
}
else
error ("unexpected first argument to msp430_select_hwmult_lib: %s", argv[0]);
break;
case 0:
error ("msp430_select_hwmult_lib needs one or more arguments");
break;
}
case 0:
error ("msp430_select_hwmult_lib needs one or more arguments");
break;
}
return "-lmul_none";
}
......@@ -26,10 +26,10 @@
extern bool msp430x;
#endif
#define TARGET_CPU_CPP_BUILTINS() \
do \
{ \
builtin_define ("NO_TRAMPOLINES"); \
#define TARGET_CPU_CPP_BUILTINS() \
do \
{ \
builtin_define ("NO_TRAMPOLINES"); \
builtin_define ("__MSP430__"); \
builtin_define (msp430_mcu_name ()); \
if (msp430x) \
......@@ -41,7 +41,7 @@ extern bool msp430x;
} \
else \
builtin_assert ("cpu=MSP430"); \
} \
} \
while (0)
#undef STARTFILE_SPEC
......@@ -305,9 +305,9 @@ enum reg_class
#define INDEX_REG_CLASS GEN_REGS
#define N_REG_CLASSES (int) LIM_REG_CLASSES
#define PC_REGNUM 0
#define STACK_POINTER_REGNUM 1
#define CC_REGNUM 2
#define PC_REGNUM 0
#define STACK_POINTER_REGNUM 1
#define CC_REGNUM 2
#define FRAME_POINTER_REGNUM 4 /* not usually used, call preserved */
#define ARG_POINTER_REGNUM 16
#define STATIC_CHAIN_REGNUM 5 /* FIXME */
......@@ -439,7 +439,7 @@ typedef struct
do \
{ \
if ((LOG) == 0) \
break; \
break; \
fprintf (STREAM, "\t.balign %d\n", 1 << (LOG)); \
} \
while (0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment