Member function pointer is represented with 2 words: <ptr, adj>
Currently, last significant bit of 'ptr' is used for marking virtual functions.
This can not be used for microMIPS and mips16 because odd addresses are valid for these platforms.
Patch introduces new TargetCXXABI - GenericMips. Only difference compered to GenericItanium (used for MIPS until now) is that it sets UseARMMethodPtrABI to true.
In order to be able to link with code for other MIPS targets and with code generated with gcc this should be used for all MIPS targets.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I'm not particularly knowledgeable about C++ ABI's but I have compared the gcc and clang output and I agree that this change makes the representation the same as gcc's. I tested MIPS32r2 and microMIPS. On that basis, LGTM apart from TargetCXXABI::tryParse() as noted below.
lib/Basic/TargetInfo.cpp | ||
---|---|---|
658 | Shouldn't "arm" be "mips" here? |
Shouldn't "arm" be "mips" here?