-
Notifications
You must be signed in to change notification settings - Fork 571
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 fp/simd encode: Add support for vector and scalar FMUL. #2896
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,18 +47,33 @@ | |
*/ | ||
#define FSZ_HALF 1 | ||
|
||
/** | ||
* Operand indication half-precision floating point vector elements. | ||
*/ | ||
#define OPND_CREATE_HALF() OPND_CREATE_INT8(FSZ_HALF) | ||
|
||
/** | ||
* Used in an additional immediate source operand to a vector operation, denotes | ||
* single-precision floating point vector elements. See \ref sec_IR_AArch64. | ||
*/ | ||
#define FSZ_SINGLE 2 | ||
|
||
/** | ||
* Operand indication single-precision floating point vector elements. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto |
||
*/ | ||
#define OPND_CREATE_SINGLE() OPND_CREATE_INT8(FSZ_SINGLE) | ||
|
||
/** | ||
* Used in an additional immediate source operand to a vector operation, denotes | ||
* double-precision floating point vector elements. See \ref sec_IR_AArch64. | ||
*/ | ||
#define FSZ_DOUBLE 3 | ||
|
||
/** | ||
* Operand indication double-precision floating point vector elements. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto |
||
*/ | ||
#define OPND_CREATE_DOUBLE() OPND_CREATE_INT8(FSZ_DOUBLE) | ||
|
||
|
||
/** | ||
* @file dr_ir_macros_aarch64.h | ||
|
@@ -557,6 +572,27 @@ | |
#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 FMUL vector instruction. | ||
* \param dc The void * dcontext used to allocate memory for the instr_t. | ||
* \param Rd output register | ||
* \param Rm input register | ||
* \param Rn input register | ||
* \param width vector element width as immediate | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: All 4 of these are nicer as complete sentences: "The output register.", etc. Maybe for the width you could reference OPND_CREATE_DOUBLE() + the other 2 (just trying to imagine what would make it easy for users). |
||
*/ | ||
#define INSTR_CREATE_fmul_vector(dc, Rd, Rm, Rn, width) \ | ||
instr_create_1dst_3src(dc, OP_fmul, Rd, Rm, Rn, width) | ||
|
||
/** | ||
* Creates a FMUL floating point instruction. | ||
* \param dc The void * dcontext used to allocate memory for the instr_t. | ||
* \param Rd output register | ||
* \param Rm input register | ||
* \param Rn input register | ||
*/ | ||
#define INSTR_CREATE_fmul_scalar(dc, Rd, Rm, Rn) \ | ||
instr_create_1dst_2src(dc, OP_fmul, Rd, Rm, Rn) | ||
/* DR_API EXPORT END */ | ||
|
||
#endif /* INSTR_CREATE_H */ |
Large diffs are not rendered by default.
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.
s/indication/indicating/
Maybe also:
s/elements./elements for the other operands of the containing instruction./