Bug 391311

Summary: [Patch] Fix arm64 valgrind tests compilation with clang
Product: [Developer tools] valgrind Reporter: Vasily Tarasov <vtarasov>
Component: generalAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: 3.13.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Fix arm64 valgrind tests compilation with clang

Description Vasily Tarasov 2018-03-02 18:49:51 UTC
Created attachment 111149 [details]
Fix arm64 valgrind tests compilation with clang

Android Open Source Project compiles Valgrind using clang, with it's own assember, with semantics different from gcc's.
Switching to external assember with "-no-integrated-as" is not an option, as it doesn't propagate arch feature expansions properly.

The attached patch makes arm64 Valgrind tests compilation clang-friendly:
- per https://developer.arm.com/docs/100069/0607/a64-floating-point-instructions/fcmp
  fcmp accept a floating point zero, replacing #0 with #0.0
- per http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0802b/MOVI_advsimd_vector.html
  movi's 8-bit immediate is not allowed to be shifted, removing LSL #0.
- ifdef-ing crypto assembly with __ARM_FEATURE_CRYPTO. Tests will be included in kryo, and excluded for generic arm64 builds.
- per http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0802b/ADD_addsub_ext.html
  add extended register's 64-bit version, extend is required to be uxtx