llvm-6502/test
Hal Finkel 7ee74a663a Implement builtin_{setjmp/longjmp} on PPC
This implements SJLJ lowering on PPC, making the Clang functions
__builtin_{setjmp/longjmp} functional on PPC platforms. The implementation
strategy is similar to that on X86, with the exception that a branch-and-link
variant is used to get the right jump address. Credit goes to Bill Schmidt for
suggesting the use of the unconditional bcl form (instead of the regular bl
instruction) to limit return-address-cache pollution.

Benchmarking the speed at -O3 of:

static jmp_buf env_sigill;

void foo() {
                __builtin_longjmp(env_sigill,1);
}

main() {
	...

        for (int i = 0; i < c; ++i) {
                if (__builtin_setjmp(env_sigill)) {
                        goto done;
                } else {
                        foo();
                }

done:;
        }

	...
}

vs. the same code using the libc setjmp/longjmp functions on a P7 shows that
this builtin implementation is ~4x faster with Altivec enabled and ~7.25x
faster with Altivec disabled. This comparison is somewhat unfair because the
libc version must also save/restore the VSX registers which we don't yet
support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177666 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-21 21:37:52 +00:00
..
Analysis Correct cost model for vector shift on AVX2 2013-03-20 22:01:10 +00:00
Archive
Assembler Correct invalid debug info metadata 2013-03-12 19:04:24 +00:00
Bindings/Ocaml
Bitcode
BugPoint
CodeGen Implement builtin_{setjmp/longjmp} on PPC 2013-03-21 21:37:52 +00:00
DebugInfo Remove unused field in DISubprogram 2013-03-21 20:28:52 +00:00
ExecutionEngine
Feature
FileCheck
Instrumentation Remove unused field in DISubprogram 2013-03-21 20:28:52 +00:00
Integer
JitListener
Linker
MC Fix pr13145 - Naming a function like a register name confuses the asm parser. 2013-03-19 23:44:03 +00:00
Object
Other
Scripts
TableGen
tools
Transforms Remove unused field in DISubprogram 2013-03-21 20:28:52 +00:00
Unit Fixup for r176933: more careful setup of path to llvm-symbolizer 2013-03-15 07:27:49 +00:00
Verifier
YAMLParser
CMakeLists.txt Add llvm-symbolizer as test dependency. 2013-03-13 09:35:18 +00:00
lit.cfg Fixup for r176933: more careful setup of path to llvm-symbolizer 2013-03-15 07:27:49 +00:00
lit.site.cfg.in
Makefile In r169695, the address space limit for tests was replaced with a data 2013-03-12 12:38:10 +00:00
Makefile.tests
TestRunner.sh