92 Commits

Author SHA1 Message Date
brad
dafbe5d7d9 r217410
Set trunc store action to Expand for all X86 targets.

When compiling without SSE2, isTruncStoreLegal(F64, F32) would return Legal, whereas
with SSE2 it would return Expand. And since the Target doesn't seem to actually
handle a truncstore for double -> float, it would just output a store of a full
double in the space for a float hence overwriting other bits on the stack.
2014-09-15 19:24:16 +00:00
brad
e50d65c350 r205331
Debug info: fix a crash when emitting IndirectFieldDecls, which were previously
not handled at all.
2014-09-12 12:39:47 +00:00
brad
6b3e8776f2 r215238 / r217611
Provide implementations of getNoopForMachoTarget for PowerPC / SPARC.
2014-09-11 17:59:51 +00:00
brad
d0a5824619 r213427
[PowerPC] 32-bit ELF PIC support

r213899
Don't use 128bit functions on PPC32.

This adds initial support for PPC32 ELF PIC (Position Independent Code; the
-fPIC variety), thus rectifying a long-standing deficiency in the PowerPC
backend.

r213960
[PowerPC] Support TLS on PPC32/ELF
2014-09-11 17:54:13 +00:00
brad
fe7db59349 - Remove a local PowerPC patch we don't need.
- A fix for the SPARC float handling. Adding the missing & to the field allows
  the backend feature flag to be passed back which it was not without it.
- Add some patches to enable the integrated assembler on PowerPC / SPARC.
  I left these out before as I thought because Clang was not obeying this
  setting and had its own similar bits they were not necessary but turns
  out the backend has some code that does obey this setting.

ok sthen@
2014-08-29 14:28:32 +00:00
brad
06acbb6e4b r211435
Legalizer: Add support for splitting insert_subvectors.

We handle this by spilling the whole thing to the stack and doing the
insertion as a store.

PR19492. This happens in real code because the vectorizer creates v2i128 when AVX is
enabled.

ok matthew@
2014-08-14 01:08:09 +00:00
pascal
b7bbd19079 Fix detection of arc4random.
ok brad@ sthen@
2014-07-26 09:27:29 +00:00
brad
d5b197e53f Bring in some commits from upstream..
r213105
Use the integrated assembler by default on OpenBSD/sparc

r212838
Handle SPARC float command line parameters for SPARCv9.

ok matthew@
2014-07-16 22:16:54 +00:00
brad
9d0a0c6200 Sync up the SPARC backend up to commit r203424.
ok matthew@
2014-07-11 01:05:24 +00:00
brad
5508a97976 Bring in fixes from 3.4.1 / 3.4.2 that do not already exist in the
3.5 snapshot (which around 60% of them did)..

r203025, r203050, r203054, r203281, r203581, r203719, r203818, r204155, r204304,
r205067, r205630, r205738, r207990, r208501.

ok matthew@
2014-07-10 22:46:37 +00:00
brad
e1c644379d r211624
Use appropriate default PIE settings for OpenBSD.

ok matthew@
2014-07-10 19:26:48 +00:00
brad
07775f755c Add SVN commit revision. 2014-06-16 23:14:15 +00:00
brad
db151cc6a6 Some fixes from uptream..
- Use dwarf-2 by default on OpenBSD and FreeBSD.
- Make VSELECT selection terminate in cases where the condition type has
  to be split and the result type widened.
  (fixes an OOM crash with the vectorizer on i386 if not utilizing SSE2
   or newer)
- The last step of _mm_cvtps_pi16 should use _mm_packs_pi32, which is a
  function that reads two __m64 values and packs four 32-bit values into
  four 16-bit values.

Fix profiling..

- Alias the command line parameter -p to -pg.

From Bitrig

ok sthen@
2014-06-13 22:29:40 +00:00
brad
33c95574ef r209479
Don't reduce the stack protector level given -fstack-protector.

ok sthen@
2014-05-29 00:23:36 +00:00
brad
785470a4b5 Add SVN commit revision. 2014-05-22 13:30:23 +00:00
brad
40bd3b5c62 - Switch to stack protector strong by default
- Fix the --param ssp-buffer-size= support

ok sthen@
2014-05-17 11:41:15 +00:00
brad
017c881043 Disable the terminfo support which is used to determine if a terminal
has colours support, but the added dependency seems to cause issues
when linking the LLVM libraries as is. Probably an issue with the
build infrastructure but we don't care about colours.

Requeted by jsg@

ok sthen@
2014-04-19 19:56:21 +00:00
brad
698bc29458 Add SVN revision 2014-04-18 21:26:56 +00:00
brad
207a2888cc Update to LLVM 3.5 (trunk) snapshot just before switching to an unconditional
C++11 codebase.

This brings in a number of improvements over 3.4 including..
X86 assembler with 16-bit support
Much improved SPARC backend
stack protector strong support

ok sthen@
2014-04-18 09:30:48 +00:00
brad
fa8c49b548 lit wants a copy of bash around for the test framework.
ok sthen@
2013-12-16 20:34:46 +00:00
brad
dc5f6f6c36 - Fix the test target since the switch from GNU autoconf/make to CMake
- Add the scan-build man page
- Correct the capitalization of Clang in DESCR

ok sthen@
2013-12-07 10:30:39 +00:00
brad
b93422e552 - Remove MAKE_FLAGS variables as they were only relevant for the GNU autoconf/make
build infrastructure
- Remove the CMake patch as sebastia@ says it did not actually work and should be
  removed
