Lines Matching refs:CurByte
80 void EmitByte(unsigned char C, unsigned &CurByte, raw_ostream &OS) const {
82 ++CurByte;
85 void EmitConstant(uint64_t Val, unsigned Size, unsigned &CurByte,
89 EmitByte(Val & 255, CurByte, OS);
96 unsigned &CurByte, raw_ostream &OS,
107 unsigned &CurByte, raw_ostream &OS) const {
108 EmitByte(ModRMByte(3, RegOpcodeFld, GetX86RegNum(ModRMReg)), CurByte, OS);
112 unsigned &CurByte, raw_ostream &OS) const {
114 EmitByte(ModRMByte(SS, Index, Base), CurByte, OS);
120 uint64_t TSFlags, unsigned &CurByte, raw_ostream &OS,
126 void EmitVEXOpcodePrefix(uint64_t TSFlags, unsigned &CurByte, int MemOperand,
130 void EmitSegmentOverridePrefix(uint64_t TSFlags, unsigned &CurByte,
134 void EmitOpcodePrefix(uint64_t TSFlags, unsigned &CurByte, int MemOperand,
242 MCFixupKind FixupKind, unsigned &CurByte, raw_ostream &OS,
251 EmitConstant(DispOp.getImm()+ImmOffset, Size, CurByte, OS);
269 ImmOffset = CurByte;
294 Fixups.push_back(MCFixup::Create(CurByte, Expr, FixupKind, Loc));
295 EmitConstant(0, Size, CurByte, OS);
300 uint64_t TSFlags, unsigned &CurByte,
313 EmitByte(ModRMByte(0, RegOpcodeField, 5), CurByte, OS);
331 CurByte, OS, Fixups, -ImmSize);
353 EmitByte(ModRMByte(0, RegOpcodeField, 5), CurByte, OS);
354 EmitImmediate(Disp, MI.getLoc(), 4, FK_Data_4, CurByte, OS, Fixups);
363 EmitByte(ModRMByte(0, RegOpcodeField, BaseRegNo), CurByte, OS);
369 EmitByte(ModRMByte(1, RegOpcodeField, BaseRegNo), CurByte, OS);
370 EmitImmediate(Disp, MI.getLoc(), 1, FK_Data_1, CurByte, OS, Fixups);
375 EmitByte(ModRMByte(2, RegOpcodeField, BaseRegNo), CurByte, OS);
376 EmitImmediate(Disp, MI.getLoc(), 4, MCFixupKind(X86::reloc_signed_4byte), CurByte, OS,
390 EmitByte(ModRMByte(0, RegOpcodeField, 4), CurByte, OS);
394 EmitByte(ModRMByte(2, RegOpcodeField, 4), CurByte, OS);
401 EmitByte(ModRMByte(0, RegOpcodeField, 4), CurByte, OS);
404 EmitByte(ModRMByte(1, RegOpcodeField, 4), CurByte, OS);
408 EmitByte(ModRMByte(2, RegOpcodeField, 4), CurByte, OS);
423 EmitSIBByte(SS, IndexRegNo, 5, CurByte, OS);
430 EmitSIBByte(SS, IndexRegNo, GetX86RegNum(Base), CurByte, OS);
435 EmitImmediate(Disp, MI.getLoc(), 1, FK_Data_1, CurByte, OS, Fixups);
438 CurByte, OS, Fixups);
443 void X86MCCodeEmitter::EmitVEXOpcodePrefix(uint64_t TSFlags, unsigned &CurByte,
703 EmitSegmentOverridePrefix(TSFlags, CurByte, MemOperand, MI, OS);
719 EmitByte(0xC5, CurByte, OS);
720 EmitByte(LastByte | (VEX_R << 7), CurByte, OS);
725 EmitByte(XOP ? 0x8F : 0xC4, CurByte, OS);
726 EmitByte(VEX_R << 7 | VEX_X << 6 | VEX_B << 5 | VEX_5M, CurByte, OS);
727 EmitByte(LastByte | (VEX_W << 7), CurByte, OS);
826 unsigned &CurByte, int MemOperand,
837 case X86::CS: EmitByte(0x2E, CurByte, OS); break;
838 case X86::SS: EmitByte(0x36, CurByte, OS); break;
839 case X86::DS: EmitByte(0x3E, CurByte, OS); break;
840 case X86::ES: EmitByte(0x26, CurByte, OS); break;
841 case X86::FS: EmitByte(0x64, CurByte, OS); break;
842 case X86::GS: EmitByte(0x65, CurByte, OS); break;
847 EmitByte(0x64, CurByte, OS);
850 EmitByte(0x65, CurByte, OS);
859 void X86MCCodeEmitter::EmitOpcodePrefix(uint64_t TSFlags, unsigned &CurByte,
866 EmitByte(0xF0, CurByte, OS);
869 EmitSegmentOverridePrefix(TSFlags, CurByte, MemOperand, MI, OS);
873 EmitByte(0xF3, CurByte, OS);
892 EmitByte(0x67, CurByte, OS);
896 EmitByte(0x66, CurByte, OS);
911 EmitByte(0xF3, CurByte, OS);
915 EmitByte(0xF2, CurByte, OS);
919 EmitByte(0xF2, CurByte, OS);
923 EmitByte(0xF3, CurByte, OS);
927 EmitByte(0xF2, CurByte, OS);
930 case X86II::D8: EmitByte(0xD8, CurByte, OS); break;
931 case X86II::D9: EmitByte(0xD9, CurByte, OS); break;
932 case X86II::DA: EmitByte(0xDA, CurByte, OS); break;
933 case X86II::DB: EmitByte(0xDB, CurByte, OS); break;
934 case X86II::DC: EmitByte(0xDC, CurByte, OS); break;
935 case X86II::DD: EmitByte(0xDD, CurByte, OS); break;
936 case X86II::DE: EmitByte(0xDE, CurByte, OS); break;
937 case X86II::DF: EmitByte(0xDF, CurByte, OS); break;
944 EmitByte(0x40 | REX, CurByte, OS);
949 EmitByte(0x0F, CurByte, OS);
956 EmitByte(0x38, CurByte, OS);
960 EmitByte(0x3A, CurByte, OS);
963 EmitByte(0xA6, CurByte, OS);
966 EmitByte(0xA7, CurByte, OS);
996 unsigned CurByte = 0;
1012 EmitOpcodePrefix(TSFlags, CurByte, MemoryOperand, MI, Desc, OS);
1014 EmitVEXOpcodePrefix(TSFlags, CurByte, MemoryOperand, MI, Desc, OS);
1030 EmitByte(BaseOpcode, CurByte, OS);
1033 EmitByte(BaseOpcode, CurByte, OS);
1036 CurByte, OS, Fixups);
1037 EmitImmediate(MI.getOperand(CurOp++), MI.getLoc(), 1, FK_Data_1, CurByte,
1041 EmitByte(BaseOpcode, CurByte, OS);
1044 CurByte, OS, Fixups);
1045 EmitImmediate(MI.getOperand(CurOp++), MI.getLoc(), 2, FK_Data_2, CurByte,
1050 EmitByte(BaseOpcode + GetX86RegNum(MI.getOperand(CurOp++)), CurByte, OS);
1054 EmitByte(BaseOpcode, CurByte, OS);
1061 GetX86RegNum(MI.getOperand(SrcRegNum)), CurByte, OS);
1066 EmitByte(BaseOpcode, CurByte, OS);
1074 TSFlags, CurByte, OS, Fixups);
1079 EmitByte(BaseOpcode, CurByte, OS);
1089 GetX86RegNum(MI.getOperand(CurOp)), CurByte, OS);
1107 EmitByte(BaseOpcode, CurByte, OS);
1110 TSFlags, CurByte, OS, Fixups);
1123 EmitByte(BaseOpcode, CurByte, OS);
1126 CurByte, OS);
1134 EmitByte(BaseOpcode, CurByte, OS);
1136 TSFlags, CurByte, OS, Fixups);
1150 EmitByte(BaseOpcode, CurByte, OS);
1178 EmitByte(MRM, CurByte, OS);
1206 CurByte, OS, Fixups);
1219 CurByte, OS, Fixups);
1224 EmitByte(X86II::getBaseOpcodeFor(TSFlags), CurByte, OS);