On 7/7/2021 8:55 AM, Segher Boessenkool wrote:
On Mon, Jul 05, 2021 at 06:03:21PM -0600, Jeff Law wrote:
It reminds me a bit of millicode calls on the PA or calls to special
routines in libgcc. They're calls to functions, but those functions do
not follow the standard ABI.
Something with CALL_INSN_FUNCTION_USAGE? And maybe some clobbers?
I don't remember all the details on the PA side and the decision to
express mul, div, mod as regular insns pre-dates my involvement in the
PA port (hard to believe, but true). I'd hazard a guess the goal behind
making them regular insns was to not inhibit leaf function detection,
avoid caller-saves around the "calls" and such. CALL_INSN_FUNCTION_USAGE
didn't exist until the mid 90s. I wouldn't be surprised if we could
migrate the millicode calls to the CALL_INSN_FUNCTION_USAGE model.
jeff