[PATCH] D36555: Move x86-specific sources to x86-specific source lists.

2017-11-30 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine closed this revision.
saugustine added a comment.

Committed as R319464.


https://reviews.llvm.org/D36555



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D36555: Move x86-specific sources to x86-specific source lists.

2017-08-27 Thread Michał Górny via Phabricator via cfe-commits
mgorny resigned from this revision.
mgorny added a comment.
This revision is now accepted and ready to land.

I'm not going to block this but I agree with others that the PPC changes look 
like they belong in a separate commit.


https://reviews.llvm.org/D36555



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D36555: Move x86-specific sources to x86-specific source lists.

2017-08-22 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision.
compnerd added a comment.

Would be nice to split up the PPC fixes into its own commit.


https://reviews.llvm.org/D36555



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D36555: Move x86-specific sources to x86-specific source lists.

2017-08-22 Thread Michał Górny via Phabricator via cfe-commits
mgorny added inline comments.



Comment at: compiler-rt/lib/builtins/CMakeLists.txt:223
+  cpu_model.c
+  divxc3.c
+  fixxfdi.c

saugustine wrote:
> mgorny wrote:
> > This and the following files have only:
> > 
> > ```
> > #if !_ARCH_PPC
> > ```
> > 
> > so I suppose it's currently included on more targets than x86. If it's 
> > really not useful there, I think it'd be better to update the `#if`s first 
> > (and preferably get the author to review).
> As discussed in D36764, these all assume 80-bit floats, and therefore are 
> only useful on x86 (and ancient 68ks)--and, in fact, the tests for these 
> functions are disabled for everything but x86. I have left these #ifs in for 
> now, but will remove them after this patch gets submitted (and add comments 
> about them needing 80-bit floats). Otherwise, powerpc builds will be broken.
Please do not remove the guards. We're using them in other arch-specific files 
as well. Instead, update them to state the correct targets.


https://reviews.llvm.org/D36555



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D36555: Move x86-specific sources to x86-specific source lists.

2017-08-22 Thread Weiming Zhao via Phabricator via cfe-commits
weimingz added inline comments.



Comment at: compiler-rt/lib/builtins/CMakeLists.txt:483
+set(powerpc64le_SOURCES ${powerpc64_SOURCES})
+
 set(wasm32_SOURCES ${GENERIC_SOURCES})

why these files were not used before? should the change be in a separate patch? 
or update the patch title/summary as well?


https://reviews.llvm.org/D36555



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D36555: Move x86-specific sources to x86-specific source lists.

2017-08-22 Thread Weiming Zhao via Phabricator via cfe-commits
weimingz added reviewers: rengolin, compnerd.
weimingz added a comment.

LGTM. Adding Renato and Saleem to approve.


https://reviews.llvm.org/D36555



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D36555: Move x86-specific sources to x86-specific source lists.

2017-08-22 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine updated this revision to Diff 112244.
saugustine added a comment.

Remove two files inadvertantly included in last patch.


https://reviews.llvm.org/D36555

Files:
  compiler-rt/lib/builtins/CMakeLists.txt

Index: compiler-rt/lib/builtins/CMakeLists.txt
===
--- compiler-rt/lib/builtins/CMakeLists.txt
+++ compiler-rt/lib/builtins/CMakeLists.txt
@@ -51,7 +51,6 @@
   cmpti2.c
   comparedf2.c
   comparesf2.c
-  cpu_model.c
   ctzdi2.c
   ctzsi2.c
   ctzti2.c
@@ -66,7 +65,6 @@
   divtc3.c
   divti3.c
   divtf3.c
-  divxc3.c
   extendsfdf2.c
   extendhfsf2.c
   ffsdi2.c
@@ -84,27 +82,18 @@
   fixunssfdi.c
   fixunssfsi.c
   fixunssfti.c
-  fixunsxfdi.c
-  fixunsxfsi.c
-  fixunsxfti.c
-  fixxfdi.c
-  fixxfti.c
   floatdidf.c
   floatdisf.c
-  floatdixf.c
   floatsidf.c
   floatsisf.c
   floattidf.c
   floattisf.c
-  floattixf.c
   floatundidf.c
   floatundisf.c
-  floatundixf.c
   floatunsidf.c
   floatunsisf.c
   floatuntidf.c
   floatuntisf.c
-  floatuntixf.c
   int_util.c
   lshrdi3.c
   lshrti3.c
