LLVM backend for 6502
Go to file
Ulrich Weigand 3ea50a69d7 [SystemZ] Support System Z as host architecture
The llvm::sys::AddSignalHandler function (as well as related routines) in
lib/Support/Unix/Signals.inc currently registers a signal handler routine
via "sigaction".  When this handler is called due to a SIGSEGV, SIGILL or
similar signal, it will show a stack backtrace, deactivate the handler,
and then simply return to the operating system.  The intent is that the
OS will now retry execution at the same location as before, which ought
to again trigger the same error condition and cause the same signal to be
delivered again.  Since the hander is now deactivated, the OS will take
its default action (usually, terminate the program and possibly create
a core dump).

However, this method doesn't work reliably on System Z:  With certain
signals (namely SIGILL, SIGFPE, and SIGTRAP), the program counter stored
by the kernel on the signal stack frame (which is the location where
execution will resume) is not the instruction that triggered the fault,
but then instruction *after it*.  When the LLVM signal handler simply
returns to the kernel, execution will then resume at *that* address,
which will not trigger the problem again, but simply go on and execute
potentially unrelated code leading to random errors afterwards.

To fix this, the patch simply goes and re-raises the signal in question
directly from the handler instead of returning from it.  This is done
only on System Z and only for those signals that have this particular
problem.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181010 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03 12:22:11 +00:00
autoconf Only use cxxabi.h's demangler, if it is actually available. 2013-04-27 22:12:32 +00:00
bindings Exposing MCJIT through C API 2013-04-29 17:49:40 +00:00
cmake Only use cxxabi.h's demangler, if it is actually available. 2013-04-27 22:12:32 +00:00
docs Add support for reading ARM ELF build attributes. 2013-05-03 11:36:35 +00:00
examples Add support for other typeinfo encodings in the ExceptionDemo. 2013-05-01 21:05:05 +00:00
include Add support for reading ARM ELF build attributes. 2013-05-03 11:36:35 +00:00
lib [SystemZ] Support System Z as host architecture 2013-05-03 12:22:11 +00:00
projects remove cbe backend from sample configure 2013-04-24 02:17:19 +00:00
runtime Remove GCDAProfiling.c. This copy is old, the copy in compiler-rt is newer and 2013-03-07 02:03:08 +00:00
test Add support for reading ARM ELF build attributes. 2013-05-03 11:36:35 +00:00
tools Add support for reading ARM ELF build attributes. 2013-05-03 11:36:35 +00:00
unittests This exposes more MCJIT options via the C API: 2013-05-01 22:58:00 +00:00
utils Try to fix ProgramTest on FreeBSD 2013-04-30 04:30:41 +00:00
.arcconfig Add .arcconfig to the repository. Useful if someone wants to use phabricator's command line tool. 2012-12-01 12:07:58 +00:00
.gitignore Add extra vim swap file pattern 2012-10-09 23:48:34 +00:00
CMakeLists.txt Add basic zlib support to LLVM. This would allow to use compression/uncompression in selected LLVM tools. 2013-04-23 08:28:39 +00:00
CODE_OWNERS.TXT Fix random typo. 2013-04-17 03:18:49 +00:00
configure Regen. 2013-04-27 22:23:16 +00:00
CREDITS.TXT Add myself in the CREDITS.TXT 2013-04-11 13:15:39 +00:00
LICENSE.TXT Add LICENSE.TXT covering contributions made by ARM. 2013-01-07 10:04:49 +00:00
llvm.spec.in Tidy up. s/Low Level Virtual Machine/LLVM/. 2012-01-25 22:00:23 +00:00
LLVMBuild.txt LLVMBuild: Introduce a common section which currently has a list of the 2011-12-12 22:45:54 +00:00
Makefile Improved svn repo searching for 'make update' 2013-01-28 03:19:57 +00:00
Makefile.common Makefile.common: Update a description, s/Source/SOURCES/ , according to MakefileGuide.html#control-variables . 2012-12-07 01:43:23 +00:00
Makefile.config.in Add basic zlib support to LLVM. This would allow to use compression/uncompression in selected LLVM tools. 2013-04-23 08:28:39 +00:00
Makefile.rules We don't want FP elimination when doing an Apple-style build. 2013-05-02 21:09:03 +00:00
README.txt test 2013-04-17 05:34:03 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.