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

i#2626 AArch64 encoder: Add support for fmov from GPR to FPR. #3008

Merged
merged 4 commits into from
May 16, 2018

Conversation

fhahn
Copy link
Contributor

@fhahn fhahn commented May 15, 2018

This commit adds encoder/decoder support for fmov from GPRs to FPRs.

It does not add support for the variant to move a 64 bit GPR to the top
of a 128 bit register (FMOV <Vd>.D[1], <Xn>). I think for that variant,
we would need a way to express the top half of a 128 bit register.

Issue #2626

This commit adds encoder/decoder support for fmov from GPRs to FPRs.

It does not add support for the variant to move a 64 bit GPR to the top
of a 128 bit register (FMOV <Vd>.D[1], <Xn>). I think for that variant,
we would need a way to express the top half of a 128 bit register.

Issue #2626

Change-Id: I9105b5ce5cc38a6b6cd33c8390a8822b091a44cf
@fhahn fhahn requested review from derekbruening and egrimley May 15, 2018 13:30
@fhahn
Copy link
Contributor Author

fhahn commented May 15, 2018

I plan to follow this change up with another one implementing instr_is_encoding_possible and adding a test making sure we reject some invalid variants of FMOV.

Change-Id: I15afa813985bd771ad5af18b78d68d294b7f5003
@@ -575,6 +575,15 @@
#define INSTR_CREATE_sub_shimm(dc, rd, rn, rm_or_imm, sht, sha) \
INSTR_CREATE_sub_shift(dc, rd, rn, rm_or_imm, sht, sha)

/**
* Creates a FMOV instruction to move between GPRs and floating point registers.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: s/a/an/

/**
* Creates a FMOV instruction to move between GPRs and floating point registers.
* \param dc The void * dcontext used to allocate memory for the instr_t.
* \param Rd The output register.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extra spaces here and on the next line

@derekbruening
Copy link
Contributor

we would need a way to express the top half of a 128 bit register.

Note that for x86 we do not identify which bits are used within SIMD registers: there are so many patterns we just have "N bits out of 128" without specifying which N and it is up to tools to dispatch on opcode if it matters.

Change-Id: I599803d8434b9b19e2606fd9b5b4dea997a0e195
@fhahn
Copy link
Contributor Author

fhahn commented May 16, 2018

Note that for x86 we do not identify which bits are used within SIMD registers: there are so many patterns we just have "N bits out of 128" without specifying which N and it is up to tools to dispatch on opcode if it matters.

Right, this works for FMOV, as the 128 bit register argument is not ambiguous

@fhahn fhahn merged commit ab738f7 into master May 16, 2018
@fhahn fhahn deleted the i2626-aarch64-fmov branch May 16, 2018 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants