[PATCH] D77728: [Driver][X86] Add an alias for -mpad-max-prefix-size
Kan Shengchen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 9 06:28:42 PDT 2020
skan updated this revision to Diff 256268.
skan edited the summary of this revision.
skan added a comment.
Rebase(didn't rebase correctly last time)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77728/new/
https://reviews.llvm.org/D77728
Files:
clang/include/clang/Driver/Options.td
clang/test/Driver/x86-malign-branch.c
clang/test/Driver/x86-malign-branch.s
Index: clang/test/Driver/x86-malign-branch.s
===================================================================
--- clang/test/Driver/x86-malign-branch.s
+++ clang/test/Driver/x86-malign-branch.s
@@ -9,5 +9,7 @@
// RUN: %clang -target x86_64 -mpad-max-prefix-size=5 %s -c -### 2>&1 | FileCheck %s --check-prefix=PREFIX
// PREFIX: "-mllvm" "-x86-pad-max-prefix-size=5"
+// RUN: %clang -target x86_64 -malign-branch-prefix-size=5 %s -c -### 2>&1 | FileCheck %s --check-prefix=PREFIX
+
// RUN: %clang -target x86_64 -mbranches-within-32B-boundaries %s -c -### 2>&1 | FileCheck %s --check-prefix=32B
// 32B: "-mllvm" "-x86-branches-within-32B-boundaries"
Index: clang/test/Driver/x86-malign-branch.c
===================================================================
--- clang/test/Driver/x86-malign-branch.c
+++ clang/test/Driver/x86-malign-branch.c
@@ -24,6 +24,9 @@
// RUN: %clang -target x86_64 -mpad-max-prefix-size=15 %s -c -### 2>&1 | FileCheck %s --check-prefix=PREFIX-15
// PREFIX-15: "-mllvm" "-x86-pad-max-prefix-size=15"
+/// Test -malign-branch-prefix-size= for GCC compatibilty
+// RUN: %clang -target x86_64 -malign-branch-prefix-size=5 %s -c -### 2>&1 | FileCheck %s --check-prefix=PREFIX-5
+
/// Test -mbranches-within-32B-boundaries
// RUN: %clang -target x86_64 -mbranches-within-32B-boundaries %s -c -### 2>&1 | FileCheck %s --check-prefix=32B
// 32B: "-mllvm" "-x86-branches-within-32B-boundaries"
Index: clang/include/clang/Driver/Options.td
===================================================================
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -2189,6 +2189,8 @@
HelpText<"Specify the boundary's size to align branches">;
def mpad_max_prefix_size_EQ : Joined<["-"], "mpad-max-prefix-size=">, Group<m_Group>, Flags<[DriverOption]>,
HelpText<"Specify maximum number of prefixes to use for padding">;
+def malign_branch_prefix_size_EQ : Joined<["-"], "malign-branch-prefix-size=">, Group<m_Group>, Flags<[DriverOption]>, Alias<mpad_max_prefix_size_EQ>,
+ HelpText<"Alias for -mpad-max-prefix-size">;// Alias for GCC compatibility
def mbranches_within_32B_boundaries : Flag<["-"], "mbranches-within-32B-boundaries">, Flags<[DriverOption]>, Group<m_Group>,
HelpText<"Align selected branches (fused, jcc, jmp) within 32-byte boundary">;
def mfancy_math_387 : Flag<["-"], "mfancy-math-387">, Group<clang_ignored_m_Group>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77728.256268.patch
Type: text/x-patch
Size: 2414 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200409/8bfca949/attachment-0001.bin>
More information about the cfe-commits
mailing list