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 asm-verbose mode. | |
jvoung (off chromium)
2015/04/29 16:41:35
Could this be described more generically (vs "for
Jim Stichnoth
2015/04/29 17:15:27
OK, I added "late-stage liveness analysis" to the
| |
327 HasSideEffects = true; | |
328 } | |
322 | 329 |
323 InstX8632Push::InstX8632Push(Cfg *Func, Variable *Source) | 330 InstX8632Push::InstX8632Push(Cfg *Func, Variable *Source) |
324 : InstX8632(Func, InstX8632::Push, 1, nullptr) { | 331 : InstX8632(Func, InstX8632::Push, 1, nullptr) { |
325 addSource(Source); | 332 addSource(Source); |
326 } | 333 } |
327 | 334 |
328 InstX8632Ret::InstX8632Ret(Cfg *Func, Variable *Source) | 335 InstX8632Ret::InstX8632Ret(Cfg *Func, Variable *Source) |
329 : InstX8632(Func, InstX8632::Ret, Source ? 1 : 0, nullptr) { | 336 : InstX8632(Func, InstX8632::Ret, Source ? 1 : 0, nullptr) { |
330 if (Source) | 337 if (Source) |
331 addSource(Source); | 338 addSource(Source); |
(...skipping 2606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2938 } | 2945 } |
2939 Str << "("; | 2946 Str << "("; |
2940 if (Func) | 2947 if (Func) |
2941 Var->dump(Func); | 2948 Var->dump(Func); |
2942 else | 2949 else |
2943 Var->dump(Str); | 2950 Var->dump(Str); |
2944 Str << ")"; | 2951 Str << ")"; |
2945 } | 2952 } |
2946 | 2953 |
2947 } // end of namespace Ice | 2954 } // end of namespace Ice |
OLD | NEW |