This is an archive of the discontinued LLVM Phabricator instance.

[mips] Store 64-bit `li.d' operand as a single 8-byte value
ClosedPublic

Authored by atanasyan on Oct 10 2019, 3:29 AM.

Details

Summary

Now assembler generates two consecutive .4byte directives to store 64-bit `li.d' operand. The first directive stores high 4-byte of the value. The second directive stores low 4-byte of the value. But on 64-bit system we load this value at once and get wrong result if the system is little-endian.

This patch fixes the bug. It stores the `li.d' operand as a single 8-byte value.

Diff Detail

Event Timeline

atanasyan created this revision.Oct 10 2019, 3:29 AM
mstojanovic accepted this revision.Oct 11 2019, 6:19 AM

LGTM

llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
3436

With the elimination of HiImmOp64 and LoImmOp64 here the use of most of these variables goes down to a single place in the code which creates a chance for inlining, though they look fine even without that.

This revision is now accepted and ready to land.Oct 11 2019, 6:19 AM
This revision was automatically updated to reflect the committed changes.

Thanks for all reviews.