On Sat, 2020-02-29 at 08:57 -0700, Jeff Law wrote: > > > It could open a can of worms. Off the top of my head, R0 is used to > > hold the function return value, and R0:R1 to return structs with sizeof > > > 4 bytes. So if DImode is allocated to R0, it implicitly uses R0:R1, > > > > AFAIR, doesn't it? Would that kind of thing cause troubles? > > It might. We might have to move a pair or even a quad if you have modes that > cover r0-r3. It may not be feasible in practice. I was just thinking off the > top of my head. >
Yeah, for instance 'double _Complex' will be returned in R0-R3 when compiling for 'without FPU'. How about adding a target hook or look-up table (default 1:1 mapping for other targets)? Would that be an option? Cheers, Oleg