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 /// \file | 10 /// \file |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 Inst *FakeUse = InstFakeUse::create(Func, ReturnReg); | 256 Inst *FakeUse = InstFakeUse::create(Func, ReturnReg); |
257 Context.insert(FakeUse); | 257 Context.insert(FakeUse); |
258 } | 258 } |
259 | 259 |
260 if (!Dest) | 260 if (!Dest) |
261 return; | 261 return; |
262 | 262 |
263 // Assign the result of the call to Dest. | 263 // Assign the result of the call to Dest. |
264 if (ReturnReg) { | 264 if (ReturnReg) { |
265 if (ReturnRegHi) { | 265 if (ReturnRegHi) { |
266 assert(Dest->getType() == IceType_i64); | 266 auto *Dest64On32 = llvm::cast<Variable64On32>(Dest); |
267 split64(Dest); | 267 Variable *DestLo = Dest64On32->getLo(); |
268 Variable *DestLo = Dest->getLo(); | 268 Variable *DestHi = Dest64On32->getHi(); |
269 Variable *DestHi = Dest->getHi(); | |
270 _mov(DestLo, ReturnReg); | 269 _mov(DestLo, ReturnReg); |
271 _mov(DestHi, ReturnRegHi); | 270 _mov(DestHi, ReturnRegHi); |
272 } else { | 271 } else { |
273 assert(Dest->getType() == IceType_i32 || Dest->getType() == IceType_i16 || | 272 assert(Dest->getType() == IceType_i32 || Dest->getType() == IceType_i16 || |
274 Dest->getType() == IceType_i8 || Dest->getType() == IceType_i1 || | 273 Dest->getType() == IceType_i8 || Dest->getType() == IceType_i1 || |
275 isVectorType(Dest->getType())); | 274 isVectorType(Dest->getType())); |
276 if (isVectorType(Dest->getType())) { | 275 if (isVectorType(Dest->getType())) { |
277 _movp(Dest, ReturnReg); | 276 _movp(Dest, ReturnReg); |
278 } else { | 277 } else { |
279 _mov(Dest, ReturnReg); | 278 _mov(Dest, ReturnReg); |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
932 // case the high-level table has extra entries. | 931 // case the high-level table has extra entries. |
933 #define X(tag, sizeLog2, align, elts, elty, str) \ | 932 #define X(tag, sizeLog2, align, elts, elty, str) \ |
934 static_assert(_table1_##tag == _table2_##tag, \ | 933 static_assert(_table1_##tag == _table2_##tag, \ |
935 "Inconsistency between ICETYPEX8632_TABLE and ICETYPE_TABLE"); | 934 "Inconsistency between ICETYPEX8632_TABLE and ICETYPE_TABLE"); |
936 ICETYPE_TABLE | 935 ICETYPE_TABLE |
937 #undef X | 936 #undef X |
938 } // end of namespace dummy3 | 937 } // end of namespace dummy3 |
939 } // end of anonymous namespace | 938 } // end of anonymous namespace |
940 | 939 |
941 } // end of namespace Ice | 940 } // end of namespace Ice |
OLD | NEW |