[PATCH] D149867: [M68k] Add Clang support for the new M68k_RTD CC

Min-Yih Hsu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 8 14:47:22 PDT 2023


myhsu added a comment.

In D149867#4325040 <https://reviews.llvm.org/D149867#4325040>, @jrtc27 wrote:

> So GCC gives me:
>
>   warning: ‘stdcall’ attribute directive ignored [-Wattributes]
>
> when trying to use `__attribute__((stdcall))` on m68k, which matches the fact it's only mentioned in the manage for the x86 option.

In principal, I wanted to reuse as much existing code path as possible to handle `-mrtd`, primarily because these two calling conventions are basically identical and I didn't want to create too much churn. Reusing both `DCC_StdCall` and `CC_X86StdCall` serves that purpose. Making `__attribute__((stdcall))` available to m68k is just a side effect that I felt harmless.
I'm fine to create a separate `CC_M68kRTDCall` or even `DCC_RTDCall`. What do you think @jrtc27 ?

> Interestingly it seems to ICE during expand when I use -mrtd though...

I guess you're referring to GCC? I'm curious which snippet you used.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149867/new/

https://reviews.llvm.org/D149867



More information about the cfe-commits mailing list