LLVM backend for 6502
Go to file
Bill Wendling e9bf7e692e Handle code gen for the unreachable instruction if it's the only instruction in
the function. We'll just turn it into a "trap" instruction instead.

The problem with not handling this is that it might generate a prologue without
the equivalent epilogue to go with it:

$ cat t.ll
define void @foo() {
entry:
  unreachable
}
$ llc -o - t.ll -relocation-model=pic -disable-fp-elim -unwind-tables
        .section        __TEXT,__text,regular,pure_instructions
        .globl  _foo
        .align  4, 0x90
_foo:                                   ## @foo
Leh_func_begin0:
## BB#0:                                ## %entry
        pushq   %rbp
Ltmp0:
        movq    %rsp, %rbp
Ltmp1:
Leh_func_end0:
...

The unwind tables then have bad data in them causing all sorts of problems.

Fixes <rdar://problem/8096481>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108473 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-15 23:32:40 +00:00
autoconf Pull in the libCrashReporterClient.a information with a warning comment. 2010-06-28 18:25:51 +00:00
bindings Implement the "linker_private_weak" linkage type. This will be used for 2010-07-01 21:55:59 +00:00
cmake Don't link against libm and libpthread which don't exist in BeOS/Haiku. Also, 2010-06-23 06:48:34 +00:00
docs Don't pass StringRef by reference. 2010-07-14 22:38:02 +00:00
examples Convert some tab stops into spaces. 2010-07-12 08:16:59 +00:00
include Split -enable-finite-only-fp-math to two options: 2010-07-15 22:07:12 +00:00
lib Handle code gen for the unreachable instruction if it's the only instruction in 2010-07-15 23:32:40 +00:00
projects Testing subversion commit access 2010-02-23 15:11:17 +00:00
runtime Delete a blank line. 2010-04-16 13:32:55 +00:00
test Handle code gen for the unreachable instruction if it's the only instruction in 2010-07-15 23:32:40 +00:00
tools Remove some broken code to check the DISABLE_EDIS flag (edis is now in the 2010-07-14 22:41:51 +00:00
unittests Switch from EXPECT_EQ({true,false, ...) to the more canonical 2010-07-13 17:28:05 +00:00
utils Remove the entire docs directory from Apple-style builds. 2010-07-14 23:49:18 +00:00
website Prepare for "core" website. 2007-08-03 05:43:35 +00:00
build-for-llvm-top.sh Patch to build llvm with srcdir != objdir from 2009-01-23 08:42:38 +00:00
CMakeLists.txt Fix LLVM CMake PACKAGE_VERSION variable. 2010-06-25 16:29:14 +00:00
configure Pull in the libCrashReporterClient.a information with a warning comment. 2010-06-28 18:25:51 +00:00
CREDITS.TXT Adding the MicroBlaze backend. 2010-02-23 19:15:24 +00:00
LICENSE.TXT 2010 is upon us. 2010-01-09 18:40:31 +00:00
llvm.spec.in
Makefile Issue the warning about being slow whenever optimization is disabled, 2010-07-07 16:48:16 +00:00
Makefile.common Removed trailing whitespace from Makefiles. 2009-01-09 16:44:42 +00:00
Makefile.config.in typo in comment, regeneration not necessary 2010-07-07 13:58:46 +00:00
Makefile.rules build/Darwin: Add a missing directory dependency. 2010-07-15 21:51:52 +00:00
ModuleInfo.txt Patch to build llvm with srcdir != objdir from 2009-01-23 08:42:38 +00:00
README.txt Give packagers some advice about how to build LLVM so it's useful to 2010-02-26 00:54:42 +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 HTML documentation provided in docs/index.html for further
assistance with LLVM.

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