@@ -124,7 +113,6 @@
   mulvdi3.c
   mulvsi3.c
   mulvti3.c
-  mulxc3.c
   negdf2.c
   negdi2.c
   negsf2.c
@@ -142,7 +130,6 @@
   powidf2.c
   powisf2.c
   powitf2.c
-  powixf2.c
   subdf3.c
   subsf3.c
   subvdi3.c
@@ -226,6 +213,23 @@
 clear_cache.c)
 endif()
 
+# These sources work on all x86 variants, but only x86 variants.
+set(x86_ARCH_SOURCES
+  cpu_model.c
+  divxc3.c
+  fixxfdi.c
+  fixxfti.c
+  fixunsxfdi.c
+  fixunsxfsi.c
+  fixunsxfti.c
+  floatdixf.c
+  floattixf.c
+  floatundixf.c
+  floatuntixf.c
+  mulxc3.c
+  powixf2.c
+)
+
 if (NOT MSVC)
   set(x86_64_SOURCES
   x86_64/chkstk.S
@@ -288,6 +292,11 @@
   set(i686_SOURCES ${i386_SOURCES})
 endif () # if (NOT MSVC)
 
+set(x86_64h_SOURCES ${x86_64h_SOURCES} ${x86_ARCH_SOURCES})
+set(x86_64_SOURCES ${x86_64_SOURCES} ${x86_ARCH_SOURCES})
+set(i386_SOURCES ${i386_SOURCES} ${x86_ARCH_SOURCES})
+set(i686_SOURCES ${i686_SOURCES} ${x86_ARCH_SOURCES})
+
 set(arm_SOURCES
   arm/bswapdi2.S
   arm/bswapsi2.S
@@ -458,6 +467,20 @@
 set(mips64el_SOURCES ${GENERIC_TF_SOURCES}
  ${mips_SOURCES})
 
+set(powerpc64_SOURCES
+  ppc/divtc3.c
+  ppc/fixtfdi.c
+  ppc/fixunstfdi.c
+  ppc/floatditf.c
+  ppc/floatunditf.c
+  ppc/gcc_qadd.c
+  ppc/gcc_qdiv.c
+  ppc/gcc_qmul.c
+  ppc/gcc_qsub.c
+  ppc/multc3.c
+  ${GENERIC_SOURCES})
+set(powerpc64le_SOURCES ${powerpc64_SOURCES})
+
 set(wasm32_SOURCES ${GENERIC_SOURCES})
 set(wasm64_SOURCES ${GENERIC_SOURCES})
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D36555: Move x86-specific sources to x86-specific source lists.

2017-08-22 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine added a reviewer: weimingz.
saugustine added inline comments.



Comment at: compiler-rt/lib/builtins/CMakeLists.txt:223
+  cpu_model.c
+  divxc3.c
+  fixxfdi.c

mgorny wrote:
> This and the following files have only:
> 
> ```
> #if !_ARCH_PPC
> ```
> 
> so I suppose it's currently included on more targets than x86. If it's really 
> not useful there, I think it'd be better to update the `#if`s first (and 
> preferably get the author to review).
As discussed in D36764, these all assume 80-bit floats, and therefore are only 
useful on x86 (and ancient 68ks)--and, in fact, the tests for these functions 
are disabled for everything but x86. I have left these #ifs in for now, but 
will remove them after this patch gets submitted (and add comments about them 
needing 80-bit floats). Otherwise, powerpc builds will be broken.


https://reviews.llvm.org/D36555



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D36555: Move x86-specific sources to x86-specific source lists.

2017-08-22 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine updated this revision to Diff 112242.
saugustine added a comment.

Thanks for the various comments. Please take another look.


https://reviews.llvm.org/D36555

Files:
  compiler-rt/cmake/Modules/CompilerRTUtils.cmake
  compiler-rt/cmake/builtin-config-ix.cmake
  compiler-rt/lib/builtins/CMakeLists.txt

Index: compiler-rt/lib/builtins/CMakeLists.txt
===
--- compiler-rt/lib/builtins/CMakeLists.txt
+++ compiler-rt/lib/builtins/CMakeLists.txt
@@ -51,7 +51,6 @@
   cmpti2.c
   comparedf2.c
   comparesf2.c
-  cpu_model.c
   ctzdi2.c
   ctzsi2.c
   ctzti2.c
@@ -66,7 +65,6 @@
   divtc3.c
   divti3.c
   divtf3.c
-  divxc3.c
   extendsfdf2.c
   extendhfsf2.c
   ffsdi2.c
@@ -84,27 +82,18 @@
   fixunssfdi.c
   fixunssfsi.c
   fixunssfti.c
-  fixunsxfdi.c
-  fixunsxfsi.c
-  fixunsxfti.c
-  fixxfdi.c
-  fixxfti.c
   floatdidf.c
   floatdisf.c
-  floatdixf.c
   floatsidf.c
   floatsisf.c
   floattidf.c
   floattisf.c
-  floattixf.c
   floatundidf.c
   floatundisf.c
-  floatundixf.c
   floatunsidf.c
   floatunsisf.c
   floatuntidf.c
   floatuntisf.c
-  floatuntixf.c
   int_util.c
   lshrdi3.c
   lshrti3.c
@@ -124,7 +113,6 @@
   mulvdi3.c
   mulvsi3.c
   mulvti3.c
-  mulxc3.c
   negdf2.c
   negdi2.c
   negsf2.c
@@ -142,7 +130,6 @@
   powidf2.c
   powisf2.c
   powitf2.c
-  powixf2.c
   subdf3.c
   subsf3.c
   subvdi3.c
@@ -226,6 +213,23 @@
 clear_cache.c)
 endif()
 
