OLD | NEW |
1 //===- subzero/src/IceInstX8632.cpp - X86-32 instruction implementation ---===// | 1 //===- subzero/src/IceInstX8632.cpp - X86-32 instruction implementation ---===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
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 implements the InstX8632 and OperandX8632 classes, | 10 // This file implements the InstX8632 and OperandX8632 classes, |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 | 311 |
312 InstX8632Fld::InstX8632Fld(Cfg *Func, Operand *Src) | 312 InstX8632Fld::InstX8632Fld(Cfg *Func, Operand *Src) |
313 : InstX8632(Func, InstX8632::Fld, 1, nullptr) { | 313 : InstX8632(Func, InstX8632::Fld, 1, nullptr) { |
314 addSource(Src); | 314 addSource(Src); |
315 } | 315 } |
316 | 316 |
317 InstX8632Fstp::InstX8632Fstp(Cfg *Func, Variable *Dest) | 317 InstX8632Fstp::InstX8632Fstp(Cfg *Func, Variable *Dest) |
318 : InstX8632(Func, InstX8632::Fstp, 0, Dest) {} | 318 : InstX8632(Func, InstX8632::Fstp, 0, Dest) {} |
319 | 319 |
320 InstX8632Pop::InstX8632Pop(Cfg *Func, Variable *Dest) | 320 InstX8632Pop::InstX8632Pop(Cfg *Func, Variable *Dest) |
321 : InstX8632(Func, InstX8632::Pop, 0, Dest) {} | 321 : InstX8632(Func, InstX8632::Pop, 0, Dest) { |
| 322 // A pop instruction affects the stack pointer and so it should not |
| 323 // be allowed to be automatically dead-code eliminated. (The |
| 324 // corresponding push instruction doesn't need this treatment |
| 325 // because it has no dest variable and therefore won't be dead-code |
| 326 // eliminated.) This is needed for late-stage liveness analysis |
| 327 // (e.g. asm-verbose mode). |
| 328 HasSideEffects = true; |
| 329 } |
322 | 330 |
323 InstX8632Push::InstX8632Push(Cfg *Func, Variable *Source) | 331 InstX8632Push::InstX8632Push(Cfg *Func, Variable *Source) |
324 : InstX8632(Func, InstX8632::Push, 1, nullptr) { | 332 : InstX8632(Func, InstX8632::Push, 1, nullptr) { |
325 addSource(Source); | 333 addSource(Source); |
326 } | 334 } |
327 | 335 |
328 InstX8632Ret::InstX8632Ret(Cfg *Func, Variable *Source) | 336 InstX8632Ret::InstX8632Ret(Cfg *Func, Variable *Source) |
329 : InstX8632(Func, InstX8632::Ret, Source ? 1 : 0, nullptr) { | 337 : InstX8632(Func, InstX8632::Ret, Source ? 1 : 0, nullptr) { |
330 if (Source) | 338 if (Source) |
331 addSource(Source); | 339 addSource(Source); |
(...skipping 2606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2938 } | 2946 } |
2939 Str << "("; | 2947 Str << "("; |
2940 if (Func) | 2948 if (Func) |
2941 Var->dump(Func); | 2949 Var->dump(Func); |
2942 else | 2950 else |
2943 Var->dump(Str); | 2951 Var->dump(Str); |
2944 Str << ")"; | 2952 Str << ")"; |
2945 } | 2953 } |
2946 | 2954 |
2947 } // end of namespace Ice | 2955 } // end of namespace Ice |
OLD | NEW |