This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Fix handling of integer fp immediates
ClosedPublic

Authored by john.brawn on Apr 11 2017, 10:16 AM.

Details

Summary

When an integer is used as an fp immediate we're failing to check the return value of getFP64Imm, so invalid values are silently permitted. Fix this by merging together the integer and real handling.

Diff Detail

Event Timeline

john.brawn created this revision.Apr 11 2017, 10:16 AM

Accidentally used the wrong diff, attach the correct one.

rengolin added inline comments.Apr 11 2017, 10:41 AM
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
2118

Why you don't need to "eat the token" anymore?

john.brawn added inline comments.Apr 12 2017, 7:47 AM
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
2118

It's now handled down on line 2127.

rengolin accepted this revision.Apr 19 2017, 10:03 AM

Sorry, LGTM. Thanks!

This revision is now accepted and ready to land.Apr 19 2017, 10:03 AM
john.brawn closed this revision.Apr 20 2017, 3:26 AM

Committed r300828.