https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120559

--- Comment #4 from Lucian Raul Silistru <lucian.silistru at gmail dot com> ---
(In reply to Sam James from comment #3)
> __attribute__((noinline)) void write_to_hw(uint32_t channel, uint32_t * ptr)
> 
> __attribute__((noinline)) void send_buffer(uint32_t channel, void *ptr,
> uint32_t size) {
> 
> and ...

> __attribute__((noinline)) void hw_low_level_write(uint32_t channel, uint32_t
> value)
> 
> uint32_t* vs tx_buffer_entry*

Yes, have to push 32 LSB but it's not required to be a half of
tx_buffer_entry*.  Other send_* push other pointers through other instances of
the same hardware. That must have been the intent of the separation, but
confirmation is long gone, code is half a decade old.

Current workarounds we have are just use a (uint32_t)entry, don't do the silly
pass the address and dereference the pointer.
Or dumb stuff like add - "%p", (void*)&entry - to the printf - which still
forces keeping the save of &entry to stack.

Reply via email to