How to implement CCIsPointer?

On M68k the return value is passed register d0, unless it is a pointer
then it is returned in register a0 (shadowed in d0 for some targets in
GCC). For calling conventions compatible with Turbo/Pure C the first
two pointes would also go in a0-a1, and the first three integers in
d0-d2 (This is not supported by official GCC as of now).

Simply subclassing CCIf and check ValVT or LocVT like this does not work:
    class CCIfPointer<CCAction A> : CCIf<"LocVT==MVT::iPTR", A> { }

Do I have to extend ISD::ArgFlagsTy with a "IsPtr" flag that is
populated, maybe in SelectionDAGISel::LowerCallTo and
::LowerArguments? Or is there a better and more obvious way?

// Fredrik