Unnecessary UXTH after LDRH
Bug #1909184 reported by
john
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
New
|
Undecided
|
Unassigned |
Bug Description
When compiling the following code:
int dst;
void func(unsigned short volatile* src)
{
dst = *src;
}
with "gcc -mcpu=cortex-m3 -O2" I get an unnecessary UXTH:
ldrh r3, [r0]
ldr r2, .L3
uxth r3, r3
str r3, [r2]
bx lr
The problem does not manifest itself if I omit "volatile" or replace "cortex-m3" with "cortex-m0".
I tested the latest release 10-2020-q4-major and the previous one.
See here: https:/
Ich bin bis 11.01. nicht im Haus und kann Ihre Nachricht daher leider nicht bearbeiten. In dringenden Fällen wenden Sie sich bitte an <email address hidden> bzw. für technische Fragen an <email address hidden>.
I am out of office until January 11th and won't be able to read your message. In urgent cases, please refer to <email address hidden> or for technical questions to <email address hidden>.
Mit freundlichen Grüßen / Best regards
Steffen Wolfer
--
Dipl.-Inform. Steffen Wolfer
Software Engineer Embedded Systems
WEISS ROBOTICS GmbH & Co. KG Käferle- Str. 8
Karl-Heinrich-
D-71640 Ludwigsburg, Germany
Phone: +49 7141 94702-22 www.weiss- robotics. com
Fax: +49 7141 94702-99
http://
Sitz der Gesellschaft: Ludwigsburg
Registergericht Stuttgart, HRA725006
Pers. haftende Gesellschafterin:
Weiss Robotics Verwaltungs-GmbH, Sitz Ludwigsburg
Registergericht Stuttgart, HRB73310
Geschäftsführer: Dr. Karsten Weiß
Public bug reported:
When compiling the following code:
int dst;
void func(unsigned short volatile* src)
{
dst = *src;
}
with "gcc -mcpu=cortex-m3 -O2" I get an unnecessary UXTH:
ldrh r3, [r0]
ldr r2, .L3
uxth r3, r3
str r3, [r2]
bx lr
The problem does not manifest itself if I omit "volatile" or replace "cortex-m3" with "cortex-m0". /godbolt. org/z/K8Pjq7
I tested the latest release 10-2020-q4-major and the previous one.
See here: https:/
** Affects: gcc-arm-embedded
Importance: Undecided
Status: New
** Description changed:
When compiling the following code:
int dst;
void func(unsigned short volatile* src)
{
- dst = *src;
+ dst = *src;
}
with "gcc -mcpu=cortex-m3 -O2" I get an unnecessary UXTH:
ldrh r3, [r0]
ldr r2, .L3
uxth r3, r3
str r3, [r2]
bx lr
- The problem does not manifest itself if I omit "volatile" or replace "-mcpu" with "cortex-m0". /godbolt. org/z/K8Pjq7
+ The problem does not manifest itself if I omit "volatile" or replace "cortex-m3" with "cortex-m0".
+ I tested the latest release 10-2020-q4-major and the previous one.
See here: https:/
-- /bugs.launchpad .net/bugs/ 1909184
You received this bug notification because you are subscribed to GNU Arm
Embedded Toolchain.
Matching subscriptions: Älles
https:/
Title:
Unnecessary UXTH after LDRH
Status in GNU Arm Embedded Toolchain:
New
Bug description:
When compiling the following code:
int dst;
void func(unsigned short volatile* src)
{
dst = *src;
}
with "gcc -mcpu=cortex-m3 -O2" I get an unnecessary UXTH:
ldrh r3, [r0]
ldr r2, .L3
uxth r3, r3
str r3, [r2]
bx lr
The problem does not manifest itself if I omit "volatile" or replace "cortex-m3" with "cortex-m0". /godbolt. org/z/K8Pjq7
I tested the latest release 10-2020-q4-major and the previous one.
See here: https:/
To manage notifications about this bug go to: /bugs.launchpad .net/gcc- arm-embedded/ +bug/1909184/ +subscriptions
https:/