Chris Lattner | c9670ef | 2003-07-31 04:43:49 +0000 | [diff] [blame] | 1 | //===- CodeEmitterGen.cpp - Code Emitter Generator ------------------------===// |
Misha Brukman | 3da94ae | 2005-04-22 00:00:37 +0000 | [diff] [blame] | 2 | // |
John Criswell | 01d4582 | 2003-10-20 20:20:30 +0000 | [diff] [blame] | 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 3060910 | 2007-12-29 20:37:13 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Misha Brukman | 3da94ae | 2005-04-22 00:00:37 +0000 | [diff] [blame] | 7 | // |
John Criswell | 01d4582 | 2003-10-20 20:20:30 +0000 | [diff] [blame] | 8 | //===----------------------------------------------------------------------===// |
Chris Lattner | c9670ef | 2003-07-31 04:43:49 +0000 | [diff] [blame] | 9 | // |
Misha Brukman | 4e4f863 | 2004-08-04 22:07:54 +0000 | [diff] [blame] | 10 | // CodeEmitterGen uses the descriptions of instructions and their fields to |
| 11 | // construct an automated code emitter: a function that, given a MachineInstr, |
| 12 | // returns the (currently, 32-bit unsigned) value of the instruction. |
Chris Lattner | c9670ef | 2003-07-31 04:43:49 +0000 | [diff] [blame] | 13 | // |
| 14 | //===----------------------------------------------------------------------===// |
| 15 | |
Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 16 | #include "CodeEmitterGen.h" |
Misha Brukman | d7a5b28 | 2004-08-09 19:10:43 +0000 | [diff] [blame] | 17 | #include "CodeGenTarget.h" |
Chris Lattner | c9670ef | 2003-07-31 04:43:49 +0000 | [diff] [blame] | 18 | #include "Record.h" |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 19 | #include "llvm/ADT/StringExtras.h" |
Reid Spencer | 551ccae | 2004-09-01 22:55:40 +0000 | [diff] [blame] | 20 | #include "llvm/Support/Debug.h" |
Chris Lattner | 2082ebe | 2004-08-01 03:55:39 +0000 | [diff] [blame] | 21 | using namespace llvm; |
Brian Gaeke | d0fde30 | 2003-11-11 22:41:34 +0000 | [diff] [blame] | 22 | |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 23 | void CodeEmitterGen::reverseBits(std::vector<Record*> &Insts) { |
| 24 | for (std::vector<Record*>::iterator I = Insts.begin(), E = Insts.end(); |
| 25 | I != E; ++I) { |
| 26 | Record *R = *I; |
Jakob Stoklund Olesen | 65766ce | 2010-07-02 21:44:22 +0000 | [diff] [blame] | 27 | if (R->getValueAsString("Namespace") == "TargetOpcode") |
| 28 | continue; |
Dan Gohman | f8c7394 | 2009-04-13 15:38:05 +0000 | [diff] [blame] | 29 | |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 30 | BitsInit *BI = R->getValueAsBitsInit("Inst"); |
Misha Brukman | 28eefa5 | 2004-10-14 05:53:01 +0000 | [diff] [blame] | 31 | |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 32 | unsigned numBits = BI->getNumBits(); |
| 33 | BitsInit *NewBI = new BitsInit(numBits); |
| 34 | for (unsigned bit = 0, end = numBits / 2; bit != end; ++bit) { |
| 35 | unsigned bitSwapIdx = numBits - bit - 1; |
| 36 | Init *OrigBit = BI->getBit(bit); |
| 37 | Init *BitSwap = BI->getBit(bitSwapIdx); |
| 38 | NewBI->setBit(bit, BitSwap); |
| 39 | NewBI->setBit(bitSwapIdx, OrigBit); |
Misha Brukman | 28eefa5 | 2004-10-14 05:53:01 +0000 | [diff] [blame] | 40 | } |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 41 | if (numBits % 2) { |
| 42 | unsigned middle = (numBits + 1) / 2; |
| 43 | NewBI->setBit(middle, BI->getBit(middle)); |
| 44 | } |
Jim Grosbach | 8b892ae | 2010-10-07 16:56:28 +0000 | [diff] [blame] | 45 | |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 46 | // Update the bits in reversed order so that emitInstrOpBits will get the |
| 47 | // correct endianness. |
| 48 | R->getValue("Inst")->setValue(NewBI); |
Misha Brukman | 28eefa5 | 2004-10-14 05:53:01 +0000 | [diff] [blame] | 49 | } |
| 50 | } |
| 51 | |
| 52 | |
Jim Laskey | cb12903 | 2006-07-13 22:17:08 +0000 | [diff] [blame] | 53 | // If the VarBitInit at position 'bit' matches the specified variable then |
| 54 | // return the variable bit position. Otherwise return -1. |
Dan Gohman | 9b03da6 | 2009-12-15 20:21:44 +0000 | [diff] [blame] | 55 | int CodeEmitterGen::getVariableBit(const std::string &VarName, |
Jim Laskey | cb12903 | 2006-07-13 22:17:08 +0000 | [diff] [blame] | 56 | BitsInit *BI, int bit) { |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 57 | if (VarBitInit *VBI = dynamic_cast<VarBitInit*>(BI->getBit(bit))) { |
| 58 | TypedInit *TI = VBI->getVariable(); |
Jim Grosbach | 8b892ae | 2010-10-07 16:56:28 +0000 | [diff] [blame] | 59 | |
Dan Gohman | 9b03da6 | 2009-12-15 20:21:44 +0000 | [diff] [blame] | 60 | if (VarInit *VI = dynamic_cast<VarInit*>(TI)) { |
| 61 | if (VI->getName() == VarName) return VBI->getBitNum(); |
| 62 | } |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 63 | } |
Jim Grosbach | 8b892ae | 2010-10-07 16:56:28 +0000 | [diff] [blame] | 64 | |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 65 | return -1; |
Jim Grosbach | 8b892ae | 2010-10-07 16:56:28 +0000 | [diff] [blame] | 66 | } |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 67 | |
| 68 | |
Daniel Dunbar | 1a55180 | 2009-07-03 00:10:29 +0000 | [diff] [blame] | 69 | void CodeEmitterGen::run(raw_ostream &o) { |
Misha Brukman | e2ba778 | 2004-08-10 18:31:01 +0000 | [diff] [blame] | 70 | CodeGenTarget Target; |
Chris Lattner | 048c00d | 2003-08-01 04:38:18 +0000 | [diff] [blame] | 71 | std::vector<Record*> Insts = Records.getAllDerivedDefinitions("Instruction"); |
Jim Grosbach | 8b892ae | 2010-10-07 16:56:28 +0000 | [diff] [blame] | 72 | |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 73 | // For little-endian instruction bit encodings, reverse the bit order |
| 74 | if (Target.isLittleEndianEncoding()) reverseBits(Insts); |
Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 75 | |
Chris Lattner | 0e5e49e | 2003-08-06 04:36:35 +0000 | [diff] [blame] | 76 | EmitSourceFileHeader("Machine Code Emitter", o); |
Misha Brukman | e2ba778 | 2004-08-10 18:31:01 +0000 | [diff] [blame] | 77 | std::string Namespace = Insts[0]->getValueAsString("Namespace") + "::"; |
Jim Grosbach | 8b892ae | 2010-10-07 16:56:28 +0000 | [diff] [blame] | 78 | |
Chris Lattner | f650278 | 2010-03-19 00:34:35 +0000 | [diff] [blame] | 79 | const std::vector<const CodeGenInstruction*> &NumberedInstructions = |
| 80 | Target.getInstructionsByEnumValue(); |
Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 81 | |
Misha Brukman | ad346ad | 2004-08-10 20:54:58 +0000 | [diff] [blame] | 82 | // Emit function declaration |
Misha Brukman | e2ba778 | 2004-08-10 18:31:01 +0000 | [diff] [blame] | 83 | o << "unsigned " << Target.getName() << "CodeEmitter::" |
Jim Grosbach | bade37b | 2010-10-08 00:21:28 +0000 | [diff] [blame] | 84 | << "getBinaryCodeForInstr(const MachineInstr &MI) const {\n"; |
Misha Brukman | ad346ad | 2004-08-10 20:54:58 +0000 | [diff] [blame] | 85 | |
Jim Laskey | ed39343 | 2006-07-12 19:15:43 +0000 | [diff] [blame] | 86 | // Emit instruction base values |
| 87 | o << " static const unsigned InstBits[] = {\n"; |
Chris Lattner | f650278 | 2010-03-19 00:34:35 +0000 | [diff] [blame] | 88 | for (std::vector<const CodeGenInstruction*>::const_iterator |
Jim Laskey | ed39343 | 2006-07-12 19:15:43 +0000 | [diff] [blame] | 89 | IN = NumberedInstructions.begin(), |
| 90 | EN = NumberedInstructions.end(); |
| 91 | IN != EN; ++IN) { |
| 92 | const CodeGenInstruction *CGI = *IN; |
| 93 | Record *R = CGI->TheDef; |
Jim Grosbach | 8b892ae | 2010-10-07 16:56:28 +0000 | [diff] [blame] | 94 | |
Jakob Stoklund Olesen | 65766ce | 2010-07-02 21:44:22 +0000 | [diff] [blame] | 95 | if (R->getValueAsString("Namespace") == "TargetOpcode") { |
Evan Cheng | bc95b23 | 2008-09-17 06:29:52 +0000 | [diff] [blame] | 96 | o << " 0U,\n"; |
Jim Laskey | ed39343 | 2006-07-12 19:15:43 +0000 | [diff] [blame] | 97 | continue; |
| 98 | } |
Jim Grosbach | 8b892ae | 2010-10-07 16:56:28 +0000 | [diff] [blame] | 99 | |
Chris Lattner | 6f334ad | 2003-08-01 04:46:24 +0000 | [diff] [blame] | 100 | BitsInit *BI = R->getValueAsBitsInit("Inst"); |
Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 101 | |
Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 102 | // Start by filling in fixed values... |
Reid Spencer | fa3e3b9 | 2006-11-03 01:48:30 +0000 | [diff] [blame] | 103 | unsigned Value = 0; |
Misha Brukman | cbfde0a | 2003-05-27 22:19:58 +0000 | [diff] [blame] | 104 | for (unsigned i = 0, e = BI->getNumBits(); i != e; ++i) { |
| 105 | if (BitInit *B = dynamic_cast<BitInit*>(BI->getBit(e-i-1))) { |
| 106 | Value |= B->getValue() << (e-i-1); |
Misha Brukman | cbfde0a | 2003-05-27 22:19:58 +0000 | [diff] [blame] | 107 | } |
| 108 | } |
Evan Cheng | bc95b23 | 2008-09-17 06:29:52 +0000 | [diff] [blame] | 109 | o << " " << Value << "U," << '\t' << "// " << R->getName() << "\n"; |
Jim Laskey | ed39343 | 2006-07-12 19:15:43 +0000 | [diff] [blame] | 110 | } |
Evan Cheng | bc95b23 | 2008-09-17 06:29:52 +0000 | [diff] [blame] | 111 | o << " 0U\n };\n"; |
Jim Grosbach | 8b892ae | 2010-10-07 16:56:28 +0000 | [diff] [blame] | 112 | |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 113 | // Map to accumulate all the cases. |
| 114 | std::map<std::string, std::vector<std::string> > CaseMap; |
Jim Grosbach | 8b892ae | 2010-10-07 16:56:28 +0000 | [diff] [blame] | 115 | |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 116 | // Construct all cases statement for each opcode |
| 117 | for (std::vector<Record*>::iterator IC = Insts.begin(), EC = Insts.end(); |
| 118 | IC != EC; ++IC) { |
| 119 | Record *R = *IC; |
Jakob Stoklund Olesen | 65766ce | 2010-07-02 21:44:22 +0000 | [diff] [blame] | 120 | if (R->getValueAsString("Namespace") == "TargetOpcode") |
| 121 | continue; |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 122 | const std::string &InstName = R->getName(); |
| 123 | std::string Case(""); |
Dan Gohman | f8c7394 | 2009-04-13 15:38:05 +0000 | [diff] [blame] | 124 | |
Jim Laskey | ed39343 | 2006-07-12 19:15:43 +0000 | [diff] [blame] | 125 | BitsInit *BI = R->getValueAsBitsInit("Inst"); |
| 126 | const std::vector<RecordVal> &Vals = R->getValues(); |
Chris Lattner | f30187a | 2010-03-19 00:07:20 +0000 | [diff] [blame] | 127 | CodeGenInstruction &CGI = Target.getInstruction(R); |
Jim Grosbach | 8b892ae | 2010-10-07 16:56:28 +0000 | [diff] [blame] | 128 | |
Misha Brukman | 28eefa5 | 2004-10-14 05:53:01 +0000 | [diff] [blame] | 129 | // Loop over all of the fields in the instruction, determining which are the |
Misha Brukman | 3da94ae | 2005-04-22 00:00:37 +0000 | [diff] [blame] | 130 | // operands to the instruction. |
Jim Grosbach | 0185507 | 2010-10-11 18:25:51 +0000 | [diff] [blame] | 131 | unsigned NumberedOp = 0; |
Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 132 | for (unsigned i = 0, e = Vals.size(); i != e; ++i) { |
Misha Brukman | 28eefa5 | 2004-10-14 05:53:01 +0000 | [diff] [blame] | 133 | if (!Vals[i].getPrefix() && !Vals[i].getValue()->isComplete()) { |
Misha Brukman | 7eac476 | 2003-07-15 21:00:32 +0000 | [diff] [blame] | 134 | // Is the operand continuous? If so, we can just mask and OR it in |
Misha Brukman | 3da94ae | 2005-04-22 00:00:37 +0000 | [diff] [blame] | 135 | // instead of doing it bit-by-bit, saving a lot in runtime cost. |
Dan Gohman | 9b03da6 | 2009-12-15 20:21:44 +0000 | [diff] [blame] | 136 | const std::string &VarName = Vals[i].getName(); |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 137 | bool gotOp = false; |
Jim Grosbach | 8b892ae | 2010-10-07 16:56:28 +0000 | [diff] [blame] | 138 | |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 139 | for (int bit = BI->getNumBits()-1; bit >= 0; ) { |
Dan Gohman | 9b03da6 | 2009-12-15 20:21:44 +0000 | [diff] [blame] | 140 | int varBit = getVariableBit(VarName, BI, bit); |
Jim Grosbach | 8b892ae | 2010-10-07 16:56:28 +0000 | [diff] [blame] | 141 | |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 142 | if (varBit == -1) { |
| 143 | --bit; |
| 144 | } else { |
| 145 | int beginInstBit = bit; |
| 146 | int beginVarBit = varBit; |
| 147 | int N = 1; |
Jim Grosbach | 8b892ae | 2010-10-07 16:56:28 +0000 | [diff] [blame] | 148 | |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 149 | for (--bit; bit >= 0;) { |
Dan Gohman | 9b03da6 | 2009-12-15 20:21:44 +0000 | [diff] [blame] | 150 | varBit = getVariableBit(VarName, BI, bit); |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 151 | if (varBit == -1 || varBit != (beginVarBit - N)) break; |
| 152 | ++N; |
| 153 | --bit; |
Chris Lattner | d7efef9 | 2003-08-05 03:53:04 +0000 | [diff] [blame] | 154 | } |
Misha Brukman | 3da94ae | 2005-04-22 00:00:37 +0000 | [diff] [blame] | 155 | |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 156 | if (!gotOp) { |
Jim Grosbach | 0185507 | 2010-10-11 18:25:51 +0000 | [diff] [blame] | 157 | |
| 158 | // If the operand matches by name, reference according to that |
| 159 | // operand number. Non-matching operands are assumed to be in |
| 160 | // order. |
| 161 | unsigned OpIdx; |
| 162 | if (CGI.hasOperandNamed(VarName, OpIdx)) { |
Jim Grosbach | 1a7233f | 2010-10-11 21:31:22 +0000 | [diff] [blame] | 163 | // Get the machine operand number for the indicated operand. |
| 164 | OpIdx = CGI.OperandList[OpIdx].MIOperandNo; |
Jim Grosbach | a1e2194 | 2010-10-11 21:41:31 +0000 | [diff] [blame^] | 165 | assert (!CGI.isFlatOperandNotEmitted(OpIdx) && |
| 166 | "Explicitly used operand also marked as not emitted!"); |
Jim Grosbach | 0185507 | 2010-10-11 18:25:51 +0000 | [diff] [blame] | 167 | } else { |
| 168 | /// If this operand is not supposed to be emitted by the |
| 169 | /// generated emitter, skip it. |
| 170 | while (CGI.isFlatOperandNotEmitted(NumberedOp)) |
| 171 | ++NumberedOp; |
| 172 | OpIdx = NumberedOp++; |
| 173 | } |
Jim Grosbach | 8b892ae | 2010-10-07 16:56:28 +0000 | [diff] [blame] | 174 | |
Dan Gohman | 9b03da6 | 2009-12-15 20:21:44 +0000 | [diff] [blame] | 175 | Case += " // op: " + VarName + "\n" |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 176 | + " op = getMachineOpValue(MI, MI.getOperand(" |
Jim Grosbach | 0185507 | 2010-10-11 18:25:51 +0000 | [diff] [blame] | 177 | + utostr(OpIdx) + "));\n"; |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 178 | gotOp = true; |
| 179 | } |
Jim Grosbach | 8b892ae | 2010-10-07 16:56:28 +0000 | [diff] [blame] | 180 | |
Chris Lattner | 1cfa077 | 2008-10-05 18:31:58 +0000 | [diff] [blame] | 181 | unsigned opMask = ~0U >> (32-N); |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 182 | int opShift = beginVarBit - N + 1; |
| 183 | opMask <<= opShift; |
| 184 | opShift = beginInstBit - beginVarBit; |
Jim Grosbach | 8b892ae | 2010-10-07 16:56:28 +0000 | [diff] [blame] | 185 | |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 186 | if (opShift > 0) { |
| 187 | Case += " Value |= (op & " + utostr(opMask) + "U) << " |
| 188 | + itostr(opShift) + ";\n"; |
| 189 | } else if (opShift < 0) { |
| 190 | Case += " Value |= (op & " + utostr(opMask) + "U) >> " |
| 191 | + itostr(-opShift) + ";\n"; |
| 192 | } else { |
| 193 | Case += " Value |= op & " + utostr(opMask) + "U;\n"; |
| 194 | } |
Chris Lattner | d7efef9 | 2003-08-05 03:53:04 +0000 | [diff] [blame] | 195 | } |
Misha Brukman | 7eac476 | 2003-07-15 21:00:32 +0000 | [diff] [blame] | 196 | } |
Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 197 | } |
| 198 | } |
| 199 | |
Chris Lattner | f64f9a4 | 2006-11-15 23:23:02 +0000 | [diff] [blame] | 200 | std::vector<std::string> &InstList = CaseMap[Case]; |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 201 | InstList.push_back(InstName); |
| 202 | } |
Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 203 | |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 204 | |
| 205 | // Emit initial function code |
| 206 | o << " const unsigned opcode = MI.getOpcode();\n" |
| 207 | << " unsigned Value = InstBits[opcode];\n" |
Evan Cheng | e3e3626 | 2008-09-07 09:00:57 +0000 | [diff] [blame] | 208 | << " unsigned op = 0;\n" |
Evan Cheng | acff339 | 2008-09-02 06:51:36 +0000 | [diff] [blame] | 209 | << " op = op; // suppress warning\n" |
Jim Laskey | f1b05bf | 2006-07-13 21:02:53 +0000 | [diff] [blame] | 210 | << " switch (opcode) {\n"; |
| 211 | |
| 212 | // Emit each case statement |
| 213 | std::map<std::string, std::vector<std::string> >::iterator IE, EE; |
| 214 | for (IE = CaseMap.begin(), EE = CaseMap.end(); IE != EE; ++IE) { |
| 215 | const std::string &Case = IE->first; |
| 216 | std::vector<std::string> &InstList = IE->second; |
| 217 | |
| 218 | for (int i = 0, N = InstList.size(); i < N; i++) { |
| 219 | if (i) o << "\n"; |
| 220 | o << " case " << Namespace << InstList[i] << ":"; |
| 221 | } |
| 222 | o << " {\n"; |
| 223 | o << Case; |
Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 224 | o << " break;\n" |
| 225 | << " }\n"; |
| 226 | } |
Misha Brukman | 7eac476 | 2003-07-15 21:00:32 +0000 | [diff] [blame] | 227 | |
Misha Brukman | 28eefa5 | 2004-10-14 05:53:01 +0000 | [diff] [blame] | 228 | // Default case: unhandled opcode |
Misha Brukman | cbfde0a | 2003-05-27 22:19:58 +0000 | [diff] [blame] | 229 | o << " default:\n" |
Torok Edwin | 804e0fe | 2009-07-08 19:04:27 +0000 | [diff] [blame] | 230 | << " std::string msg;\n" |
| 231 | << " raw_string_ostream Msg(msg);\n" |
| 232 | << " Msg << \"Not supported instr: \" << MI;\n" |
Chris Lattner | 75361b6 | 2010-04-07 22:58:41 +0000 | [diff] [blame] | 233 | << " report_fatal_error(Msg.str());\n" |
Misha Brukman | cbfde0a | 2003-05-27 22:19:58 +0000 | [diff] [blame] | 234 | << " }\n" |
Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 235 | << " return Value;\n" |
Misha Brukman | 28eefa5 | 2004-10-14 05:53:01 +0000 | [diff] [blame] | 236 | << "}\n\n"; |
Misha Brukman | 9fff7e1 | 2003-05-24 00:15:53 +0000 | [diff] [blame] | 237 | } |