|
From: Philipp K. K. <pk...@sp...> - 2022-02-24 18:33:43
|
Am 24.02.22 um 16:47 schrieb Basil Hussain: > I have just installed the recent Windows x64 4.2.0-rc1 release and tried > updating one of my projects to use '__sdcccall(0)' for existing STM8 > assembly code, and was puzzled to find that it had no effect - some > functions marked with that attribute were still being called with the > new ABI! > > After doing some digging, I discovered that functions where the new > attribute had no effect were functions that were also declared with > '__naked'. > > […} > > You can see that test_1() has its argument pushed to the stack before > being called, as per the old ABI, but test_2() does not - its argument > is incorrectly passed in the A register, as per the new ABI. > > Is this a bug? I don't believe '__naked' should be changing anything > about how a function is *called*, only whether prologue and epilogue > code inside that function is generated. Looks like a bug to me. Please file a bug report. Philipp |