-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x86: Update code-generator documentation #7375
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contributions to the documentation.
doc/compiler/x/OpCodeEncoding.md
Outdated
|
||
``` | ||
128 - SSE, VEX_L128, EVEX_L128 | ||
256 - VEX_L256, EVEX_L128 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be EVEX_L256
?
doc/compiler/x/OpCodeEncoding.md
Outdated
|
||
### Generating SIMD instructions | ||
|
||
Generating SIMD instructions is simple. You may optionally specify the method of which to encode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"of which" -> "by which"
doc/compiler/x/OpCodeEncoding.md
Outdated
generateRegRegInstruction(TR::InstOpCode::MOVDQURegReg, node, resultReg, valueReg, cg, OMR::X86::VEX_L128); | ||
``` | ||
|
||
By not specifying an opcode encoding method, the code-generator will use method specified |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"code-generator" -> "code generator"
It isn't our convention to hyphenate these words.
doc/compiler/x/OpCodeEncoding.md
Outdated
``` | ||
|
||
By not specifying an opcode encoding method, the code-generator will use method specified | ||
on opcodes definition. If the instruction is labeled as VEX_L128, and AVX is not supported, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"use the method specified on an opcode's definition."
doc/compiler/x/OpCodeEncoding.md
Outdated
} Encoding; | ||
``` | ||
|
||
#### 128-Bit vmovdqu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this included just as an example, or is there some other reason for calling out 128-bit vmovdqu ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an example
doc/compiler/x/OpCodeEncoding.md
Outdated
|
||
To dynamically find the best encoding method you may call ```getSIMDEncoding(&cpu, vl)```. | ||
This query uses flags stored on the instruction to determine the best encoding method for | ||
the given instruction, cpu, and vector length. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cpu -> CPU
doc/compiler/x/OpCodeEncoding.md
Outdated
|
||
#### Dynamically determining the best encoding method | ||
|
||
To dynamically find the best encoding method you may call ```getSIMDEncoding(&cpu, vl)```. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there restrictions on when you can call this function? e.g., can you only call it during binary encoding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, doesn't matter when/where you call it
doc/compiler/x/OpCodeEncoding.md
Outdated
|
||
#### Dynamically determining the best encoding method | ||
|
||
To dynamically find the best encoding method you may call ```getSIMDEncoding(&cpu, vl)```. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you mention the class this function is a member of?
This method will return ```OMR::X86::Bad``` if the opcode is not supported at the given | ||
vector length and will also throw an assertion failure if the instruction is missing | ||
CPU feature requirements flags. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Precede this with "For example," here if that's what it is.
doc/compiler/x/OpCodeEncoding.md
Outdated
|
||
#### Dynamically determining the best encoding method | ||
|
||
To dynamically find the best encoding method you may call ```getSIMDEncoding(&cpu, vl)```. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a permalink to where it is defined.
Signed-off-by: Bradley Wood <[email protected]>
@0xdaryl See the force-push |
No description provided.