+# These sources work on all x86 variants, but only x86 variants.
+set(x86_ARCH_SOURCES
+  cpu_model.c
+  divxc3.c
+  fixxfdi.c
+  fixxfti.c
+  fixunsxfdi.c
+  fixunsxfsi.c
+  fixunsxfti.c
+  floatdixf.c
+  floattixf.c
+  floatundixf.c
+  floatuntixf.c
+  mulxc3.c
+  powixf2.c
+)
+
 if (NOT MSVC)
   set(x86_64_SOURCES
   x86_64/chkstk.S
@@ -288,6 +292,11 @@
   set(i686_SOURCES ${i386_SOURCES})
 endif () # if (NOT MSVC)
 
+set(x86_64h_SOURCES ${x86_64h_SOURCES} ${x86_ARCH_SOURCES})
+set(x86_64_SOURCES ${x86_64_SOURCES} ${x86_ARCH_SOURCES})
+set(i386_SOURCES ${i386_SOURCES} ${x86_ARCH_SOURCES})
+set(i686_SOURCES ${i686_SOURCES} ${x86_ARCH_SOURCES})
+
 set(arm_SOURCES
   arm/bswapdi2.S
   arm/bswapsi2.S
@@ -458,6 +467,20 @@
 set(mips64el_SOURCES ${GENERIC_TF_SOURCES}
  ${mips_SOURCES})
 
+set(powerpc64_SOURCES
+  ppc/divtc3.c
+  ppc/fixtfdi.c
+  ppc/fixunstfdi.c
+  ppc/floatditf.c
+  ppc/floatunditf.c
+  ppc/gcc_qadd.c
+  ppc/gcc_qdiv.c
+  ppc/gcc_qmul.c
+  ppc/gcc_qsub.c
+  ppc/multc3.c
+  ${GENERIC_SOURCES})
+set(powerpc64le_SOURCES ${powerpc64_SOURCES})
+
 set(wasm32_SOURCES ${GENERIC_SOURCES})
 set(wasm64_SOURCES ${GENERIC_SOURCES})
 
Index: compiler-rt/cmake/builtin-config-ix.cmake
===
--- compiler-rt/cmake/builtin-config-ix.cmake
+++ compiler-rt/cmake/builtin-config-ix.cmake
@@ -40,7 +40,7 @@
 endif()
 
 set(ALL_BUILTIN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}
-${MIPS32} ${MIPS64} ${WASM32} ${WASM64})
+${MIPS32} ${MIPS64} ${PPC64} ${WASM32} ${WASM64})
 
 include(CompilerRTUtils)
 include(CompilerRTDarwinUtils)
Index: compiler-rt/cmake/Modules/CompilerRTUtils.cmake
===
--- compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+++ compiler-rt/cmake/Modules/CompilerRTUtils.cmake
@@ -167,6 +167,8 @@
   check_symbol_exists(__i386__ "" __I386)
   check_symbol_exists(__mips__ "" __MIPS)
   check_symbol_exists(__mips64__ "" __MIPS64)
