OLD | NEW |
1 //===----- JITDwarfEmitter.cpp - Write dwarf tables into memory -----------===// | 1 //===----- JITDwarfEmitter.cpp - Write dwarf tables into memory -----------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file defines a JITDwarfEmitter object that is used by the JIT to | 10 // This file defines a JITDwarfEmitter object that is used by the JIT to |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "llvm/Target/TargetMachine.h" | 29 #include "llvm/Target/TargetMachine.h" |
30 #include "llvm/Target/TargetRegisterInfo.h" | 30 #include "llvm/Target/TargetRegisterInfo.h" |
31 using namespace llvm; | 31 using namespace llvm; |
32 | 32 |
33 JITDwarfEmitter::JITDwarfEmitter(JIT& theJit) : Jit(theJit) {} | 33 JITDwarfEmitter::JITDwarfEmitter(JIT& theJit) : Jit(theJit) {} |
34 | 34 |
35 | 35 |
36 unsigned char* JITDwarfEmitter::EmitDwarfTable(MachineFunction& F,· | 36 unsigned char* JITDwarfEmitter::EmitDwarfTable(MachineFunction& F,· |
37 JITCodeEmitter& jce, | 37 JITCodeEmitter& jce, |
38 unsigned char* StartFunction, | 38 unsigned char* StartFunction, |
39 unsigned char* EndFunction) { | 39 unsigned char* EndFunction, |
| 40 unsigned char* &EHFramePtr) { |
40 const TargetMachine& TM = F.getTarget(); | 41 const TargetMachine& TM = F.getTarget(); |
41 TD = TM.getTargetData(); | 42 TD = TM.getTargetData(); |
42 stackGrowthDirection = TM.getFrameInfo()->getStackGrowthDirection(); | 43 stackGrowthDirection = TM.getFrameInfo()->getStackGrowthDirection(); |
43 RI = TM.getRegisterInfo(); | 44 RI = TM.getRegisterInfo(); |
44 JCE = &jce; | 45 JCE = &jce; |
45 ·· | 46 ·· |
46 unsigned char* ExceptionTable = EmitExceptionTable(&F, StartFunction, | 47 unsigned char* ExceptionTable = EmitExceptionTable(&F, StartFunction, |
47 EndFunction); | 48 EndFunction); |
48 ······ | 49 ······ |
49 unsigned char* Result = 0; | 50 unsigned char* Result = 0; |
50 unsigned char* EHFramePtr = 0; | |
51 | 51 |
52 const std::vector<Function *> Personalities = MMI->getPersonalities(); | 52 const std::vector<Function *> Personalities = MMI->getPersonalities(); |
53 EHFramePtr = EmitCommonEHFrame(Personalities[MMI->getPersonalityIndex()]); | 53 EHFramePtr = EmitCommonEHFrame(Personalities[MMI->getPersonalityIndex()]); |
54 | 54 |
55 Result = EmitEHFrame(Personalities[MMI->getPersonalityIndex()], EHFramePtr, | 55 Result = EmitEHFrame(Personalities[MMI->getPersonalityIndex()], EHFramePtr, |
56 StartFunction, EndFunction, ExceptionTable); | 56 StartFunction, EndFunction, ExceptionTable); |
57 | 57 |
58 return Result; | 58 return Result; |
59 } | 59 } |
60 | 60 |
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1037 for (unsigned j = 0, M = FilterIds.size(); j < M; ++j) { | 1037 for (unsigned j = 0, M = FilterIds.size(); j < M; ++j) { |
1038 unsigned TypeID = FilterIds[j]; | 1038 unsigned TypeID = FilterIds[j]; |
1039 FinalSize += MCAsmInfo::getULEB128Size(TypeID); | 1039 FinalSize += MCAsmInfo::getULEB128Size(TypeID); |
1040 //Asm->EOL("Filter TypeInfo index"); | 1040 //Asm->EOL("Filter TypeInfo index"); |
1041 } | 1041 } |
1042 ·· | 1042 ·· |
1043 FinalSize = RoundUpToAlign(FinalSize, 4); | 1043 FinalSize = RoundUpToAlign(FinalSize, 4); |
1044 | 1044 |
1045 return FinalSize; | 1045 return FinalSize; |
1046 } | 1046 } |
OLD | NEW |