[PATCH] D64119: [PowerPC] Support constraint code "ww"

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 3 20:13:38 PDT 2019


MaskRay marked an inline comment as done.
MaskRay added inline comments.


================
Comment at: clang/lib/Basic/Targets/PPC.h:211
+      case 's': // VSX vector register to hold scalar double data
+      case 'w': // VSX vector register to hold scalar double data
       case 'a': // Any VSX register
----------------
jsji wrote:
> Add some more comments for `w` to distinguish it from `s`?
> 
> Do we want to keep compatibility with GCC? 
> According to https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Machine-Constraints.html#Machine-Constraints, 
> `ww` is `FP or VSX register to perform float operations under -mvsx or NO_REGS.`, 
> while `ws` is `VSX vector register to hold scalar double values `. 
> 
> So `ww` can use `FP` while `ws` can NOT ?
I played with "ws" and "ww" but can't find any behavior difference from assembly produced by powerpc64le-linux-gnu-gcc. I'll keep the current form (which is known to make musl fmax/fmaxf build) unless the gcc semantics are clearer.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64119/new/

https://reviews.llvm.org/D64119





More information about the cfe-commits mailing list