This is an archive of the discontinued LLVM Phabricator instance.

[mips] Adding support for symbolic constants for mips64r6
AbandonedPublic

Authored by petarj on Jul 25 2016, 6:37 AM.

Details

Summary

This patch adds support for symbolic constants for mips64r6.

Diff Detail

Event Timeline

mamidzic updated this revision to Diff 65338.Jul 25 2016, 6:37 AM
mamidzic retitled this revision from to [mips] Adding support for symbolic constants for mips64r6.
mamidzic updated this object.
dsanders edited edge metadata.Jul 25 2016, 8:40 AM

This patch affects all Mips subtargets. Could you correct the title and summary of the patch?

lib/Target/Mips/AsmParser/MipsAsmParser.cpp
4611–4619

The change to parseImm() breaks the following code:

.set foo,$25
jr foo

Before this change, the 'foo' was parsed by parseAnyRegister() and was added to the operand list as the register $25. After this change, it's parsed by parseImm() and added to the operand list as the expression 'foo'.

test/MC/Mips/mips64r6/immediate.s
1

(regarding the directory): This isn't mips64r6 specific so it should be moved up one level to test/MC/Mips
(regarding the filename): The filename should mention symbols since this test is defining a symbol and making sure it's evaluated at assembly time.

dsanders requested changes to this revision.Jul 28 2016, 4:54 AM
dsanders edited edge metadata.
This revision now requires changes to proceed.Jul 28 2016, 4:54 AM
abeserminji commandeered this revision.Feb 1 2017, 8:43 AM
abeserminji added a reviewer: mamidzic.
abeserminji added a subscriber: abeserminji.

Hello,

I've checked this change and concluded that provided test (test/MC/Mips/mips64r6/immediate.s) is passing successfully after r277995.

@sdardis
Do you maybe know some case for which mentioned revision does not work well?

I don't recall any other cases.

petarj commandeered this revision.Feb 2 2017, 3:47 PM
petarj added a reviewer: abeserminji.

This issue should be closed in that case.

petarj abandoned this revision.Feb 2 2017, 3:52 PM

Abandoning change since per Aleksandar's words it was fixed by:

commit 7dd6fd6b287f4a425ad4c85c485afa69d3bbf0f8
Author: Daniel Sanders <daniel.sanders@imgtec.com>
Date: Mon Aug 8 11:50:25 2016 +0000

Re-commit r277988: [mips][ias] Fix all the hacks related to MIPS-specific unary operators (%hi/%lo/%gp_rel/etc.).

Hopefully with the MSVC builds fixed. I've added a missing '#include <tuple>'
that gcc and clang don't seem to need.