Lines Matching defs:OS

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