r1 is not backed up when calling to naked function
Bug #1809607 reported by
Alexander Zilberkant
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
According to AAPCS r1 register is a caller-save and can be used as a scratch register by called function.
Thus toolchain should generate registers backing up code in caller function , before branching to callee.
The problem is emphasized in PR https:/
In our case, callee is a naked function (call_mem) which modifies r1 register. There are no instructions generated to backup up r1 register in test_memory() before branching to naked function.
Thus i assume it is a bug in a tool chain.
Changed in gcc-arm-embedded: | |
status: | Invalid → Fix Released |
To post a comment you must log in.
Ich bin bis 07.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 7th 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:
According to AAPCS r1 register is a caller-save and can be used as a scratch register by called function.
Thus toolchain should generate registers backing up code in caller function , before branching to callee.
The problem is emphasized in PR https:/ /github. com/ARMmbed/ mbed-
os/pull/9128
In our case, callee is a naked function (call_mem) which modifies r1
register. There are no instructions generated to backup up r1 register
in test_memory() before branching to naked function.
Thus i assume it is a bug in a tool chain.
** Affects: gcc-arm-embedded
Importance: Undecided
Status: New
-- /bugs.launchpad .net/bugs/ 1809607
You received this bug notification because you are subscribed to GNU Arm
Embedded Toolchain.
Matching subscriptions: Älles
https:/
Title:
r1 is not backed up when calling to naked function
Status in GNU Arm Embedded Toolchain:
New
Bug description:
According to AAPCS r1 register is a caller-save and can be used as a scratch register by called function.
Thus toolchain should generate registers backing up code in caller function , before branching to callee.
The problem is emphasized in PR https:/ /github. com/ARMmbed/ mbed-
os/pull/9128
In our case, callee is a naked function (call_mem) which modifies r1
register. There are no instructions generated to backup up r1 register
in test_memory() before branching to naked function.
Thus i assume it is a bug in a tool chain.
To manage notifications about this bug go to: /bugs.launchpad .net/gcc- arm-embedded/ +bug/1809607/ +subscriptions
https:/