1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
llvm-mirror/test
Reed Kotler 7ee48929d5 This patch is needed to make c++ exceptions work for mips16.
Mips16 is really a processor decoding mode (ala thumb 1) and in the same
program, mips16 and mips32 functions can exist and can call each other.

If a jal type instruction encounters an address with the lower bit set, then
the processor switches to mips16 mode (if it is not already in it). If the
lower bit is not set, then it switches to mips32 mode.

The linker knows which functions are mips16 and which are mips32.
When relocation is performed on code labels, this lower order bit is
set if the code label is a mips16 code label.

In general this works just fine, however when creating exception handling
tables and dwarf, there are cases where you don't want this lower order
bit added in.

This has been traditionally distinguished in gas assembly source by using a
different syntax for the label.

lab1:      ; this will cause the lower order bit to be added
lab2=.     ; this will not cause the lower order bit to be added

In some cases, it does not matter because in dwarf and debug tables
the difference of two labels is used and in that case the lower order
bits subtract each other out.

To fix this, I have added to mcstreamer the notion of a debuglabel.
The default is for label and debug label to be the same. So calling
EmitLabel and EmitDebugLabel produce the same result.

For various reasons, there is only one set of labels that needs to be
modified for the mips exceptions to work. These are the "$eh_func_beginXXX" 
labels.

Mips overrides the debug label suffix from ":" to "=." .

This initial patch fixes exceptions. More changes most likely
will be needed to DwarfCFException to make all of this work
for actual debugging. These changes will be to emit debug labels in some
places where a simple label is emitted now.

Some historical discussion on this from gcc can be found at:
http://gcc.gnu.org/ml/gcc-patches/2008-08/msg00623.html
http://gcc.gnu.org/ml/gcc-patches/2008-11/msg01273.html 

llvm-svn: 170279
2012-12-16 04:00:45 +00:00
..
Analysis Optimistically analyse Phi cycles 2012-12-10 23:02:41 +00:00
Archive Replace all instances of dg.exp file with lit.local.cfg, since all tests are run with LIT now and now Dejagnu. dg.exp is no longer needed. 2012-02-16 06:28:33 +00:00
Assembler Fast-math test case for bitcode and textual reading/writing 2012-11-27 00:45:08 +00:00
Bindings/Ocaml Move TargetData to DataLayout. 2012-10-08 16:39:34 +00:00
Bitcode Change encoding of instruction operands in bitcode binaries to be relative 2012-10-11 20:20:40 +00:00
BugPoint Fix unexpected passes. These test do work with LTO on linux. I tested both 2012-10-26 02:19:02 +00:00
CodeGen This patch is needed to make c++ exceptions work for mips16. 2012-12-16 04:00:45 +00:00
DebugInfo Debug Info: add support to mark member variables as artificial 2012-12-13 22:43:07 +00:00
ExecutionEngine llvm/test/ExecutionEngine/MCJIT/lit.local.cfg: ppc32-elf is not ready. 2012-11-20 10:49:01 +00:00
Feature Remove the dependent libraries feature. 2012-11-27 09:55:56 +00:00
FileCheck Fix a bug in FileCheck that wouldn't let define variables as follows: 2012-12-02 16:02:41 +00:00
Instrumentation [msan] Origin stores and loads do not need explicit alignment. 2012-12-14 13:43:11 +00:00
Integer Remove the dependent libraries feature. 2012-11-27 09:55:56 +00:00
JitListener Use the 'count' attribute to calculate the upper bound of an array. 2012-12-04 21:34:03 +00:00
Linker Remove the dependent libraries feature. 2012-11-27 09:55:56 +00:00
MC Make sure the alternate PC+imm syntax of LDR instruction with a small 2012-12-14 23:04:25 +00:00
Object numerically sort the symbols, so that the testcase result is uniform 2012-11-13 21:01:11 +00:00
Other Using "not grep" is brittle as the test passes if llvm-as fails. 2012-11-21 14:17:23 +00:00
Scripts Added program header emission 2012-11-16 20:51:32 +00:00
TableGen Fix typo, which prevent test from being check. 2012-12-12 21:10:56 +00:00
tools PR10867: Analogue of r169441 for when using external 'sh'. And actually run the test! 2012-12-05 23:15:33 +00:00
Transforms Add a corollary test for PR14572. We got this code path correct already. 2012-12-15 09:31:54 +00:00
Unit tests: Rip out a bunch of now unused test code relating to use of llvm-gcc in LLVM tests. 2011-10-27 20:59:26 +00:00
Verifier Assert that dominates is not given a multiple edge. Finding out if we have 2012-08-17 18:21:28 +00:00
YAMLParser Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
CMakeLists.txt Adding tests for the Intel JIT event listener's MCJIT support. 2012-11-21 20:38:26 +00:00
lit.cfg Adding tests for the Intel JIT event listener's MCJIT support. 2012-11-21 20:38:26 +00:00
lit.site.cfg.in Adding tests for the Intel JIT event listener's MCJIT support. 2012-11-21 20:38:26 +00:00
Makefile Drop the address space limit for tests in the makefile build. 2012-12-09 10:34:22 +00:00
Makefile.tests Switch .bc/.ll Makefile rules to use LLVM{CC,CXX} instead of LLVMG{CC,XX} 2010-02-23 10:28:06 +00:00
TestRunner.sh Use exec. 2010-08-29 14:49:00 +00:00