HomePhabricator

[Driver][X86] Add -mpad-max-prefix-size

Authored by skan on Apr 6 2020, 9:25 PM.

Description

[Driver][X86] Add -mpad-max-prefix-size

Summary:
The option -mpad-max-prefix-size performs some checking and delegate to MC option -x86-pad-max-prefix-size. This option is designed for eliminate NOPs when we need to align something by adding redundant prefixes to instructions, e.g. it can be used along with -malign-branch, -malign-branch-boundary to prefix padding branch.

It has similar (but slightly different) effect as GAS's option -malign-branch-prefix-size, e.g. -mpad-max-prefix-size can also elminate NOPs emitted by align directive, so we use a different name here. I remove the option -malign-branch-prefix-size since is unimplemented and not needed. If we need to be compatible with GAS, we can make -malign-branch-prefix-size an alias for this option later.

Reviewers: jyknight, reames, MaskRay, craig.topper, LuoYuanke

Reviewed By: MaskRay, LuoYuanke

Subscribers: annita.zhang, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77628

Details

Committed
skanApr 9 2020, 4:34 AM
Reviewer
MaskRay
Differential Revision
D77628: [Driver][X86] Add -mpad-max-prefix-size
Parents
rGf355e1510490: [gn build] Port 44f0d7f1364
Branches
Unknown
Tags
Unknown