+  check_symbol_exists(__powerpc64__ "" __PPC64)
+  check_symbol_exists(__powerpc64le__ "" __PPC64LE)
   check_symbol_exists(__s390x__ "" __S390X)
   check_symbol_exists(__wasm32__ "" __WEBASSEMBLY32)
   check_symbol_exists(__wasm64__ "" __WEBASSEMBLY64)
@@ -184,6 +186,10 @@
 add_default_target_arch(mips64)
   elseif(__MIPS)
 add_default_target_arch(mips)
+  elseif(__PPC64)
+add_default_target_arch(powerpc64)
+  elseif(__PPC64LE)
+add_default_target_arch(powerpc64le)
   elseif(__S390X)
 add_default_target_arch(s390x)
   elseif(__WEBASSEMBLY32)
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D36555: Move x86-specific sources to x86-specific source lists.

2017-08-14 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine added a comment.

I've cleaned up this patch a bit. Now the only files that are in the x86_ARCH 
group are those that require 80 bits floats and cpu_model.c. Tests for all of 
these were already disabled on arm and powerpc (because neither has 80-bit 
floats), so we knew these library functions don't work on arm, but we compiled 
them anyway. It makes more sense to just not compile them at all if we know 
they require something the target architecture doesn't support.

I'm cc'ing some relevant people on this. The arm folks can comment on this 
patch (and I will add them to review) if there is a problem.

In https://reviews.llvm.org/D36555#839829, @mgorny wrote:

> Also, I think that if you're splitting them up, it'd also logical to move 
> them into a subdirectory, `x86-common` maybe.


I'm reluctant to do this because that would require adding another layer to the 
file the filtering code around line 526, and that already has some special 
casing and is a bit hard to follow. Nevertheless, if you insist, I will.


https://reviews.llvm.org/D36555



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D36555: Move x86-specific sources to x86-specific source lists.

2017-08-12 Thread Michał Górny via Phabricator via cfe-commits
mgorny requested changes to this revision.
mgorny added a comment.
This revision now requires changes to proceed.

Also, I think that if you're splitting them up, it'd also logical to move them 
into a subdirectory, `x86-common` maybe.




Comment at: compiler-rt/lib/builtins/CMakeLists.txt:223
+  cpu_model.c
+  divxc3.c
+  fixxfdi.c

This and the following files have only:

```
#if !_ARCH_PPC
```

so I suppose it's currently included on more targets than x86. If it's really 
not useful there, I think it'd be better to update the `#if`s first (and 
preferably get the author to review).


https://reviews.llvm.org/D36555



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D36555: Move x86-specific sources to x86-specific source lists.

2017-08-11 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added a comment.

Looks OK to me, but I haven't worked on this part of code either, so I think 
someone else should approve it.


https://reviews.llvm.org/D36555



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D36555: Move x86-specific sources to x86-specific source lists.

2017-08-10 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment.

Thank you for doing this. These were causing warnings with some compilers when 
built on PowerPC because the sources were just empty (macro-guarded). Not 
compiling them at all is a much cleaner solution.
LGTM but I am far from an authority on this part of the code so I'll let the 
approval come from one of the other reviewers.


https://reviews.llvm.org/D36555



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D36555: Move x86-specific sources to x86-specific source lists.

2017-08-09 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine created this revision.
Herald added a subscriber: mgorny.

https://reviews.llvm.org/D36555

Files:
  compiler-rt/lib/builtins/CMakeLists.txt


Index: compiler-rt/lib/builtins/CMakeLists.txt
===
--- compiler-rt/lib/builtins/CMakeLists.txt
+++ compiler-rt/lib/builtins/CMakeLists.txt
@@ -51,7 +51,6 @@
   cmpti2.c
   comparedf2.c
   comparesf2.c
-  cpu_model.c
   ctzdi2.c
   ctzsi2.c
   ctzti2.c
@@ -66,7 +65,6 @@
   divtc3.c
   divti3.c
   divtf3.c
-  divxc3.c
   extendsfdf2.c
   extendhfsf2.c
   ffsdi2.c
@@ -84,22 +82,17 @@
   fixunssfdi.c
   fixunssfsi.c
   fixunssfti.c
-  fixunsxfdi.c
-  fixunsxfsi.c
   fixunsxfti.c
-  fixxfdi.c
   fixxfti.c
   floatdidf.c
   floatdisf.c
-  floatdixf.c
   floatsidf.c
   floatsisf.c
   floattidf.c
   floattisf.c
   floattixf.c
   floatundidf.c
   floatundisf.c
