mux1 vs mux2 on IA-64

mux1 vs mux2 on IA-64

Why is it that mux1 only has five possible permutations, whereas mux2 has any possible permutation?

I was searching "the entire Internet" for the answer, and I couldn't find it. Maybe an Intel Itanium engineer can brief me on this one?

Thanks,

Adam

8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Quoting - Adam Kachwalla

Why is it that mux1 only has five possible permutations, whereas mux2 has any possible permutation?

I was searching "the entire Internet" for the answer, and I couldn't find it. Maybe an Intel Itanium engineer can brief me on this one?

Thanks,

Adam

mux2 operates on 4 elements. Therefore, you need 8-bitsin the instruction decode field (4 elems x4 possible destinations = 4 x 2 bits) to have all possible permutations.

mux1 operates on 8 elements. To have all possible permutations, you would need 24-bits in the instruction decode field (8 elems x8 possible destinations = 8 x 3 bits). Because only 8-bits are available in the instruction coding, a set of 5 common permutations are provided.

Quoting - Terence Sych (Intel)

Quoting - Adam Kachwalla

Why is it that mux1 only has five possible permutations, whereas mux2 has any possible permutation?

I was searching "the entire Internet" for the answer, and I couldn't find it. Maybe an Intel Itanium engineer can brief me on this one?

Thanks,

Adam

mux2 operates on 4 elements. Therefore, you need 8-bitsin the instruction decode field (4 elems x4 possible destinations = 4 x 2 bits) to have all possible permutations.

mux1 operates on 8 elements. To have all possible permutations, you would need 24-bits in the instruction decode field (8 elems x8 possible destinations = 8 x 3 bits). Because only 8-bits are available in the instruction coding, a set of 5 common permutations are provided.

Couldn't you use an imm24 field?

Quoting - Adam Kachwalla

Couldn't you use an imm24 field?

There isn't enough space in a 41-bit instruction for a 24-bit field.

For mux1/mux2, you need 6-bits for QP, 14-bits for r1 and r2, 13-bits for opcode and extensions. That leaves the 8-bits for the permutations.

Quoting - Terence Sych (Intel)

There isn't enough space in a 41-bit instruction for a 24-bit field.

For mux1/mux2, you need 6-bits for QP, 14-bits for r1 and r2, 13-bits for opcode and extensions. That leaves the 8-bits for the permutations.

So then how do some instructions (such as movl) take imm64 fields?

Quoting - Adam Kachwalla

So then how do some instructions (such as movl) take imm64 fields?

Those instructions are special cases where you need to encode an address in the instruction. For the sake of simplicity, you'd like to severely limit those uses.

Quoting - Terence Sych (Intel)

Those instructions are special cases where you need to encode an address in the instruction. For the sake of simplicity, you'd like to severely limit those uses.

What about:

(qp)movl r3=imm64

(qp)mux1 r1=r2, r3

Or is mux1 like how it is so that only one instruction is needed?

Quoting - Adam Kachwalla

What about:

(qp)movl r3=imm64

(qp)mux1 r1=r2, r3

Or is mux1 like how it is so that only one instruction is needed?

movl needs to have an imm64 field. mux1 doesn't really need to. If mux1 did, it would make instruction decode much more difficult.

Leave a Comment

Please sign in to add a comment. Not a member? Join today