This is an archive of the discontinued LLVM Phabricator instance.

[X86] Reject registers that require a REX prefix in inline asm constraints in 32-bit mode
ClosedPublic

Authored by craig.topper on Mar 2 2018, 10:39 AM.

Details

Summary

We don't currently reject r8-r15 or xmm8-32 in 32-bit mode.

I think we're probably also missing blocking sil/dil/spl/bpl but that probably requires a different fix strategy.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Mar 2 2018, 10:39 AM

Fix spl/bpl/sil/dil as well

Use existing isX86_64ExtendedReg and isX86_64NonExtLowByteReg to detect the registers we need to flag.

RKSimon added a comment.EditedMar 5 2018, 2:58 AM

Can we check that x32 build still work?

Add RUN line for gnux32

RKSimon accepted this revision.Mar 6 2018, 9:28 AM

LGTM - thanks

This revision is now accepted and ready to land.Mar 6 2018, 9:28 AM
This revision was automatically updated to reflect the committed changes.