-  floatundixf.c
   floatunsidf.c
   floatunsisf.c
   floatuntidf.c
@@ -124,7 +117,6 @@
   mulvdi3.c
   mulvsi3.c
   mulvti3.c
-  mulxc3.c
   negdf2.c
   negdi2.c
   negsf2.c
@@ -142,7 +134,6 @@
   powidf2.c
   powisf2.c
   powitf2.c
-  powixf2.c
   subdf3.c
   subsf3.c
   subvdi3.c
@@ -226,6 +217,18 @@
 clear_cache.c)
 endif()
 
+# These sources work on all x86 variants, but only x86 variants.
+set(x86_ARCH_SOURCES
+  cpu_model.c
+  divxc3.c
+  fixxfdi.c
+  fixunsxfdi.c
+  fixunsxfsi.c
+  floatdixf.c
+  floatundixf.c
+  mulxc3.c
+  powixf2.c)
+
 if (NOT MSVC)
   set(x86_64_SOURCES
   x86_64/chkstk.S
@@ -288,6 +291,11 @@
   set(i686_SOURCES ${i386_SOURCES})
 endif () # if (NOT MSVC)
 
+set(x86_64h_SOURCES ${x86_64h_SOURCES} ${x86_ARCH_SOURCES})
+set(x86_64_SOURCES ${x86_64_SOURCES} ${x86_ARCH_SOURCES})
+set(i386_SOURCES ${i386_SOURCES} ${x86_ARCH_SOURCES})
+set(i686_SOURCES ${i686_SOURCES} ${x86_ARCH_SOURCES})
+
 set(arm_SOURCES
   arm/bswapdi2.S
   arm/bswapsi2.S


Index: compiler-rt/lib/builtins/CMakeLists.txt
===
--- compiler-rt/lib/builtins/CMakeLists.txt
+++ compiler-rt/lib/builtins/CMakeLists.txt
@@ -51,7 +51,6 @@
   cmpti2.c
   comparedf2.c
   comparesf2.c
-  cpu_model.c
   ctzdi2.c
   ctzsi2.c
   ctzti2.c
@@ -66,7 +65,6 @@
   divtc3.c
   divti3.c
   divtf3.c
-  divxc3.c
   extendsfdf2.c
   extendhfsf2.c
   ffsdi2.c
@@ -84,22 +82,17 @@
   fixunssfdi.c
   fixunssfsi.c
   fixunssfti.c
-  fixunsxfdi.c
-  fixunsxfsi.c
   fixunsxfti.c
-  fixxfdi.c
   fixxfti.c
   floatdidf.c
   floatdisf.c
-  floatdixf.c
   floatsidf.c
   floatsisf.c
   floattidf.c
   floattisf.c
   floattixf.c
   floatundidf.c
   floatundisf.c
-  floatundixf.c
   floatunsidf.c
   floatunsisf.c
   floatuntidf.c
@@ -124,7 +117,6 @@
   mulvdi3.c
   mulvsi3.c
   mulvti3.c
-  mulxc3.c
   negdf2.c
   negdi2.c
   negsf2.c
@@ -142,7 +134,6 @@
   powidf2.c
   powisf2.c
   powitf2.c
-  powixf2.c
   subdf3.c
   subsf3.c
   subvdi3.c
@@ -226,6 +217,18 @@
 clear_cache.c)
 endif()
 
+# These sources work on all x86 variants, but only x86 variants.
+set(x86_ARCH_SOURCES
+  cpu_model.c
+  divxc3.c
+  fixxfdi.c
+  fixunsxfdi.c
+  fixunsxfsi.c
+  floatdixf.c
+  floatundixf.c
+  mulxc3.c
+  powixf2.c)
+
 if (NOT MSVC)
   set(x86_64_SOURCES
   x86_64/chkstk.S
@@ -288,6 +291,11 @@
   set(i686_SOURCES ${i386_SOURCES})
 endif () # if (NOT MSVC)
 
+set(x86_64h_SOURCES ${x86_64h_SOURCES} ${x86_ARCH_SOURCES})
+set(x86_64_SOURCES ${x86_64_SOURCES} ${x86_ARCH_SOURCES})
+set(i386_SOURCES ${i386_SOURCES} ${x86_ARCH_SOURCES})
+set(i686_SOURCES ${i686_SOURCES} ${x86_ARCH_SOURCES})
+
 set(arm_SOURCES
   arm/bswapdi2.S
   arm/bswapsi2.S
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits