This is an archive of the discontinued LLVM Phabricator instance.

aarch64: support target-specific .req assembler directive
ClosedPublic

Authored by jannau on Jun 19 2014, 12:28 AM.

Details

Reviewers
compnerd
Summary

Based on the support for .req on ARM. The aarch64 variant has to keep track if the alias register was a vector register (v0-31) or a general purpose or VFP/Advanced SIMD ([bhsdq]0-31) register.

Diff Detail

Event Timeline

jannau updated this revision to Diff 10609.Jun 19 2014, 12:28 AM
jannau retitled this revision from to aarch64: support target-specific .req assembler directive.
jannau updated this object.
jannau edited the test plan for this revision. (Show Details)
jannau added a reviewer: compnerd.
jannau added a subscriber: Unknown Object (MLST).
compnerd added inline comments.Jun 19 2014, 6:36 PM
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
1837

Seems like a superfluous comment.

1887

This feels really really similar to the previous handling for the lookup. Why not take an extra parameter to indicate if you want a GPR or a VFP register alias, and then share the code for this?

3075

AArch64-M? Why does this not apply to -A class CPUs? I dont see where you are filtering them out.

3968

This ordering feels weird. You loose the ability to reference the mnemonic by lexing the token up front.

3969

This can be scoped to the RegNum == -1 case cant it?

3998

std::make_pair would be nicer.

4011

I think it would be better if the caret pointed to the invalid argument.

test/MC/AArch64/dot-req-case-insensitive.s
2

Please be more precise with the target. -triple arm64-eabi is a good choice.

test/MC/AArch64/dot-req-diagnostics.s
2

Why the tempfile usage here? You should be able to just use pipes for this.

3

You arent using the CHECK-ERROR-ARM64 prefix.

8

Why the weird indentation?

14

These are not checked. You need to do:

not llvm-mc -triple aarch64-eabi %s 2>&1 | FileCheck %s -check-prefix CHECK -check-prefix CHECK-ERROR

If you want to check the CHECK and CHECK-NOT lines.

test/MC/AArch64/dot-req.s
13

What happened to Alice? I thought she always accompanied Bob :-p.

jannau updated this revision to Diff 10688.Jun 20 2014, 2:39 AM

All review comments not individually commented on should be addressed

compnerd accepted this revision.Jun 23 2014, 10:54 PM
compnerd edited edge metadata.

LGTM with some minor nits.

lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
57

This should be matchRegisterNameAlias ... we changed the style guide at some point to camel case for function names.

1830

Extraneous space.

1833

Almost feels that this might be better as a ternary.

3977

C++ style casts are preferable IMO.

4001

Return type goes on the same line unless it doesn't fit.

This revision is now accepted and ready to land.Jun 23 2014, 10:54 PM
jannau updated this revision to Diff 10780.Jun 24 2014, 3:23 AM
jannau edited edge metadata.

addressed all review comments

jannau updated this revision to Diff 10799.Jun 24 2014, 11:27 AM

rebased on top of r211605 - "Implement pseudo LDR <reg>, =<literal/label> for AArch64"

jannau updated this revision to Diff 10803.Jun 24 2014, 2:38 PM

removed tabs used for indent crept in due editor misconfiguration

compnerd closed this revision.Jul 1 2014, 9:59 PM

Committed as SVN r212161. Thanks for the patch!