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#1569 AArch64: Add macro to create ADR and ADRP instructions. #2317

Merged
merged 4 commits into from
Apr 7, 2017

Conversation

fhahn
Copy link
Contributor

@fhahn fhahn commented Mar 30, 2017

Also adds support for instruction operands to ADR and ADRP encoders.

Also adds support for instruction operands to ADR and ADRP encoders.
uint bits;
if (!opnd_is_rel_addr(opnd))
if (opnd_is_rel_addr(opnd))
Copy link
Contributor

Choose a reason for hiding this comment

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

style: {} for multi-line body

if (opnd_is_rel_addr(opnd))
offset = (ptr_int_t)opnd_get_addr(opnd) -
(ptr_int_t)((ptr_uint_t)pc >> scale << scale);
else if (opnd.kind == INSTR_kind)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

if (opnd_is_rel_addr(opnd))
offset = (ptr_int_t)opnd_get_addr(opnd) -
(ptr_int_t)((ptr_uint_t)pc >> scale << scale);
else if (opnd.kind == INSTR_kind)
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefer the interface opnd_is_instr()

@derekbruening
Copy link
Contributor

nit: commit body starting with "Also" is a little odd (normally the title's content is included in the body)

@@ -334,6 +334,10 @@
instr_create_1dst_4src((dc), OP_sub, (rd), (rn), (rm_or_imm), (sht), (sha))
#define INSTR_CREATE_svc(dc, imm) \
instr_create_0dst_1src((dc), OP_svc, (imm))
#define INSTR_CREATE_adr(dc, rt, imm) \
Copy link
Contributor

Choose a reason for hiding this comment

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

There's no doxygen header for these. Looking above: there isn't for any of these. Thus these will not show up in the html docs at all.

OK I see above a FIXME for adding them -- but I would suggest including them on any new code. The original suggestion, still in place, is to automatically generate all of these (including the doxygen).

@fhahn fhahn merged commit 428b896 into master Apr 7, 2017
@fhahn fhahn deleted the i1569-create-adr branch April 7, 2017 09:56
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