public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* arm-none-eabi, nested function trampolines and caching
@ 2023-11-27 15:16 Ed Robbins
  2023-11-27 17:23 ` David Brown
       [not found] ` <8342aeef-4eef-231b-bf45-416660954fdb@marco.de>
  0 siblings, 2 replies; 11+ messages in thread
From: Ed Robbins @ 2023-11-27 15:16 UTC (permalink / raw)
  To: gcc-help

[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]

Hello,
I am using gcc-arm-none-eabi with a cortex M7 device, with caches
(data/instruction) enabled. Nested function calls result in a usage fault
because there is no clear cache call for this platform.

Is there a way to provide the required functions without rebuilding gcc? I
have been looking at the source and, as far as I can tell, there is not.

But there also doesn't look to be a clean way to implement this: It appears
that this is done on an operating system basis, and when running bare metal
it is not clear where the code would live.

There are also at least two approaches to solve it, I guess:
1. Somehow indicate on the command line (via target or a dedicated option)
to emit the clear cache call for cortex M, and I guess that the function
itself should do nothing if both caches are disabled.
2. Define hooks or provide a command line option so that developers can
provide an implementation for their platform?

Assuming I were to do this the improper way (and just create a build that
works only for my particular target): Where should I define
CLEAR_INSN_CACHE?

I am not sure if there is already a way to do all this that I am just
unaware of?

Many thanks,
Ed Robbins

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-12-05 18:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-27 15:16 arm-none-eabi, nested function trampolines and caching Ed Robbins
2023-11-27 17:23 ` David Brown
2023-11-27 18:30   ` Richard Earnshaw
2023-11-28  9:18   ` Ed Robbins
     [not found] ` <8342aeef-4eef-231b-bf45-416660954fdb@marco.de>
2023-11-28  9:51   ` Ed Robbins
2023-11-28 18:00     ` David Brown
2023-11-29  7:50       ` Matthias Pfaller
2023-11-29 11:52         ` David Brown
2023-11-29 12:33           ` Matthias Pfaller
2023-12-05 17:10       ` Ed Robbins
2023-12-05 18:40         ` Ed Robbins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).