Skip to content
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

Very basic REP+MOVS support #104

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
72 changes: 72 additions & 0 deletions build/zinstructions.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions internal/data/x86_64.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11298,6 +11298,41 @@
<Opcode byte="90"/>
</Encoding>
</InstructionForm>
</Instruction>
<Instruction name="REP" summary="Repeat">
<InstructionForm gas-name="rep" go-name="REP" nacl-version="33">
<Encoding>
<Opcode byte="F3"/>
</Encoding>
</InstructionForm>
</Instruction>
<Instruction name="REPE" summary="Repeat">
<InstructionForm gas-name="repe" go-name="REPE" nacl-version="33">
<Encoding>
<Opcode byte="F3"/>
</Encoding>
</InstructionForm>
</Instruction>
<Instruction name="REPNE" summary="Repeat">
<InstructionForm gas-name="repne" go-name="REPNE" nacl-version="33">
<Encoding>
<Opcode byte="F2"/>
</Encoding>
</InstructionForm>
</Instruction>
<Instruction name="MOVSB" summary="Move byte at address at SI to DI">
<InstructionForm gas-name="movsb" go-name="MOVSB" nacl-version="33">
<Encoding>
<Opcode byte="A4"/>
</Encoding>
</InstructionForm>
</Instruction>
<Instruction name="MOVSW" summary="Move word at address at SI to DI">
<InstructionForm gas-name="movsw" go-name="MOVSW" nacl-version="33">
<Encoding>
<Opcode byte="A5"/>
</Encoding>
</InstructionForm>
</Instruction>
<Instruction name="NOT" summary="One's Complement Negation">
<InstructionForm gas-name="notb" go-name="NOTB" nacl-version="33">
Expand Down
45 changes: 45 additions & 0 deletions internal/inst/ztable.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/inst/ztable_test.go

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions operand/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,21 @@ func IsRAX(op Op) bool {
return op == reg.RAX
}

// IsRCX returns true if op is the 64-bit RCX register.
func IsRCX(op Op) bool {
return op == reg.RCX
}

// IsRSI returns true if op is the 64-bit RSI register.
func IsRSI(op Op) bool {
return op == reg.RSI
}

// IsRDI returns true if op is the 64-bit RDI register.
func IsRDI(op Op) bool {
return op == reg.RDI
}

// IsR8 returns true if op is an 8-bit general-purpose register.
func IsR8(op Op) bool {
return IsGP(op, 1)
Expand Down
81 changes: 81 additions & 0 deletions x86/zctors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.