This is an archive of the discontinued LLVM Phabricator instance.

[X86][Asm] Allow negative immediate to appear before bracketed expression
ClosedPublic

Authored by coby on Aug 2 2017, 10:27 AM.

Details

Reviewers
rnk
echristo
Summary

Currently, only non-negative immediate is allowed prior to a brac expression (memory reference).
MASM / GAS does not have any problem cope with the left side of the real line, so we should be able to as well.

Test: D36230

Diff Detail

Repository
rL LLVM

Event Timeline

coby edited the summary of this revision. (Show Details)Aug 2 2017, 10:29 AM
rnk accepted this revision.Aug 3 2017, 2:17 PM

lgtm, huh, no idea why that was there...

This revision is now accepted and ready to land.Aug 3 2017, 2:17 PM

Needs testcase.

lib/Target/X86/AsmParser/X86AsmParser.cpp
1943

It looks like this is implicitly truncating Imm from int64_t to int?

Oh, didn't spot the reference to D36230 for the testcase. It would still be nice to add a testcase to the LLVM repo, though (using "llvm-mc -x86-asm-syntax=intel").

coby added inline comments.Aug 9 2017, 2:19 PM
lib/Target/X86/AsmParser/X86AsmParser.cpp
1943

Indeed. thx :)

coby closed this revision.Aug 9 2017, 11:10 PM

commited as rL310528