62 Commits

Author SHA1 Message Date
Homer Hsing
9e711a4f2c Supporting find first bit instructions
fbh: Find the first significant bit searching from the high bits
in src0 and store the result in dst.

fbl: Find the first 1 bit searching from the low bits in src0
and store the result in dst.
2013-03-04 15:54:31 +00:00
Homer Hsing
b094cd8648 Supporting half precision to single precision float convertion
The f16to32 instruction converts the half precision float
in src0 to single precision float and storing in dst.

The f32to16 instruction converts the single precision float
in src0 to half precision float and storing in the lower word
of each channel in dst.
2013-03-04 15:54:31 +00:00
Homer Hsing
4285d9c2ce Supporting count bit set instruction
The cbit instruction counts component-wise the total bits set
in src0 and stores the resulting counts in dst.
2013-03-04 15:54:31 +00:00
Homer Hsing
d4f48a7271 Supporting instruction "reverse bits"
The bfrev instruction component-wise reverses all the bits in src0
and stores the results in dst.
2013-03-04 15:54:31 +00:00
Homer Hsing
4d6337dfaf Supporting instruction Bit Field Insert 1
The bfi1 instruction component-wise generates mask with control
from src0 and src1 and stores the results in dst.
2013-03-04 15:54:31 +00:00
Homer Hsing
c3f1e0a732 Supporting addc instruction
The addc instruction performs component-wise addition of
src0 and src1 and stores the results in dst;
it also stores the carry into acc.
2013-03-04 15:54:31 +00:00
Homer Hsing
8ca55688ea Supporting bit field extract and bit field insert 2
Supporting two new operators, bfe and bfi2
bfe: Component-wise extracts a bit field from src2 using the bit field width from src0 and the bit field offset from src1.
bfi2: component-wise performs the bitfield insert operation on src1 and src2 based on the mask in src0.
2013-03-04 15:54:31 +00:00
Homer Hsing
210510cebb Supporting LRP: dest = src0 * src1 + (1-src0) * src2 2013-03-04 15:54:31 +00:00
Homer Hsing
a034bcbd04 Support trinary source instruction "multiply add".
MAD (Multiply ADd) computes dst <- src1*src2 + src0.

Tried best to follow previous variable naming habit.

Also renamed "triinstruction" -> "trinaryinstruction" in grammar parser
for better readability.
2013-03-04 15:54:31 +00:00
Xiang, Haihao
4d75db550e Waring if both predication and conditional modifier are enabled but use different flag registers
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:30 +00:00
Xiang, Haihao
3ffbe96c1e Add support for flag register f1 on Ivy bridge
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:30 +00:00
Xiang, Haihao
2f772dd67b s/flag_reg_nr/flag_subreg_nr for an instruction
s/flagreg/flag_subreg_nr for a condition

They are flag subregister number indeed

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:30 +00:00
Xiang, Haihao
f3f6ba24e6 Change the rule for flag register
The shift/reduce conflict mentioned in the comment has been fixed, so
flagreg can return the reg number in the lvalue now. In addition, it will
be easy to add support for flag register f1 on Ivy bridge

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:30 +00:00
Xiang, Haihao
128053f120 Accept symbol register as the leading register of the request
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:30 +00:00
Xiang, Haihao
0b5f7fa049 A new syntax of SEND intruction on Ivybridge
[(<pred>)] send (<exec_size>) reg greg imm6 reg32a

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:29 +00:00
Xiang, Haihao
86f8ca6af9 Support VME on Ivybridge
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:29 +00:00
Xiang, Haihao
27050395d2 Support DP for sampler/render/constant/data cache
Since Sandybridge, DP supports cache select for read/write. Some write messages such as
OWord Block Write don't support render cache any more on Ivybridge. So introduce a
generic data_port messsage for Sandybridge+.

    data_port(
        cache_type,   /* sampler, render, constant or data(on Ivybridge+) cache */
        message_type, /* read or write type */
        message_control,
        binding_table_index,
        write_commit_or_category, /* write commit on Sandybridge, category on Ivybridge+ */
        header_present)

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:29 +00:00
Xiang, Haihao
e97f0bca5f sampler/render/constant cache unit since Sandybridge
since Sandybrdige, there isn't a single function unit for data port read/write.
Instead sampler/render/constant cache unit is introduced, data port read/write
can be specified in a SEND instruction with different cache unit. To keep compatibility,
currently data port read always uses sampler cache unit however data port write
uses render cache unit

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:29 +00:00
Xiang, Haihao
6a3a9e7148 fix an error in commit cf76278
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:29 +00:00
Xiang, Haihao
46ffdd5df7 SEND uses GRFs instead of MRFs on Ivybridge
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:29 +00:00
Xiang, Haihao
67d4ed665d Add support for sample (00000) on Ivybridge
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:29 +00:00
Xiang, Haihao
c8d6bf353e Add support for data port read/write on Ivybridge
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:29 +00:00
Feng, Boqun
37d68103a8 Send instruction on PRE-ILK
[(<pred>)] send (<exec_size>) <pdst> <cdst> <src0> <desc>
2013-03-04 15:54:28 +00:00
Zhou Chang
52399867bf Add VME support in SEND 2013-03-04 15:54:28 +00:00
Xiang, Haihao
e7f4dc6e39 fix the parameters of register region
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:28 +00:00
Xiang, Haihao
85da7b9e8a send instruction on GEN6
[(<pred>)] send (<exec_size>) reg mreg imm6 imm32

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:28 +00:00
Xiang, Haihao
852216d6e3 fix notification count register
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:28 +00:00
Xiang, Haihao
27b4303a30 Support instructions which strictly follow the documents.
Previously some instructions parsed by this assembler don't follow the
documents.

