| OLD | NEW |
| 1 //===- subzero/src/IceTargetLoweringX8632.cpp - x86-32 lowering -----------===// | 1 //===- subzero/src/IceTargetLoweringX8632.cpp - x86-32 lowering -----------===// |
| 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 TargetLoweringX8632 class, which | 10 // This file implements the TargetLoweringX8632 class, which |
| (...skipping 2000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2011 } | 2011 } |
| 2012 if (Src0RM->getType() == IceType_i1) { | 2012 if (Src0RM->getType() == IceType_i1) { |
| 2013 Constant *One = Ctx->getConstantInt32(IceType_i32, 1); | 2013 Constant *One = Ctx->getConstantInt32(IceType_i32, 1); |
| 2014 _and(Tmp, One); | 2014 _and(Tmp, One); |
| 2015 } | 2015 } |
| 2016 _mov(DestLo, Tmp); | 2016 _mov(DestLo, Tmp); |
| 2017 _mov(DestHi, Zero); | 2017 _mov(DestHi, Zero); |
| 2018 } else if (Src0RM->getType() == IceType_i1) { | 2018 } else if (Src0RM->getType() == IceType_i1) { |
| 2019 // t = Src0RM; t &= 1; Dest = t | 2019 // t = Src0RM; t &= 1; Dest = t |
| 2020 Constant *One = Ctx->getConstantInt32(IceType_i32, 1); | 2020 Constant *One = Ctx->getConstantInt32(IceType_i32, 1); |
| 2021 Variable *T = makeReg(IceType_i32); | 2021 Type DestTy = Dest->getType(); |
| 2022 _movzx(T, Src0RM); | 2022 Variable *T; |
| 2023 if (DestTy == IceType_i8) { |
| 2024 T = makeReg(DestTy); |
| 2025 _mov(T, Src0RM); |
| 2026 } else { |
| 2027 // Use 32-bit for both 16-bit and 32-bit, since 32-bit ops are shorter. |
| 2028 T = makeReg(IceType_i32); |
| 2029 _movzx(T, Src0RM); |
| 2030 } |
| 2023 _and(T, One); | 2031 _and(T, One); |
| 2024 _mov(Dest, T); | 2032 _mov(Dest, T); |
| 2025 } else { | 2033 } else { |
| 2026 // t1 = movzx src; dst = t1 | 2034 // t1 = movzx src; dst = t1 |
| 2027 Variable *T = makeReg(Dest->getType()); | 2035 Variable *T = makeReg(Dest->getType()); |
| 2028 _movzx(T, Src0RM); | 2036 _movzx(T, Src0RM); |
| 2029 _mov(Dest, T); | 2037 _mov(Dest, T); |
| 2030 } | 2038 } |
| 2031 break; | 2039 break; |
| 2032 } | 2040 } |
| (...skipping 2484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4517 } else if (IsConstant || IsExternal) | 4525 } else if (IsConstant || IsExternal) |
| 4518 Str << "\t.zero\t" << Size << "\n"; | 4526 Str << "\t.zero\t" << Size << "\n"; |
| 4519 // Size is part of .comm. | 4527 // Size is part of .comm. |
| 4520 | 4528 |
| 4521 if (IsConstant || HasInitializer || IsExternal) | 4529 if (IsConstant || HasInitializer || IsExternal) |
| 4522 Str << "\t.size\t" << MangledName << ", " << Size << "\n"; | 4530 Str << "\t.size\t" << MangledName << ", " << Size << "\n"; |
| 4523 // Size is part of .comm. | 4531 // Size is part of .comm. |
| 4524 } | 4532 } |
| 4525 | 4533 |
| 4526 } // end of namespace Ice | 4534 } // end of namespace Ice |
| OLD | NEW |