- Some frontend driver tweaks for the external assembler handling for 32-bit mode
  (-m32) on amd64, powerpc handling and bring the ABI determination bits in line
  with the other OS's to use the getGnuCompatibleMipsABIName function

ok sthen@
2013-12-02 22:14:29 +00:00
sthen
701c91e413 kill VMEM_WARNING 2013-11-25 14:16:22 +00:00
sthen
27f03b1c52 bump REVISION for any ports using route messages. regen some distinfos and
remove unnecessary USE_GROFFs while there.
2013-10-31 21:12:12 +00:00
jsg
b1ef8a8075 enable the R600 target
ok sthen@ brad@
2013-08-06 23:33:44 +00:00
naddy
b44ec0e969 this profits a lot from parallel building under dpb 2013-06-28 11:14:38 +00:00
brad
ffaa1a2b14 Update to LLVM 3.3.
ok sthen@
2013-06-21 22:09:12 +00:00
sebastia
21cb354a14 Allow upcoming libobjc2 to find LLVM-Config.cmake in its configure stage.
Fix from and OK zhuk@
OK dcoppa@
2013-05-02 15:41:57 +00:00
sthen
17c95658e6 Pull in r175057 from upstream LLVM, via FreeBSD, found by Wada Hiroyuki.
X86: Disable generation of rep;movsl when %esi is used as a base pointer.
This happens when there is both stack realignment and a dynamic alloca in the
function. If we overwrite %esi (rep;movsl uses fixed registers) we'll lose the
base pointer and the next register spill will write into oblivion.
2013-03-30 12:10:40 +00:00
espie
bcf3856632 PERMIT_* / REGRESS->TEST sweep 2013-03-11 10:50:00 +00:00
brad
c54dae5771 Add some initial bits for mips64 to pass down the proper flags
to the assembler and linker. Still work in progress.

ok sthen@
2013-01-08 10:14:13 +00:00
brad
48a783ee6f - Remove USE_LIBTOOL and explicit CONFIGURE_STYLE as the CMake
module does that for us
- Shuffle some of the Makefile bits around

ok sthen@
2013-01-08 09:53:46 +00:00
brad
ac1ecd7415 Silence some warnings and allow passing down some feature flags to the linker.
ok sthen@
2013-01-04 01:10:30 +00:00
brad
cc75b05c01 Update to LLVM 3.2 and switces to __guard_local for stack protector support.
Initial work from landry@ with some fixes and further tweaking from pascal@ and brad@

ok sthen@ landry@
2012-12-23 20:49:29 +00:00
jasper
9319ac3f2e - drop the 'svn' suffix from llvm-config --version output.
ok sthen@
2012-10-16 18:22:30 +00:00
sthen
42c6a55c0c don't .include <bsd.port.arch.mk> just to get definitions from arch-defines 2012-09-30 09:16:36 +00:00
sthen
651353dd61 fix RTTI building since moving to CMake - problem reported & fix tested
by Tony Sidaway, thanks!
2012-09-05 23:19:24 +00:00
pascal
df44ab302a Disable PIE for now in clang until someone is masochistic enough to figure
out how to best handle enabling it by default.  Manually speficying -fpie
-Wl,-pie will still work, of course.

ok sthen@
2012-08-31 16:21:20 +00:00
sthen
85a7d74bd9 Re-sync CLang with the OBSD_LIB_SPEC now used in base (-lc for libs was
removed again). From Brad.
2012-08-29 00:45:47 +00:00
pascal
c619f16384 Mimic the new gcc -pthread semantics. From Brad.
looks good to matthew@
2012-08-21 17:51:53 +00:00
dcoppa
ef1092aee3 Remove '-lpthread'->'-pthread' hacks 2012-08-20 08:12:47 +00:00
sthen
4c3755caaf Sync with r161481 from upstream, "Revert part of r161175 which was wrong
for OpenBSD's PowerPC target". Problem pointed out by landry@.
2012-08-08 09:35:24 +00:00
sthen
eca8eaed22 Add several CLang patches from upstream via Brad.
- Only provide /usr/include in the default C header search path.
- OpenBSD does not support TLS.
- Provide target support for powerpc, arm, mips64, mips64el and sparc.
2012-08-06 22:35:26 +00:00
pascal
af7cfff551 Make stack smashing protection work with our native libc routines, and enable
it by default.

ok jsg@
2012-08-04 14:47:52 +00:00
sthen
ce3a4663cb use LLVM_ARCHS to populate ONLY_FOR_ARCHS, better to have this in a
central place.
2012-07-08 18:36:12 +00:00
dcoppa
cf153cacfa Fix libpthread linking (use '-pthread' instead of '-lpthread') for
cmake-based ports that use "CHECK_LIBRARY_EXISTS(pthread ...)".

Fix libpthread linking for devel/llvm too (additional care was
needed).

No fallout in a bulk build: thanks landry!
2012-06-14 09:32:00 +00:00
jasper
1e878a85e0 - let g-c-a use the clang module to get the correct includes path
- add a reminder commennt in llvm/Makefile

discussed with and ok sthen@
2012-05-26 09:14:34 +00:00
sthen
68d394c41c Update to LLVM 3.1.
Thanks Brad for pointing out a few problems with my original diff.
2012-05-25 09:05:49 +00:00
dcoppa
fa4bc9a99d Fix CMake check for pthread_mutex_lock: use check_library_exists()
function instead of the buggy check_symbol_exists().

ok sthen@
2012-05-05 19:24:01 +00:00
sthen
e7e448a021 Update Clang to use _REENTRANT instead of _POSIX_THREADS when using the
-pthread flag. From Brad.
2012-04-23 23:11:01 +00:00