Signed-off-by: Chen, Yangyang <yangyang.chen@intel.com>
Signed-off-by: Han, Haofu     <haofu.han@intel.com>
Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:28 +00:00
Chen, Yangyang
66649d7b4e 1. fix DOT
2. rule for instrseq

Signed-off-by: Chen, Yangyang <yangyang.chen@intel.com>
Signed-off-by: Han, Haofu     <haofu.han@intel.com>
2013-03-04 15:54:28 +00:00
Xiang, Haihao
14c0bd0fb3 Support for headerless write
Add a new parameter to write

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:28 +00:00
Xiang, Haihao
5405532ffc add support for math instruction on Sandybridge
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:28 +00:00
Xiang, Haihao
f1f5208e1e add support for plane instruction (pln)
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:28 +00:00
Xiang, Haihao
dcdde5347e Send on Sandybridge uses a message register as operand src0
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:27 +00:00
Xiang, Haihao
c2382cab55 no compression flag on Sandybridge
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:27 +00:00
Xiang, Haihao
718cd6cb42 print error message when using math function on Sandybridge.
Sandybridge doesn't have math funtion, instead it supports a set of math
instructions. The support for math instructions will be added later.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:27 +00:00
Xiang, Haihao
9d2be25838 sampler, urb write, null and gateway on Sandybridge are same as Ironlake.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:27 +00:00
Xiang, Haihao
a8458d5d5e add support for data port read on Sandybridge
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:27 +00:00
Xiang, Haihao
61784dbc97 add support for data port write on Sandybridge.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:27 +00:00
Xiang, Haihao
4f777e73f1 fix send instruction on Sandybridge
Send doesn't have implied move on Sandybridge, the SFID moves to bits[24,27] which
is used as the destination of the implied move on Prev GEN6.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:27 +00:00
Xiang, Haihao
55d81c4ce7 add AccWrCtrl flag on Sandybridge
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:27 +00:00
Xiang, Haihao
5bcf1f5a03 always set destination horiz stride for Align16 to 1 on Sandybridge.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:27 +00:00
Zou Nan hai
db8aedc745 use left recursion instead of right recursion to avoid memory exhausted issue when compiling large source files 2013-03-04 15:54:27 +00:00
Zou Nan hai
c6f2da4e82 1. type syntax :ud :uw etc
2. empty instruction option
3. remove a conflict
2013-03-04 15:54:26 +00:00
Zou Nan hai
5608d2765d support simple expression 2013-03-04 15:54:26 +00:00
Xiang Haihao
549b751afb Add support for GEN5
Add a new option [-g n], n=4(GEN4),5(GEN5). If don't use -g,
the default value is 4(GEN4)
2013-03-04 15:54:26 +00:00
Zou Nanhai
be9bcee15f Add support for labeled and conditional branches
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-03-04 15:54:26 +00:00
Zou Nan hai
807f8768e9 Add support for dp_read message. 2013-03-04 15:54:26 +00:00
Zou Nan hai
26afe90126 Add thread_spawner message target support. 2013-03-04 15:54:26 +00:00
Keith Packard
2033aea3dd Add conditional support to assembler. Add align16 dest support to disasm.
This is working towards round-tripping mesa programs. Still need indirect
register addressing and align16 source support.
2013-03-04 15:54:26 +00:00
Keith Packard
2d4d401d70 Add packed vector immediate values 2013-03-04 15:54:25 +00:00