[PATCH] D13132: [X86] Emit .cfi_escape GNU_ARGS_SIZE when adjusting the stack before calls

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 23:44:12 PDT 2015


majnemer added a subscriber: majnemer.

================
Comment at: lib/MC/MCAsmStreamer.cpp:1023
@@ +1022,3 @@
+  OS << "\t.cfi_escape ";
+  if (Values.size()) {
+    size_t e = Values.size() - 1;
----------------
`!Values.empty()`

================
Comment at: lib/Target/X86/X86FrameLowering.cpp:2074
@@ +2073,3 @@
+        MF.getInfo<X86MachineFunctionInfo>()->getHasPushSequences()) {
+      const uint8_t GNU_ARGS_SIZE = 0x2e;
+      uint8_t Buffer[9] = { GNU_ARGS_SIZE };
----------------
Why not use `DW_CFA_GNU_args_size` ?

================
Comment at: test/CodeGen/X86/push-cfi.ll:71
@@ +70,3 @@
+
+; If we did use pushes, we need to resest GNU_ARGS_SIZE before a call
+; without parameters
----------------
"resest"

================
Comment at: test/CodeGen/X86/push-cfi.ll:98
@@ +97,3 @@
+
+; If we did use pushes, we need to resest GNU_ARGS_SIZE before a call
+; without parameters
----------------
resest

================
Comment at: test/CodeGen/X86/push-cfi.ll:116
@@ +115,3 @@
+}
+; This is actuall enfficient - we don't need to repeat the .cfi_escape twice.
+; CHECK-LABEL: test7:
----------------
actually efficient


http://reviews.llvm.org/D13132





More information about the llvm-commits mailing list