diff options
author | Jozef Lawrynowicz <jozef.l@mittosystems.com> | 2020-11-15 21:03:06 +0000 |
---|---|---|
committer | Jozef Lawrynowicz <jozef.l@mittosystems.com> | 2020-11-15 21:04:56 +0000 |
commit | c746fc40f4ec8cfc1092efd49d567751858d2099 (patch) | |
tree | 319c1393b92367f6012c6175775c909a17a7f25b /gcc | |
parent | 814949ddceaef59725c84fe8ef7c6c617fb5d049 (diff) | |
download | gcc-c746fc40f4ec8cfc1092efd49d567751858d2099.zip gcc-c746fc40f4ec8cfc1092efd49d567751858d2099.tar.gz gcc-c746fc40f4ec8cfc1092efd49d567751858d2099.tar.bz2 |
MSP430: Fix inconsistent naming of hwmult libfuncs
The naming scheme used by GCC to reference MSP430 hardware multiply
library functions is inconsistent.
Sometimes the "GCC" names (e.g. mulsi2) are used, other times the
"MSPABI" names (e.g. __mspabi_mpyl) are used.
Also, sometimes an identifier for the hardware multiply support is
appended to the GCC name, when the functions are defined, but this is
not required.
This patch fixes those issues, so the names used to refer to the
hardware multiply library functions follow a consistent pattern.
gcc/ChangeLog:
* config/msp430/msp430.c (msp430_output_labelref): Don't process mspabi
hwmult library function names into GCC-style names.
libgcc/ChangeLog:
* config/msp430/lib2hw_mul.S: Omit _hw* suffix from GCC names for
hwmult library functions.
gcc/testsuite/ChangeLog:
* gcc.target/msp430/rtx-cost-Os-f5series.c: Adjust test to use new
hwmult library function name.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/msp430/msp430.c | 22 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/msp430/rtx-cost-Os-f5series.c | 2 |
2 files changed, 1 insertions, 23 deletions
diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c index 38a9938..51f49ed 100644 --- a/gcc/config/msp430/msp430.c +++ b/gcc/config/msp430/msp430.c @@ -4031,28 +4031,6 @@ msp430_output_labelref (FILE *file, const char *name) break; } - /* If we have been given a specific MCU name then we may be - able to make use of its hardware multiply capabilities. */ - if (msp430_has_hwmult ()) - { - if (strcmp ("__mspabi_mpyi", name) == 0) - { - if (msp430_use_f5_series_hwmult ()) - name = "__mulhi2_f5"; - else - name = "__mulhi2"; - } - else if (strcmp ("__mspabi_mpyl", name) == 0) - { - if (msp430_use_f5_series_hwmult ()) - name = "__mulsi2_f5"; - else if (msp430_use_32bit_hwmult ()) - name = "__mulsi2_hw32"; - else - name = "__mulsi2"; - } - } - if (user_label_prefix[0] != 0) fputs (user_label_prefix, file); diff --git a/gcc/testsuite/gcc.target/msp430/rtx-cost-Os-f5series.c b/gcc/testsuite/gcc.target/msp430/rtx-cost-Os-f5series.c index bb37f90..67d9198 100644 --- a/gcc/testsuite/gcc.target/msp430/rtx-cost-Os-f5series.c +++ b/gcc/testsuite/gcc.target/msp430/rtx-cost-Os-f5series.c @@ -24,7 +24,7 @@ unsigned long res3; ** MOV.B #100, R14 ** MOV.B #0, R15 ** ... -** CALL.* #__mulsi2_f5 +** CALL.* #__mspabi_mpyl_f5hw ** ... */ void foo (void) |