From 98c3c0f38a0f3ad952f60556a74e53276c1a6bc4 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Fri, 25 Jul 2014 04:50:08 +0000 Subject: [PATCH] [X86] Add comments to clarify some non-obvious lines in the stackmap-nops.ll testcases. Based on code review from Philip Reames. Thanks Philip! llvm-svn: 213923 --- llvm/test/CodeGen/X86/stackmap-nops.ll | 3 +++ llvm/test/MC/X86/stackmap-nops.ll | 3 +++ 2 files changed, 6 insertions(+) diff --git a/llvm/test/CodeGen/X86/stackmap-nops.ll b/llvm/test/CodeGen/X86/stackmap-nops.ll index 3888603..7de63af 100644 --- a/llvm/test/CodeGen/X86/stackmap-nops.ll +++ b/llvm/test/CodeGen/X86/stackmap-nops.ll @@ -224,6 +224,9 @@ entry: tail call void (i64, i32, ...)* @llvm.experimental.stackmap(i64 28, i32 28) tail call void (i64, i32, ...)* @llvm.experimental.stackmap(i64 29, i32 29) tail call void (i64, i32, ...)* @llvm.experimental.stackmap(i64 30, i32 30) +; Add an extra stackmap with a zero-length shadow to thwart the shadow +; optimization. This will force all 15 bytes of the previous shadow to be +; padded with nops. tail call void (i64, i32, ...)* @llvm.experimental.stackmap(i64 31, i32 0) ret void } diff --git a/llvm/test/MC/X86/stackmap-nops.ll b/llvm/test/MC/X86/stackmap-nops.ll index 2b0b88c..a0d4418 100644 --- a/llvm/test/MC/X86/stackmap-nops.ll +++ b/llvm/test/MC/X86/stackmap-nops.ll @@ -41,6 +41,9 @@ entry: tail call void (i64, i32, ...)* @llvm.experimental.stackmap(i64 13, i32 13) tail call void (i64, i32, ...)* @llvm.experimental.stackmap(i64 14, i32 14) tail call void (i64, i32, ...)* @llvm.experimental.stackmap(i64 15, i32 15) +; Add an extra stackmap with a zero-length shadow to thwart the shadow +; optimization. This will force all 15 bytes of the previous shadow to be +; padded with nops. tail call void (i64, i32, ...)* @llvm.experimental.stackmap(i64 16, i32 0) ret void } -- 2.7.4