PING: Discussion about the medium code model in aarch64

bule bule1@huawei.com
Fri Jun 12 07:51:29 GMT 2020


Hi,

I reported a PR in gcc Bugzilla about the medium code model in aarch64. A solution is proposed and some discussion has been posted.

The details of the discussion can be found here : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95285

Wilco suggest me to make a PIC 48-bit code model by making a new relocation type "high32_47" combined with ADRP instruction,  which I think is feasible and more efficient than my solution. But this kind of relocation hasn't been defined in arm's ABI. Meanwhile he also doubt the necessity of the medium or large-pic code model.

My solution, on the other hand, only use exiting relocation types R_<CLS>_MOVW_PREL_G0-3, which is also how llvm solve similar problems. Although it is less efficient, but currently more easier to implement. For the necessity concern, because I need to optimize CESM in my work, I happened need to use this kind of large-pic code model. The abstracted test case is also provided in the bug report.

I would very much like to know what is your opinion on this issue.

Which solution you think is more appropriate for current situation? 

And regarding the necessity problem, I admit it is not a critical issue. But some application in HPC field do need this code model. 
Personally, I think it doesn't hurt for us to upstream a prototype first for customer to use it. Later if arm have an official document regarding this code model, we can then make a standard model.
What's you opinion regarding this necessity problem?

Thanks a lot.

Regards,
Bu Le (Bruce)




More information about the Gcc-patches mailing list