This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ENTER/BOUND operands order.

Hi Jan, Slawomir,

> Unfortunately as Jan said, these instructions seem to be broken. Intel 
> manual is pretty accurate about the syntax of EVEX-encoded instructions. 
> Unit tests can not prove anything in this specific case. Opmask registers as 
> well as EVEX flags are encoded using these braces located directly next to 
> the instruction operands.
That's not it.  As I said, the document only expresses required elements that an
assembler could implement.  Whether to treat it as an ASM syntax operand is
purely a SW tool implementation choice, as is the placement of such a modifier.
How a parser chooses to accept token definitions for this element is another
implementation detail for the tool implementer and doesn't belong in this
document.  That's almost a quote from the document's author.

Thus, order of operands is implementation dependent, and for GAS it is the
following: RC/SAE operand goes between SIMD-operand and non-SIMD operand (or
after SIMD-operand if there is no  non-SIMD one).  That was suggested when the
patch was sent (in July'13), and there were no objections to it.  Now it is
already in binutils 2.24, and there is nor reason neither possibility to change
it.  And even if it was committed yesterday, what would be a good reason to just
reorder operands?

> There is also a lot of examples which describe 
> various forms of instructions encoding and location of these flags. For 
> instance:
> ***
> Additionally, the EVEX encoding scheme of AVX-512 Foundation can express 
> conditional vector addition as
> VADDPS zmm1 {k1}{z}, zmm2, zmm3
> ***
> ****
> "An example of use would be in the following instructions:
> vaddps zmm7 {k6}, zmm2, zmm4, {rd-sae}"
> ****
> ****
> ; instructions with memory operands
> vmulps zmm7 {k6}, zmm2,[rax], {rd-sae}
> ****
These examples don't specify assembler syntax, though GAS accepts them as is, as
they obey the GAS operands order I described above.

> Maybe the version of the reference manual is the case. I use 319433-17.pdf.
I looked at 319433-15, but for our case that seems not to matter.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]