Lines Matching refs:name
192 def __init__(self, name, opcode_gfx7, opcode_gfx9, opcode_gfx10, format, input_mod, output_mod, is_atomic, cls):
195 - name is the name of the opcode (prepend nir_op_ for the enum name)
203 assert isinstance(name, str)
211 self.name = name
221 parts = name.replace('_e64', '').rsplit('_', 2)
234 if 'qsad_' in name:
236 elif 'sad_' in name:
238 elif name in ['v_mad_u64_u32', 'v_mad_i64_i32']:
244 elif name in ['v_cvt_f32_ubyte0', 'v_cvt_f32_ubyte1',
251 def opcode(name, opcode_gfx7 = -1, opcode_gfx9 = -1, opcode_gfx10 = -1, format = Format.PSEUDO, cls = InstrClass.Other, input_mod = False, output_mod = False, is_atomic = False):
252 assert name not in opcodes
253 opcodes[name] = Opcode(name, opcode_gfx7, opcode_gfx9, opcode_gfx10, format, input_mod, output_mod, is_atomic, cls)
328 # GFX6, GFX7, GFX8, GFX9, GFX10, name
385 for (gfx6, gfx7, gfx8, gfx9, gfx10, name, cls) in default_class(SOP2, InstrClass.Salu):
386 opcode(name, gfx7, gfx9, gfx10, Format.SOP2, cls)
391 # GFX6, GFX7, GFX8, GFX9, GFX10, name
421 for (gfx6, gfx7, gfx8, gfx9, gfx10, name, cls) in default_class(SOPK, InstrClass.Salu):
422 opcode(name, gfx7, gfx9, gfx10, Format.SOPK, cls)
427 # GFX6, GFX7, GFX8, GFX9, GFX10, name
499 for (gfx6, gfx7, gfx8, gfx9, gfx10, name, cls) in default_class(SOP1, InstrClass.Salu):
500 opcode(name, gfx7, gfx9, gfx10, Format.SOP1, cls)
505 # GFX6, GFX7, GFX8, GFX9, GFX10, name
527 for (gfx6, gfx7, gfx8, gfx9, gfx10, name) in SOPC:
528 opcode(name, gfx7, gfx9, gfx10, Format.SOPC, InstrClass.Salu)
533 # GFX6, GFX7, GFX8, GFX9, GFX10, name
574 for (gfx6, gfx7, gfx8, gfx9, gfx10, name, cls) in default_class(SOPP, InstrClass.Salu):
575 opcode(name, gfx7, gfx9, gfx10, Format.SOPP, cls)
581 # GFX6, GFX7, GFX8, GFX9, GFX10, name
669 for (gfx6, gfx7, gfx8, gfx9, gfx10, name) in SMEM:
670 opcode(name, gfx7, gfx9, gfx10, Format.SMEM, InstrClass.SMem, is_atomic = "atomic" in name)
676 # GFX6, GFX7, GFX8, GFX9, GFX10, name, input/output modifiers
752 for (gfx6, gfx7, gfx8, gfx9, gfx10, name, modifiers) in VOP2:
753 opcode(name, gfx7, gfx9, gfx10, Format.VOP2, InstrClass.Valu32, modifiers, modifiers)
757 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (0x00, 0x00, 0x00, 0x00, 0x01, "v_cndmask_b32")
758 opcode(name, gfx7, gfx9, gfx10, Format.VOP2, InstrClass.Valu32, True, False)
763 # GFX6, GFX7, GFX8, GFX9, GFX10, name, input_modifiers, output_modifiers
858 for (gfx6, gfx7, gfx8, gfx9, gfx10, name, in_mod, out_mod, cls) in default_class(VOP1, InstrClass.Valu32):
859 opcode(name, gfx7, gfx9, gfx10, Format.VOP1, cls, in_mod, out_mod)
872 for (gfx6, gfx7, gfx8, gfx9, gfx10, name, cls) in default_class(VOPC_CLASS, InstrClass.Valu32):
873 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, cls, True, False)
878 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (-1, -1, 0x20+i, 0x20+i, 0xc8+i, "v_cmp_"+COMPF[i]+"_f16")
879 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu32, True, False)
880 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (-1, -1, 0x30+i, 0x30+i, 0xd8+i, "v_cmpx_"+COMPF[i]+"_f16")
881 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu32, True, False)
882 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (-1, -1, 0x28+i, 0x28+i, 0xe8+i, "v_cmp_"+COMPF[i+8]+"_f16")
883 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu32, True, False)
884 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (-1, -1, 0x38+i, 0x38+i, 0xf8+i, "v_cmpx_"+COMPF[i+8]+"_f16")
885 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu32, True, False)
888 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (0x00+i, 0x00+i, 0x40+i, 0x40+i, 0x00+i, "v_cmp_"+COMPF[i]+"_f32")
889 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu32, True, False)
890 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (0x10+i, 0x10+i, 0x50+i, 0x50+i, 0x10+i, "v_cmpx_"+COMPF[i]+"_f32")
891 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu32, True, False)
892 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (0x20+i, 0x20+i, 0x60+i, 0x60+i, 0x20+i, "v_cmp_"+COMPF[i]+"_f64")
893 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.ValuDouble, True, False)
894 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (0x30+i, 0x30+i, 0x70+i, 0x70+i, 0x30+i, "v_cmpx_"+COMPF[i]+"_f64")
895 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.ValuDouble, True, False)
897 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (0x40+i, 0x40+i, -1, -1, -1, "v_cmps_"+COMPF[i]+"_f32")
898 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (0x50+i, 0x50+i, -1, -1, -1, "v_cmpsx_"+COMPF[i]+"_f32")
899 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (0x60+i, 0x60+i, -1, -1, -1, "v_cmps_"+COMPF[i]+"_f64")
900 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (0x70+i, 0x70+i, -1, -1, -1, "v_cmpsx_"+COMPF[i]+"_f64")
906 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (-1, -1, 0xa0+i, 0xa0+i, -1, "v_cmp_"+COMPI[i]+"_i16")
907 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu32)
908 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (-1, -1, 0xb0+i, 0xb0+i, -1, "v_cmpx_"+COMPI[i]+"_i16")
909 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu32)
910 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (-1, -1, 0xa8+i, 0xa8+i, -1, "v_cmp_"+COMPI[i]+"_u16")
911 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu32)
912 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (-1, -1, 0xb8+i, 0xb8+i, -1, "v_cmpx_"+COMPI[i]+"_u16")
913 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu32)
916 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (-1, -1, 0xa0+i, 0xa0+i, 0x88+i, "v_cmp_"+COMPI[i]+"_i16")
917 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu32)
918 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (-1, -1, 0xb0+i, 0xb0+i, 0x98+i, "v_cmpx_"+COMPI[i]+"_i16")
919 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu32)
920 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (-1, -1, 0xa8+i, 0xa8+i, 0xa8+i, "v_cmp_"+COMPI[i]+"_u16")
921 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu32)
922 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (-1, -1, 0xb8+i, 0xb8+i, 0xb8+i, "v_cmpx_"+COMPI[i]+"_u16")
923 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu32)
926 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (0x80+i, 0x80+i, 0xc0+i, 0xc0+i, 0x80+i, "v_cmp_"+COMPI[i]+"_i32")
927 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu32)
928 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (0x90+i, 0x90+i, 0xd0+i, 0xd0+i, 0x90+i, "v_cmpx_"+COMPI[i]+"_i32")
929 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu32)
930 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (0xa0+i, 0xa0+i, 0xe0+i, 0xe0+i, 0xa0+i, "v_cmp_"+COMPI[i]+"_i64")
931 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu64)
932 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (0xb0+i, 0xb0+i, 0xf0+i, 0xf0+i, 0xb0+i, "v_cmpx_"+COMPI[i]+"_i64")
933 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu64)
934 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (0xc0+i, 0xc0+i, 0xc8+i, 0xc8+i, 0xc0+i, "v_cmp_"+COMPI[i]+"_u32")
935 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu32)
936 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (0xd0+i, 0xd0+i, 0xd8+i, 0xd8+i, 0xd0+i, "v_cmpx_"+COMPI[i]+"_u32")
937 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu32)
938 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (0xe0+i, 0xe0+i, 0xe8+i, 0xe8+i, 0xe0+i, "v_cmp_"+COMPI[i]+"_u64")
939 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu64)
940 (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (0xf0+i, 0xf0+i, 0xf8+i, 0xf8+i, 0xf0+i, "v_cmpx_"+COMPI[i]+"_u64")
941 opcode(name, gfx7, gfx9, gfx10, Format.VOPC, InstrClass.Valu64)
946 # opcode, name, input/output modifiers
971 # (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (-1, -1, -1, code, code, name)
972 for (code, name, modifiers) in VOPP:
973 opcode(name, -1, code, code, Format.VOP3P, InstrClass.Valu32, modifiers, modifiers)
986 # (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (code, code, code, code, code, name)
987 for (code, name) in VINTRP:
988 opcode(name, code, code, code, Format.VINTRP, InstrClass.Valu32)
1125 for (gfx6, gfx7, gfx8, gfx9, gfx10, name, in_mod, out_mod, cls) in default_class(VOP3, InstrClass.Valu32):
1126 opcode(name, gfx7, gfx9, gfx10, Format.VOP3, cls, in_mod, out_mod)
1287 for (gfx6, gfx7, gfx8, gfx9, gfx10, name) in DS:
1288 opcode(name, gfx7, gfx9, gfx10, Format.DS, InstrClass.DS)
1373 for (gfx6, gfx7, gfx8, gfx9, gfx10, name) in MUBUF:
1374 opcode(name, gfx7, gfx9, gfx10, Format.MUBUF, InstrClass.VMem, is_atomic = "atomic" in name)
1394 for (gfx6, gfx7, gfx8, gfx9, gfx10, name) in MTBUF:
1395 opcode(name, gfx7, gfx9, gfx10, Format.MTBUF, InstrClass.VMem)
1412 # (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (code, code, code, code, code, name)
1413 for (code, name) in IMAGE:
1414 opcode(name, code, code, code, Format.MIMG, InstrClass.VMem)
1437 # (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (gfx6, gfx7, gfx89, gfx89, ???, name)
1439 for (gfx6, gfx7, gfx89, name) in IMAGE_ATOMIC:
1440 opcode(name, gfx7, gfx89, gfx7, Format.MIMG, InstrClass.VMem, is_atomic = True)
1484 # (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (code, code, code, code, code, name)
1485 for (code, name) in IMAGE_SAMPLE:
1486 opcode(name, code, code, code, Format.MIMG, InstrClass.VMem)
1499 # (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (-1, -1, -1, -1, code, name)
1500 for (code, name) in IMAGE_SAMPLE_G16:
1501 opcode(name, -1, -1, code, Format.MIMG, InstrClass.VMem)
1532 # (gfx6, gfx7, gfx8, gfx9, gfx10, name) = (code, code, code, code, code, name)
1533 for (code, name) in IMAGE_GATHER4:
1534 opcode(name, code, code, code, Format.MIMG, InstrClass.VMem)
1595 for (gfx7, gfx8, gfx10, name) in FLAT:
1596 opcode(name, gfx7, gfx8, gfx10, Format.FLAT, InstrClass.VMem, is_atomic = "atomic" in name) #TODO: also LDS?
1658 for (gfx8, gfx10, name) in GLOBAL:
1659 opcode(name, -1, gfx8, gfx10, Format.GLOBAL, InstrClass.VMem, is_atomic = "atomic" in name)
1686 for (gfx8, gfx10, name) in SCRATCH:
1687 opcode(name, -1, gfx8, gfx10, Format.SCRATCH, InstrClass.VMem)
1704 names = set([op_to_name[key], op.name])
1714 print('%s and %s share the same opcode number (%s)' % (op_to_name[key], op.name, ver))
1717 op_to_name[key] = op.name