| 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, |
| 11 // primarily the constructors and the dump()/emit() methods. | 11 // primarily the constructors and the dump()/emit() methods. |
| 12 // | 12 // |
| 13 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
| 14 | 14 |
| 15 #include "assembler_ia32.h" | 15 #include "IceAssemblerX8632.h" |
| 16 #include "IceCfg.h" | 16 #include "IceCfg.h" |
| 17 #include "IceCfgNode.h" | 17 #include "IceCfgNode.h" |
| 18 #include "IceConditionCodesX8632.h" | 18 #include "IceConditionCodesX8632.h" |
| 19 #include "IceInst.h" | 19 #include "IceInst.h" |
| 20 #include "IceInstX8632.h" | 20 #include "IceInstX8632.h" |
| 21 #include "IceRegistersX8632.h" | 21 #include "IceRegistersX8632.h" |
| 22 #include "IceTargetLoweringX8632.h" | 22 #include "IceTargetLoweringX8632.h" |
| 23 #include "IceOperand.h" | 23 #include "IceOperand.h" |
| 24 | 24 |
| 25 namespace Ice { | 25 namespace Ice { |
| (...skipping 2894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2920 } else { | 2920 } else { |
| 2921 // There is only the offset. | 2921 // There is only the offset. |
| 2922 Offset->dump(Func, Str); | 2922 Offset->dump(Func, Str); |
| 2923 } | 2923 } |
| 2924 Str << "]"; | 2924 Str << "]"; |
| 2925 } | 2925 } |
| 2926 | 2926 |
| 2927 void OperandX8632Mem::emitSegmentOverride(X8632::AssemblerX8632 *Asm) const { | 2927 void OperandX8632Mem::emitSegmentOverride(X8632::AssemblerX8632 *Asm) const { |
| 2928 if (SegmentReg != DefaultSegment) { | 2928 if (SegmentReg != DefaultSegment) { |
| 2929 assert(SegmentReg >= 0 && SegmentReg < SegReg_NUM); | 2929 assert(SegmentReg >= 0 && SegmentReg < SegReg_NUM); |
| 2930 Asm->EmitSegmentOverride(InstX8632SegmentPrefixes[SegmentReg]); | 2930 Asm->emitSegmentOverride(InstX8632SegmentPrefixes[SegmentReg]); |
| 2931 } | 2931 } |
| 2932 } | 2932 } |
| 2933 | 2933 |
| 2934 X8632::Address OperandX8632Mem::toAsmAddress(Assembler *Asm) const { | 2934 X8632::Address OperandX8632Mem::toAsmAddress(Assembler *Asm) const { |
| 2935 int32_t Disp = 0; | 2935 int32_t Disp = 0; |
| 2936 AssemblerFixup *Fixup = nullptr; | 2936 AssemblerFixup *Fixup = nullptr; |
| 2937 // Determine the offset (is it relocatable?) | 2937 // Determine the offset (is it relocatable?) |
| 2938 if (getOffset()) { | 2938 if (getOffset()) { |
| 2939 if (const auto CI = llvm::dyn_cast<ConstantInteger32>(getOffset())) { | 2939 if (const auto CI = llvm::dyn_cast<ConstantInteger32>(getOffset())) { |
| 2940 Disp = static_cast<int32_t>(CI->getValue()); | 2940 Disp = static_cast<int32_t>(CI->getValue()); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3002 } | 3002 } |
| 3003 Str << "("; | 3003 Str << "("; |
| 3004 if (Func) | 3004 if (Func) |
| 3005 Var->dump(Func); | 3005 Var->dump(Func); |
| 3006 else | 3006 else |
| 3007 Var->dump(Str); | 3007 Var->dump(Str); |
| 3008 Str << ")"; | 3008 Str << ")"; |
| 3009 } | 3009 } |
| 3010 | 3010 |
| 3011 } // end of namespace Ice | 3011 } // end of namespace Ice |
| OLD | NEW |