1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/lib
Zarko Todorovski 64bac7eb58 [PowerPC] Allow wa inline asm to also accept floating point arguments
GCC documentation for the `wa` constraint states that:
```
wa

    A VSX register (VSR), vs0…vs63. This is either an FPR (vs0…vs31 are f0…f31)
    or a VR (vs32…vs63 are v0…v31).
```
This technically means that we could accept floating point parameters. In fact,
gcc itself does. The following testcase compiles and runs on all PPC platforms with GCC,
whereas clang/llc will assert:
```
#include <stdio.h>
double foo ( vector double a ) {
  double b, c;
  asm("xvabsdp  %x0, %x2        \n"
             "xxsldwi  %x1, %x0, %x0, 2 \n"
      :  "+wa"    (b),
         "=wa"    (c)
      :  "wa"    (a)
      );
  return b+c;
}
int main(void) {
  vector double a = {-3., -4.};
  double t = foo( a );
  printf("%g\n", t);
}
```
This patch allows clang/llc to build and run this testcase.

Reviewed By: nemanjai, #powerpc

Differential Revision: https://reviews.llvm.org/D103409
2021-06-11 07:19:10 -04:00
..
Analysis [Analysis] Pass RecurrenceDescriptor as const reference. NFCI. 2021-06-11 10:24:14 +01:00
AsmParser Fix some -Wunused-but-set-variable in -DLLVM_ENABLE_ASSERTIONS=off build 2021-06-04 23:34:43 -07:00
BinaryFormat MsgPackReader.cpp - add missing implicit MathExtras.h header dependency. NFCI. 2021-06-05 18:05:40 +01:00
Bitcode [OpaquePtr] Make atomicrmw work with opaque pointers 2021-05-25 20:16:21 -07:00
Bitstream
CodeGen [ValueTypes] Define MVTs for v6i32, v6f32, v7i32, v7f32 2021-06-11 08:58:16 +09:00
DebugInfo [ELF] getRelocatedSection: remove the check for ET_REL object file 2021-06-07 13:17:00 -07:00
Demangle [Demangle][Rust] Parse const backreferences 2021-06-08 10:01:50 +02:00
DWARFLinker
ExecutionEngine [JITLink][MachO] Handle muliple symbols at same offset when splitting C-strings. 2021-06-09 19:16:49 +10:00
Extensions
FileCheck
Frontend [OPENMP]Fix PR50129: omp cancel parallel not working as expected. 2021-06-04 08:24:55 -07:00
Fuzzer
FuzzMutate [FuzzMutate] Fix getWeight of InstDeleterIRStrategy 2021-06-08 11:14:33 -07:00
InterfaceStub
IR [IR] Value: Fix OpCode checks 2021-06-10 16:46:33 -07:00
IRReader
LineEditor
Linker
LTO [LTO] Support new PM in ThinLTOCodeGenerator. 2021-06-09 10:05:14 +01:00
MC [ms] [llvm-ml] Warn on command-line redefinition 2021-06-10 14:20:21 -04:00
MCA [MCA][NFCI] Minor changes to InstrBuilder and Instruction. 2021-05-31 17:05:13 +01:00
Object [XCOFF][llvm-objdump] Dump the debug type in --section-headers option. 2021-06-10 07:08:23 +00:00
ObjectYAML [NFC][XCOFF] Replace structs FileHeader32/SectionHeader32 with constants. 2021-06-10 11:10:45 +00:00
Option
Passes Function Specialization Pass 2021-06-11 09:11:29 +01:00
ProfileData [SampleFDO] New hierarchical discriminator for FS SampleFDO (llvm-profdata part) 2021-06-04 11:22:06 -07:00
Remarks
Support Add Twine support for std::string_view. 2021-06-08 20:19:04 -07:00
TableGen [TableGen] Eliminate dead code in ParseForeachDeclaration [NFC] 2021-06-10 10:34:44 -04:00
Target [PowerPC] Allow wa inline asm to also accept floating point arguments 2021-06-11 07:19:10 -04:00
Testing
TextAPI Reland "[llvm] llvm-tapi-diff" 2021-06-09 21:17:34 -07:00
ToolDrivers
Transforms [VectorCombine] scalarizeLoadExtract(): use computeAlignmentAfterScalarization() helper 2021-06-11 12:47:10 +03:00
WindowsManifest
XRay
CMakeLists.txt