Lines Matching refs:OS
53 virtual void EncodeInstruction(const MCInst &MI, raw_ostream &OS,
62 raw_ostream &OS) const;
63 void EmitSrc(const MCInst &MI, unsigned OpIdx, raw_ostream &OS) const;
64 void EmitDst(const MCInst &MI, raw_ostream &OS) const;
67 raw_ostream &OS) const;
69 raw_ostream &OS) const;
70 void EmitFCInstr(const MCInst &MI, raw_ostream &OS) const;
72 void EmitNullBytes(unsigned int byteCount, raw_ostream &OS) const;
74 void EmitByte(unsigned int byte, raw_ostream &OS) const;
76 void EmitTwoBytes(uint32_t bytes, raw_ostream &OS) const;
78 void Emit(uint32_t value, raw_ostream &OS) const;
79 void Emit(uint64_t value, raw_ostream &OS) const;
150 void R600MCCodeEmitter::EncodeInstruction(const MCInst &MI, raw_ostream &OS, in EncodeInstruction() argument
153 EmitTexInstr(MI, Fixups, OS); in EncodeInstruction()
155 EmitFCInstr(MI, OS); in EncodeInstruction()
165 EmitByte(INSTR_NATIVE, OS); in EncodeInstruction()
166 Emit(inst, OS); in EncodeInstruction()
179 EmitByte(INSTR_VTX, OS); in EncodeInstruction()
180 Emit(InstWord01, OS); in EncodeInstruction()
181 Emit(InstWord2, OS); in EncodeInstruction()
186 EmitALUInstr(MI, Fixups, OS); in EncodeInstruction()
194 raw_ostream &OS) const { in EmitALUInstr()
213 EmitByte(0, OS); in EmitALUInstr()
221 EmitSrc(MI, OpIndex, OS); in EmitALUInstr()
226 EmitNullBytes(SRC_BYTE_COUNT, OS); in EmitALUInstr()
229 EmitDst(MI, OS); in EmitALUInstr()
231 EmitALU(MI, NumOperands - 1, Fixups, OS); in EmitALUInstr()
235 raw_ostream &OS) const { in EmitSrc()
247 EmitTwoBytes(getHWReg(reg), OS); in EmitSrc()
260 EmitTwoBytes(0, OS); in EmitSrc()
265 EmitByte(getHWRegChan(MO.getReg()), OS); in EmitSrc()
267 EmitByte(0, OS); in EmitSrc()
275 EmitByte(1, OS); in EmitSrc()
277 EmitByte(0, OS); in EmitSrc()
282 EmitByte(1, OS); in EmitSrc()
284 EmitByte(0, OS); in EmitSrc()
288 EmitByte(0, OS); in EmitSrc()
291 EmitByte(0, OS); in EmitSrc()
294 Emit(Value.i, OS); in EmitSrc()
298 void R600MCCodeEmitter::EmitDst(const MCInst &MI, raw_ostream &OS) const { in EmitDst()
303 EmitByte(getHWReg(MO.getReg()), OS); in EmitDst()
306 EmitByte(getHWRegChan(MO.getReg()), OS); in EmitDst()
310 EmitByte(1, OS); in EmitDst()
312 EmitByte(0, OS); in EmitDst()
317 EmitByte(0, OS); in EmitDst()
319 EmitByte(1, OS); in EmitDst()
323 EmitByte(0, OS); in EmitDst()
326 EmitNullBytes(DST_BYTE_COUNT, OS); in EmitDst()
332 raw_ostream &OS) const { in EmitALU()
336 EmitTwoBytes(getBinaryCodeForInstr(MI, Fixups), OS); in EmitALU()
340 EmitByte(0, OS); in EmitALU()
342 EmitByte(1, OS); in EmitALU()
347 EmitByte(1, OS); in EmitALU()
349 EmitByte(0, OS); in EmitALU()
354 EmitByte(1, OS); in EmitALU()
356 EmitByte(0, OS); in EmitALU()
364 EmitByte(2, OS); in EmitALU()
367 EmitByte(3, OS); in EmitALU()
370 EmitByte(0, OS); in EmitALU()
374 EmitByte(0, OS); in EmitALU()
380 EmitByte(0, OS); in EmitALU()
383 EmitByte(0, OS); in EmitALU()
386 EmitByte(0, OS); in EmitALU()
390 EmitByte(0, OS); in EmitALU()
395 raw_ostream &OS) const { in EmitTexInstr()
405 EmitByte(1, OS); in EmitTexInstr()
408 EmitByte(getBinaryCodeForInstr(MI, Fixups), OS); in EmitTexInstr()
411 EmitByte(sampler + 1 + 1, OS); in EmitTexInstr()
414 EmitByte(getHWReg(MI.getOperand(1).getReg()), OS); in EmitTexInstr()
417 EmitByte(0, OS); in EmitTexInstr()
420 EmitByte(getHWReg(MI.getOperand(0).getReg()), OS); in EmitTexInstr()
423 EmitByte(0, OS); in EmitTexInstr()
426 EmitByte(0, OS); // X in EmitTexInstr()
427 EmitByte(1, OS); // Y in EmitTexInstr()
428 EmitByte(2, OS); // Z in EmitTexInstr()
429 EmitByte(3, OS); // W in EmitTexInstr()
432 EmitByte(0, OS); in EmitTexInstr()
457 EmitByte(coordType[i], OS); in EmitTexInstr()
463 EmitByte(MI.getOperand(i).getImm()<<1, OS); in EmitTexInstr()
465 EmitNullBytes(3, OS); in EmitTexInstr()
468 EmitByte(sampler, OS); in EmitTexInstr()
481 EmitByte(srcSelect[i], OS); in EmitTexInstr()
485 void R600MCCodeEmitter::EmitFCInstr(const MCInst &MI, raw_ostream &OS) const { in EmitFCInstr()
488 EmitByte(INSTR_FC, OS); in EmitFCInstr()
494 EmitSrc(MI, 0, OS); in EmitFCInstr()
496 EmitNullBytes(SRC_BYTE_COUNT, OS); in EmitFCInstr()
542 EmitByte(instr, OS); in EmitFCInstr()
546 raw_ostream &OS) const { in EmitNullBytes()
549 EmitByte(0, OS); in EmitNullBytes()
553 void R600MCCodeEmitter::EmitByte(unsigned int Byte, raw_ostream &OS) const { in EmitByte()
554 OS.write((uint8_t) Byte & 0xff); in EmitByte()
558 raw_ostream &OS) const { in EmitTwoBytes()
559 OS.write((uint8_t) (Bytes & 0xff)); in EmitTwoBytes()
560 OS.write((uint8_t) ((Bytes >> 8) & 0xff)); in EmitTwoBytes()
563 void R600MCCodeEmitter::Emit(uint32_t Value, raw_ostream &OS) const { in Emit()
565 OS.write((uint8_t) ((Value >> (8 * i)) & 0xff)); in Emit()
569 void R600MCCodeEmitter::Emit(uint64_t Value, raw_ostream &OS) const { in Emit()
571 EmitByte((Value >> (8 * i)) & 0xff, OS); in Emit()