~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/imagination/rogue/passes/rogue_lower_pseudo_ops.c

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
   if (rogue_ref_is_reg(&mov->dst[0].ref) &&
74
74
       mov->dst[0].ref.reg->class == ROGUE_REG_CLASS_VTXOUT) {
75
75
      instr = &rogue_UVSW_WRITE(b, mov->dst[0].ref, mov->src[0].ref)->instr;
 
76
   } else if (rogue_ref_is_special_reg(&mov->src[0].ref)) {
 
77
      /* If we're loading a special register, use a movc. */
 
78
      rogue_alu_instr *alu = rogue_MOVC(b,
 
79
                                        mov->dst[0].ref,
 
80
                                        rogue_ref_io(ROGUE_IO_NONE),
 
81
                                        rogue_ref_io(ROGUE_IO_NONE),
 
82
                                        mov->src[0].ref,
 
83
                                        rogue_ref_io(ROGUE_IO_NONE));
 
84
      rogue_set_alu_dst_mod(alu, 0, ROGUE_ALU_DST_MOD_E0);
 
85
      rogue_set_alu_dst_mod(alu, 0, ROGUE_ALU_DST_MOD_E1);
 
86
      rogue_set_alu_dst_mod(alu, 0, ROGUE_ALU_DST_MOD_E2);
 
87
      rogue_set_alu_dst_mod(alu, 0, ROGUE_ALU_DST_MOD_E3);
 
88
 
 
89
      instr = &alu->instr;
76
90
   } else {
77
91
      /* If we're moving an immediate value not in special constants,
78
92
       * we need to do a bitwise bypass.