OLD | NEW |
1 //===- subzero/src/IceTargetLoweringX8632Traits.h - x86-32 traits -*- C++ -*-=// | 1 //===- subzero/src/IceTargetLoweringX8632Traits.h - x86-32 traits -*- C++ -*-=// |
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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 case IceType_i16: | 368 case IceType_i16: |
369 return RegisterSet::Reg_ax; | 369 return RegisterSet::Reg_ax; |
370 case IceType_i32: | 370 case IceType_i32: |
371 return RegisterSet::Reg_eax; | 371 return RegisterSet::Reg_eax; |
372 } | 372 } |
373 } | 373 } |
374 | 374 |
375 public: | 375 public: |
376 // Return a register in RegNum's alias set that is suitable for Ty. | 376 // Return a register in RegNum's alias set that is suitable for Ty. |
377 static RegNumT getGprForType(Type Ty, RegNumT RegNum) { | 377 static RegNumT getGprForType(Type Ty, RegNumT RegNum) { |
378 assert(RegNum != RegNumT::NoRegister); | 378 assert(RegNum.hasValue()); |
379 | 379 |
380 if (!isScalarIntegerType(Ty)) { | 380 if (!isScalarIntegerType(Ty)) { |
381 return RegNum; | 381 return RegNum; |
382 } | 382 } |
383 | 383 |
384 // [abcd]h registers are not convertible to their ?l, ?x, and e?x versions. | 384 // [abcd]h registers are not convertible to their ?l, ?x, and e?x versions. |
385 switch (RegNum) { | 385 switch (RegNum) { |
386 default: | 386 default: |
387 break; | 387 break; |
388 case RegisterSet::Reg_ah: | 388 case RegisterSet::Reg_ah: |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
991 | 991 |
992 static uint8_t InstSegmentPrefixes[]; | 992 static uint8_t InstSegmentPrefixes[]; |
993 }; | 993 }; |
994 | 994 |
995 using Traits = ::Ice::X8632::TargetX8632Traits; | 995 using Traits = ::Ice::X8632::TargetX8632Traits; |
996 } // end of namespace X8632 | 996 } // end of namespace X8632 |
997 | 997 |
998 } // end of namespace Ice | 998 } // end of namespace Ice |
999 | 999 |
1000 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632TRAITS_H | 1000 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632TRAITS_H |
OLD | NEW |