Daniel Dunbar | 28c251b | 2009-08-31 08:06:59 +0000 | [diff] [blame] | 1 | //===- MCExpr.cpp - Assembly Level Expression Implementation --------------===// |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
Daniel Dunbar | 28c251b | 2009-08-31 08:06:59 +0000 | [diff] [blame] | 10 | #include "llvm/MC/MCExpr.h" |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 11 | #include "llvm/MC/MCContext.h" |
Daniel Dunbar | 15d1707 | 2009-06-30 01:49:52 +0000 | [diff] [blame] | 12 | #include "llvm/MC/MCSymbol.h" |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 13 | #include "llvm/MC/MCValue.h" |
David Greene | 5d2bcb1 | 2010-01-05 01:28:07 +0000 | [diff] [blame] | 14 | #include "llvm/Support/Debug.h" |
Daniel Dunbar | 87392fd | 2009-08-31 08:07:33 +0000 | [diff] [blame] | 15 | #include "llvm/Support/raw_ostream.h" |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 16 | using namespace llvm; |
| 17 | |
Chris Lattner | 8cb9a3b | 2010-01-18 00:37:40 +0000 | [diff] [blame] | 18 | void MCExpr::print(raw_ostream &OS) const { |
Daniel Dunbar | 87392fd | 2009-08-31 08:07:33 +0000 | [diff] [blame] | 19 | switch (getKind()) { |
| 20 | case MCExpr::Constant: |
| 21 | OS << cast<MCConstantExpr>(*this).getValue(); |
| 22 | return; |
| 23 | |
Chris Lattner | d50c2b9 | 2009-09-08 23:20:50 +0000 | [diff] [blame] | 24 | case MCExpr::SymbolRef: { |
| 25 | const MCSymbol &Sym = cast<MCSymbolRefExpr>(*this).getSymbol(); |
| 26 | |
| 27 | // Parenthesize names that start with $ so that they don't look like |
| 28 | // absolute names. |
Chris Lattner | 10b318b | 2010-01-17 21:43:43 +0000 | [diff] [blame] | 29 | if (Sym.getName()[0] == '$') |
| 30 | OS << '(' << Sym << ')'; |
| 31 | else |
| 32 | OS << Sym; |
Daniel Dunbar | 87392fd | 2009-08-31 08:07:33 +0000 | [diff] [blame] | 33 | return; |
Chris Lattner | d50c2b9 | 2009-09-08 23:20:50 +0000 | [diff] [blame] | 34 | } |
Daniel Dunbar | 87392fd | 2009-08-31 08:07:33 +0000 | [diff] [blame] | 35 | |
| 36 | case MCExpr::Unary: { |
| 37 | const MCUnaryExpr &UE = cast<MCUnaryExpr>(*this); |
| 38 | switch (UE.getOpcode()) { |
| 39 | default: assert(0 && "Invalid opcode!"); |
| 40 | case MCUnaryExpr::LNot: OS << '!'; break; |
| 41 | case MCUnaryExpr::Minus: OS << '-'; break; |
| 42 | case MCUnaryExpr::Not: OS << '~'; break; |
| 43 | case MCUnaryExpr::Plus: OS << '+'; break; |
| 44 | } |
Chris Lattner | 8cb9a3b | 2010-01-18 00:37:40 +0000 | [diff] [blame] | 45 | OS << *UE.getSubExpr(); |
Daniel Dunbar | 87392fd | 2009-08-31 08:07:33 +0000 | [diff] [blame] | 46 | return; |
| 47 | } |
| 48 | |
| 49 | case MCExpr::Binary: { |
| 50 | const MCBinaryExpr &BE = cast<MCBinaryExpr>(*this); |
Chris Lattner | be73e8c | 2009-09-08 06:34:07 +0000 | [diff] [blame] | 51 | |
| 52 | // Only print parens around the LHS if it is non-trivial. |
| 53 | if (isa<MCConstantExpr>(BE.getLHS()) || isa<MCSymbolRefExpr>(BE.getLHS())) { |
Chris Lattner | 8cb9a3b | 2010-01-18 00:37:40 +0000 | [diff] [blame] | 54 | OS << *BE.getLHS(); |
Chris Lattner | be73e8c | 2009-09-08 06:34:07 +0000 | [diff] [blame] | 55 | } else { |
Chris Lattner | 8cb9a3b | 2010-01-18 00:37:40 +0000 | [diff] [blame] | 56 | OS << '(' << *BE.getLHS() << ')'; |
Chris Lattner | be73e8c | 2009-09-08 06:34:07 +0000 | [diff] [blame] | 57 | } |
| 58 | |
Daniel Dunbar | 87392fd | 2009-08-31 08:07:33 +0000 | [diff] [blame] | 59 | switch (BE.getOpcode()) { |
| 60 | default: assert(0 && "Invalid opcode!"); |
Chris Lattner | d19ceb9 | 2009-09-08 06:37:35 +0000 | [diff] [blame] | 61 | case MCBinaryExpr::Add: |
| 62 | // Print "X-42" instead of "X+-42". |
| 63 | if (const MCConstantExpr *RHSC = dyn_cast<MCConstantExpr>(BE.getRHS())) { |
| 64 | if (RHSC->getValue() < 0) { |
| 65 | OS << RHSC->getValue(); |
| 66 | return; |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | OS << '+'; |
| 71 | break; |
Daniel Dunbar | 87392fd | 2009-08-31 08:07:33 +0000 | [diff] [blame] | 72 | case MCBinaryExpr::And: OS << '&'; break; |
| 73 | case MCBinaryExpr::Div: OS << '/'; break; |
| 74 | case MCBinaryExpr::EQ: OS << "=="; break; |
| 75 | case MCBinaryExpr::GT: OS << '>'; break; |
| 76 | case MCBinaryExpr::GTE: OS << ">="; break; |
| 77 | case MCBinaryExpr::LAnd: OS << "&&"; break; |
| 78 | case MCBinaryExpr::LOr: OS << "||"; break; |
| 79 | case MCBinaryExpr::LT: OS << '<'; break; |
| 80 | case MCBinaryExpr::LTE: OS << "<="; break; |
| 81 | case MCBinaryExpr::Mod: OS << '%'; break; |
| 82 | case MCBinaryExpr::Mul: OS << '*'; break; |
| 83 | case MCBinaryExpr::NE: OS << "!="; break; |
| 84 | case MCBinaryExpr::Or: OS << '|'; break; |
| 85 | case MCBinaryExpr::Shl: OS << "<<"; break; |
| 86 | case MCBinaryExpr::Shr: OS << ">>"; break; |
| 87 | case MCBinaryExpr::Sub: OS << '-'; break; |
| 88 | case MCBinaryExpr::Xor: OS << '^'; break; |
| 89 | } |
Chris Lattner | be73e8c | 2009-09-08 06:34:07 +0000 | [diff] [blame] | 90 | |
| 91 | // Only print parens around the LHS if it is non-trivial. |
| 92 | if (isa<MCConstantExpr>(BE.getRHS()) || isa<MCSymbolRefExpr>(BE.getRHS())) { |
Chris Lattner | 8cb9a3b | 2010-01-18 00:37:40 +0000 | [diff] [blame] | 93 | OS << *BE.getRHS(); |
Chris Lattner | be73e8c | 2009-09-08 06:34:07 +0000 | [diff] [blame] | 94 | } else { |
Chris Lattner | 8cb9a3b | 2010-01-18 00:37:40 +0000 | [diff] [blame] | 95 | OS << '(' << *BE.getRHS() << ')'; |
Chris Lattner | be73e8c | 2009-09-08 06:34:07 +0000 | [diff] [blame] | 96 | } |
Daniel Dunbar | 87392fd | 2009-08-31 08:07:33 +0000 | [diff] [blame] | 97 | return; |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | assert(0 && "Invalid expression kind!"); |
| 102 | } |
| 103 | |
| 104 | void MCExpr::dump() const { |
Chris Lattner | 8cb9a3b | 2010-01-18 00:37:40 +0000 | [diff] [blame] | 105 | print(dbgs()); |
David Greene | 5d2bcb1 | 2010-01-05 01:28:07 +0000 | [diff] [blame] | 106 | dbgs() << '\n'; |
Daniel Dunbar | 87392fd | 2009-08-31 08:07:33 +0000 | [diff] [blame] | 107 | } |
| 108 | |
| 109 | /* *** */ |
| 110 | |
Chris Lattner | 8b4ada2 | 2009-09-08 06:27:48 +0000 | [diff] [blame] | 111 | const MCBinaryExpr *MCBinaryExpr::Create(Opcode Opc, const MCExpr *LHS, |
| 112 | const MCExpr *RHS, MCContext &Ctx) { |
Daniel Dunbar | 9643ac5 | 2009-08-31 08:07:22 +0000 | [diff] [blame] | 113 | return new (Ctx) MCBinaryExpr(Opc, LHS, RHS); |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 114 | } |
| 115 | |
Chris Lattner | 8b4ada2 | 2009-09-08 06:27:48 +0000 | [diff] [blame] | 116 | const MCUnaryExpr *MCUnaryExpr::Create(Opcode Opc, const MCExpr *Expr, |
| 117 | MCContext &Ctx) { |
Daniel Dunbar | 9643ac5 | 2009-08-31 08:07:22 +0000 | [diff] [blame] | 118 | return new (Ctx) MCUnaryExpr(Opc, Expr); |
| 119 | } |
| 120 | |
| 121 | const MCConstantExpr *MCConstantExpr::Create(int64_t Value, MCContext &Ctx) { |
| 122 | return new (Ctx) MCConstantExpr(Value); |
| 123 | } |
| 124 | |
| 125 | const MCSymbolRefExpr *MCSymbolRefExpr::Create(const MCSymbol *Sym, |
| 126 | MCContext &Ctx) { |
| 127 | return new (Ctx) MCSymbolRefExpr(Sym); |
| 128 | } |
| 129 | |
Daniel Dunbar | 2928c83 | 2009-11-06 10:58:06 +0000 | [diff] [blame] | 130 | const MCSymbolRefExpr *MCSymbolRefExpr::Create(StringRef Name, MCContext &Ctx) { |
Chris Lattner | 4f3e7aa | 2009-09-16 01:26:31 +0000 | [diff] [blame] | 131 | return Create(Ctx.GetOrCreateSymbol(Name), Ctx); |
| 132 | } |
| 133 | |
| 134 | |
Daniel Dunbar | 9643ac5 | 2009-08-31 08:07:22 +0000 | [diff] [blame] | 135 | /* *** */ |
| 136 | |
Daniel Dunbar | e00b011 | 2009-10-16 01:57:52 +0000 | [diff] [blame] | 137 | bool MCExpr::EvaluateAsAbsolute(int64_t &Res) const { |
Daniel Dunbar | 15d1707 | 2009-06-30 01:49:52 +0000 | [diff] [blame] | 138 | MCValue Value; |
| 139 | |
Daniel Dunbar | e00b011 | 2009-10-16 01:57:52 +0000 | [diff] [blame] | 140 | if (!EvaluateAsRelocatable(Value) || !Value.isAbsolute()) |
Daniel Dunbar | 15d1707 | 2009-06-30 01:49:52 +0000 | [diff] [blame] | 141 | return false; |
| 142 | |
| 143 | Res = Value.getConstant(); |
| 144 | return true; |
| 145 | } |
| 146 | |
Daniel Dunbar | d644c32 | 2009-08-26 09:16:46 +0000 | [diff] [blame] | 147 | static bool EvaluateSymbolicAdd(const MCValue &LHS, const MCSymbol *RHS_A, |
| 148 | const MCSymbol *RHS_B, int64_t RHS_Cst, |
Daniel Dunbar | 3597604 | 2009-06-30 02:08:27 +0000 | [diff] [blame] | 149 | MCValue &Res) { |
| 150 | // We can't add or subtract two symbols. |
| 151 | if ((LHS.getSymA() && RHS_A) || |
| 152 | (LHS.getSymB() && RHS_B)) |
| 153 | return false; |
| 154 | |
Daniel Dunbar | d644c32 | 2009-08-26 09:16:46 +0000 | [diff] [blame] | 155 | const MCSymbol *A = LHS.getSymA() ? LHS.getSymA() : RHS_A; |
| 156 | const MCSymbol *B = LHS.getSymB() ? LHS.getSymB() : RHS_B; |
Daniel Dunbar | 3597604 | 2009-06-30 02:08:27 +0000 | [diff] [blame] | 157 | if (B) { |
Daniel Dunbar | 374d8bd | 2009-06-30 22:49:27 +0000 | [diff] [blame] | 158 | // If we have a negated symbol, then we must have also have a non-negated |
| 159 | // symbol in order to encode the expression. We can do this check later to |
| 160 | // permit expressions which eventually fold to a representable form -- such |
Daniel Dunbar | 3597604 | 2009-06-30 02:08:27 +0000 | [diff] [blame] | 161 | // as (a + (0 - b)) -- if necessary. |
Daniel Dunbar | 374d8bd | 2009-06-30 22:49:27 +0000 | [diff] [blame] | 162 | if (!A) |
Daniel Dunbar | 3597604 | 2009-06-30 02:08:27 +0000 | [diff] [blame] | 163 | return false; |
| 164 | } |
| 165 | Res = MCValue::get(A, B, LHS.getConstant() + RHS_Cst); |
| 166 | return true; |
| 167 | } |
| 168 | |
Daniel Dunbar | e00b011 | 2009-10-16 01:57:52 +0000 | [diff] [blame] | 169 | bool MCExpr::EvaluateAsRelocatable(MCValue &Res) const { |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 170 | switch (getKind()) { |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 171 | case Constant: |
Daniel Dunbar | 28c251b | 2009-08-31 08:06:59 +0000 | [diff] [blame] | 172 | Res = MCValue::get(cast<MCConstantExpr>(this)->getValue()); |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 173 | return true; |
| 174 | |
| 175 | case SymbolRef: { |
Daniel Dunbar | 9643ac5 | 2009-08-31 08:07:22 +0000 | [diff] [blame] | 176 | const MCSymbol &Sym = cast<MCSymbolRefExpr>(this)->getSymbol(); |
Daniel Dunbar | 7c3600d | 2009-10-16 01:33:57 +0000 | [diff] [blame] | 177 | |
| 178 | // Evaluate recursively if this is a variable. |
| 179 | if (Sym.isVariable()) |
Daniel Dunbar | e00b011 | 2009-10-16 01:57:52 +0000 | [diff] [blame] | 180 | return Sym.getValue()->EvaluateAsRelocatable(Res); |
Daniel Dunbar | 7c3600d | 2009-10-16 01:33:57 +0000 | [diff] [blame] | 181 | |
Daniel Dunbar | e579849 | 2009-10-16 01:33:11 +0000 | [diff] [blame] | 182 | Res = MCValue::get(&Sym, 0, 0); |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 183 | return true; |
| 184 | } |
| 185 | |
| 186 | case Unary: { |
Daniel Dunbar | 28c251b | 2009-08-31 08:06:59 +0000 | [diff] [blame] | 187 | const MCUnaryExpr *AUE = cast<MCUnaryExpr>(this); |
Daniel Dunbar | 15d1707 | 2009-06-30 01:49:52 +0000 | [diff] [blame] | 188 | MCValue Value; |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 189 | |
Daniel Dunbar | e00b011 | 2009-10-16 01:57:52 +0000 | [diff] [blame] | 190 | if (!AUE->getSubExpr()->EvaluateAsRelocatable(Value)) |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 191 | return false; |
| 192 | |
| 193 | switch (AUE->getOpcode()) { |
Daniel Dunbar | 28c251b | 2009-08-31 08:06:59 +0000 | [diff] [blame] | 194 | case MCUnaryExpr::LNot: |
Daniel Dunbar | 80f62d0 | 2009-07-01 06:48:00 +0000 | [diff] [blame] | 195 | if (!Value.isAbsolute()) |
Daniel Dunbar | 15d1707 | 2009-06-30 01:49:52 +0000 | [diff] [blame] | 196 | return false; |
| 197 | Res = MCValue::get(!Value.getConstant()); |
| 198 | break; |
Daniel Dunbar | 28c251b | 2009-08-31 08:06:59 +0000 | [diff] [blame] | 199 | case MCUnaryExpr::Minus: |
Daniel Dunbar | 15d1707 | 2009-06-30 01:49:52 +0000 | [diff] [blame] | 200 | /// -(a - b + const) ==> (b - a - const) |
Daniel Dunbar | b27a41b | 2009-08-11 17:47:52 +0000 | [diff] [blame] | 201 | if (Value.getSymA() && !Value.getSymB()) |
Daniel Dunbar | 15d1707 | 2009-06-30 01:49:52 +0000 | [diff] [blame] | 202 | return false; |
| 203 | Res = MCValue::get(Value.getSymB(), Value.getSymA(), |
| 204 | -Value.getConstant()); |
| 205 | break; |
Daniel Dunbar | 28c251b | 2009-08-31 08:06:59 +0000 | [diff] [blame] | 206 | case MCUnaryExpr::Not: |
Daniel Dunbar | 80f62d0 | 2009-07-01 06:48:00 +0000 | [diff] [blame] | 207 | if (!Value.isAbsolute()) |
Daniel Dunbar | 15d1707 | 2009-06-30 01:49:52 +0000 | [diff] [blame] | 208 | return false; |
| 209 | Res = MCValue::get(~Value.getConstant()); |
| 210 | break; |
Daniel Dunbar | 28c251b | 2009-08-31 08:06:59 +0000 | [diff] [blame] | 211 | case MCUnaryExpr::Plus: |
Daniel Dunbar | 15d1707 | 2009-06-30 01:49:52 +0000 | [diff] [blame] | 212 | Res = Value; |
| 213 | break; |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 214 | } |
| 215 | |
| 216 | return true; |
| 217 | } |
| 218 | |
| 219 | case Binary: { |
Daniel Dunbar | 28c251b | 2009-08-31 08:06:59 +0000 | [diff] [blame] | 220 | const MCBinaryExpr *ABE = cast<MCBinaryExpr>(this); |
Daniel Dunbar | 15d1707 | 2009-06-30 01:49:52 +0000 | [diff] [blame] | 221 | MCValue LHSValue, RHSValue; |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 222 | |
Daniel Dunbar | e00b011 | 2009-10-16 01:57:52 +0000 | [diff] [blame] | 223 | if (!ABE->getLHS()->EvaluateAsRelocatable(LHSValue) || |
| 224 | !ABE->getRHS()->EvaluateAsRelocatable(RHSValue)) |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 225 | return false; |
| 226 | |
Daniel Dunbar | 15d1707 | 2009-06-30 01:49:52 +0000 | [diff] [blame] | 227 | // We only support a few operations on non-constant expressions, handle |
| 228 | // those first. |
Daniel Dunbar | 80f62d0 | 2009-07-01 06:48:00 +0000 | [diff] [blame] | 229 | if (!LHSValue.isAbsolute() || !RHSValue.isAbsolute()) { |
Daniel Dunbar | 15d1707 | 2009-06-30 01:49:52 +0000 | [diff] [blame] | 230 | switch (ABE->getOpcode()) { |
| 231 | default: |
| 232 | return false; |
Daniel Dunbar | 28c251b | 2009-08-31 08:06:59 +0000 | [diff] [blame] | 233 | case MCBinaryExpr::Sub: |
Daniel Dunbar | 3597604 | 2009-06-30 02:08:27 +0000 | [diff] [blame] | 234 | // Negate RHS and add. |
| 235 | return EvaluateSymbolicAdd(LHSValue, |
| 236 | RHSValue.getSymB(), RHSValue.getSymA(), |
| 237 | -RHSValue.getConstant(), |
| 238 | Res); |
| 239 | |
Daniel Dunbar | 28c251b | 2009-08-31 08:06:59 +0000 | [diff] [blame] | 240 | case MCBinaryExpr::Add: |
Daniel Dunbar | 3597604 | 2009-06-30 02:08:27 +0000 | [diff] [blame] | 241 | return EvaluateSymbolicAdd(LHSValue, |
| 242 | RHSValue.getSymA(), RHSValue.getSymB(), |
| 243 | RHSValue.getConstant(), |
| 244 | Res); |
Daniel Dunbar | 15d1707 | 2009-06-30 01:49:52 +0000 | [diff] [blame] | 245 | } |
| 246 | } |
| 247 | |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 248 | // FIXME: We need target hooks for the evaluation. It may be limited in |
| 249 | // width, and gas defines the result of comparisons differently from Apple |
| 250 | // as (the result is sign extended). |
Daniel Dunbar | b79742c | 2009-06-30 16:02:47 +0000 | [diff] [blame] | 251 | int64_t LHS = LHSValue.getConstant(), RHS = RHSValue.getConstant(); |
| 252 | int64_t Result = 0; |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 253 | switch (ABE->getOpcode()) { |
Daniel Dunbar | 28c251b | 2009-08-31 08:06:59 +0000 | [diff] [blame] | 254 | case MCBinaryExpr::Add: Result = LHS + RHS; break; |
| 255 | case MCBinaryExpr::And: Result = LHS & RHS; break; |
| 256 | case MCBinaryExpr::Div: Result = LHS / RHS; break; |
| 257 | case MCBinaryExpr::EQ: Result = LHS == RHS; break; |
| 258 | case MCBinaryExpr::GT: Result = LHS > RHS; break; |
| 259 | case MCBinaryExpr::GTE: Result = LHS >= RHS; break; |
| 260 | case MCBinaryExpr::LAnd: Result = LHS && RHS; break; |
| 261 | case MCBinaryExpr::LOr: Result = LHS || RHS; break; |
| 262 | case MCBinaryExpr::LT: Result = LHS < RHS; break; |
| 263 | case MCBinaryExpr::LTE: Result = LHS <= RHS; break; |
| 264 | case MCBinaryExpr::Mod: Result = LHS % RHS; break; |
| 265 | case MCBinaryExpr::Mul: Result = LHS * RHS; break; |
| 266 | case MCBinaryExpr::NE: Result = LHS != RHS; break; |
| 267 | case MCBinaryExpr::Or: Result = LHS | RHS; break; |
| 268 | case MCBinaryExpr::Shl: Result = LHS << RHS; break; |
| 269 | case MCBinaryExpr::Shr: Result = LHS >> RHS; break; |
| 270 | case MCBinaryExpr::Sub: Result = LHS - RHS; break; |
| 271 | case MCBinaryExpr::Xor: Result = LHS ^ RHS; break; |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 272 | } |
| 273 | |
Daniel Dunbar | 15d1707 | 2009-06-30 01:49:52 +0000 | [diff] [blame] | 274 | Res = MCValue::get(Result); |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 275 | return true; |
| 276 | } |
| 277 | } |
Daniel Dunbar | fc6877a | 2009-06-29 20:40:36 +0000 | [diff] [blame] | 278 | |
Daniel Dunbar | 9643ac5 | 2009-08-31 08:07:22 +0000 | [diff] [blame] | 279 | assert(0 && "Invalid assembly expression kind!"); |
| 280 | return false; |
| 281 | } |