diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2019-02-25 17:06:47 -0800 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2019-03-26 10:29:22 -0700 |
commit | e74b9e0776ac1fee72cc96d52ed4e5949227b343 (patch) | |
tree | eab3e6f35ace32e999d911a450b2ee34100e8bc9 | |
parent | 25d4436a07f8bb6665a1e3fdb6a556555c5b5007 (diff) |
extract
squash! WIP: intel/compiler: Import Gen8 / Gen9 ALU machine description
-rw-r--r-- | src/intel/compiler/gen8_md.py | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/intel/compiler/gen8_md.py b/src/intel/compiler/gen8_md.py index b1173baf1e94..0fbe2160bcee 100644 --- a/src/intel/compiler/gen8_md.py +++ b/src/intel/compiler/gen8_md.py @@ -409,6 +409,85 @@ gen8_md = [ (('ishl', a, b), Instruction('SHL', r, a, b)), (('ishr', a, b), Instruction('ASR', r, a, b)), (('ushr', a, b), Instruction('SHR', r, a, b)), + + # Extract + # + # The PRMs say: + # + # BDW+ + # + # There is no direct conversion from B/UB to Q/UQ or Q/UQ to B/UB. Use + # two instructions and a word or DWord intermediate integer type. + (('extract_u8@64', a, 0), Instruction('AND', r, subscript(a, UW, 0), imm(0x00ff, UW))), + (('extract_u8@64', a, 1), Instruction('SHR', r, subscript(a, UW, 0), imm(8, UW))), + (('extract_u8@64', a, 2), Instruction('AND', r, subscript(a, UW, 1), imm(0x00ff, UW))), + (('extract_u8@64', a, 3), Instruction('SHR', r, subscript(a, UW, 1), imm(8, UW))), + (('extract_u8@64', a, 4), Instruction('AND', r, subscript(a, UW, 2), imm(0x00ff, UW))), + (('extract_u8@64', a, 5), Instruction('SHR', r, subscript(a, UW, 2), imm(8, UW))), + (('extract_u8@64', a, 6), Instruction('AND', r, subscript(a, UW, 3), imm(0x00ff, UW))), + (('extract_u8@64', a, 7), Instruction('SHR', r, subscript(a, UW, 3), imm(8, UW))), + + + (('extract_u8', a, 0), Instruction('MOV', r, subscript(a, UB, 0))), + (('extract_u8', a, 1), Instruction('MOV', r, subscript(a, UB, 1))), + (('extract_u8', a, 2), Instruction('MOV', r, subscript(a, UB, 2))), + (('extract_u8', a, 3), Instruction('MOV', r, subscript(a, UB, 3))), + (('extract_u8', a, 4), Instruction('MOV', r, subscript(a, UB, 4))), + (('extract_u8', a, 5), Instruction('MOV', r, subscript(a, UB, 5))), + (('extract_u8', a, 6), Instruction('MOV', r, subscript(a, UB, 6))), + (('extract_u8', a, 7), Instruction('MOV', r, subscript(a, UB, 7))), + + (('extract_i8@64', a, 0), InstructionList([(t0, W),], + (Instruction('MOV', t0, subscript(a, B, 0)), + Instruction('MOV', r, t0))) + ), + (('extract_i8@64', a, 1), InstructionList([(t0, W),], + (Instruction('MOV', t0, subscript(a, B, 1)), + Instruction('MOV', r, t0))) + ), + (('extract_i8@64', a, 2), InstructionList([(t0, W),], + (Instruction('MOV', t0, subscript(a, B, 2)), + Instruction('MOV', r, t0))) + ), + (('extract_i8@64', a, 3), InstructionList([(t0, W),], + (Instruction('MOV', t0, subscript(a, B, 3)), + Instruction('MOV', r, t0))) + ), + (('extract_i8@64', a, 4), InstructionList([(t0, W),], + (Instruction('MOV', t0, subscript(a, B, 4)), + Instruction('MOV', r, t0))) + ), + (('extract_i8@64', a, 5), InstructionList([(t0, W),], + (Instruction('MOV', t0, subscript(a, B, 5)), + Instruction('MOV', r, t0))) + ), + (('extract_i8@64', a, 6), InstructionList([(t0, W),], + (Instruction('MOV', t0, subscript(a, B, 6)), + Instruction('MOV', r, t0))) + ), + (('extract_i8@64', a, 7), InstructionList([(t0, W),], + (Instruction('MOV', t0, subscript(a, B, 7)), + Instruction('MOV', r, t0))) + ), + + (('extract_i8', a, 0), Instruction('MOV', r, subscript(a, B, 0))), + (('extract_i8', a, 1), Instruction('MOV', r, subscript(a, B, 1))), + (('extract_i8', a, 2), Instruction('MOV', r, subscript(a, B, 2))), + (('extract_i8', a, 3), Instruction('MOV', r, subscript(a, B, 3))), + (('extract_i8', a, 4), Instruction('MOV', r, subscript(a, B, 4))), + (('extract_i8', a, 5), Instruction('MOV', r, subscript(a, B, 5))), + (('extract_i8', a, 6), Instruction('MOV', r, subscript(a, B, 6))), + (('extract_i8', a, 7), Instruction('MOV', r, subscript(a, B, 7))), + + (('extract_u16', a, 0), Instruction('MOV', r, subscript(a, UW, 0))), + (('extract_u16', a, 1), Instruction('MOV', r, subscript(a, UW, 1))), + (('extract_u16', a, 2), Instruction('MOV', r, subscript(a, UW, 2))), + (('extract_u16', a, 3), Instruction('MOV', r, subscript(a, UW, 3))), + + (('extract_i16', a, 0), Instruction('MOV', r, subscript(a, W, 0))), + (('extract_i16', a, 1), Instruction('MOV', r, subscript(a, W, 1))), + (('extract_i16', a, 2), Instruction('MOV', r, subscript(a, W, 2))), + (('extract_i16', a, 3), Instruction('MOV', r, subscript(a, W, 3))), ] gen8_unsupported = [ |