This is an archive of the discontinued LLVM Phabricator instance.

[arm] Add softvfp to supported FPU names.
ClosedPublic

Authored by logan on Dec 15 2013, 9:01 AM.

Details

Summary

In this patch, I am going to add "softvfp" to supported ARM FPU names.

Note: The "softvfp" is a FPU target which will not generate any build
attributes.

Diff Detail

Event Timeline

logan updated this revision to Unknown Object (????).Dec 15 2013, 9:04 AM

Fix the unittest.

Hi Logan,

Shouldn't it set the VFP build attributes to disabled?

According to the "Addenda to the ABI for the ARM architecture", the default value for Tag_FP_arch is not allowed, which means that the generated object should not use VFP instructions. Thus, I think it is OK to omit this build attribute.

BTW, I am not very sure for the situation for Tag_DIV_use. It seems that Tag_DIV_use is not related to softvfp. The latest GNU assembler does not emit this build attribute, but the older version did so. Should I add this attribute for softvfp? Thanks.

Richard can answer that question better than me.

Hello Logan, Renato

Sorry for the late reply, I have been away for holidays.

  • The TAG_FP_arch attribute should be omitted or set to 0 for softvfp, so the patch is correct in that respect. The difference between softfp and hardfp should be in the Tag_ABI_VFP_args attribute. If the other directives for .fpu imply hard floating point, then they should define this attribute with value 1. I don't know if gcc does this already, but it should.
  • Tag_DIV_use is indeed orthogonal to soft/hard float and should not be affected by these directives.

Assuming that this makes llvm compatible with gcc vis Tag_ABI_VFP_args then I see nothing wrong.

logan accepted this revision.Jan 2 2014, 7:52 AM
logan closed this revision.Jan 2 2014, 7:55 AM

Thanks for your review. Committed as 198313.