From 0a86f668212acfa6b48abacbc17b99c234eedf33 Mon Sep 17 00:00:00 2001 From: Emilia Kasper Date: Tue, 15 Mar 2016 23:04:14 +0100 Subject: [PATCH] On Windows, page walking is known as __chkstk. Reviewed-by: Andy Polyakov --- crypto/bn/asm/x86-mont.pl | 2 ++ crypto/bn/asm/x86_64-mont.pl | 2 ++ crypto/bn/asm/x86_64-mont5.pl | 2 ++ 3 files changed, 6 insertions(+) diff --git a/crypto/bn/asm/x86-mont.pl b/crypto/bn/asm/x86-mont.pl index 50d3350714..7c4e0b2ee3 100755 --- a/crypto/bn/asm/x86-mont.pl +++ b/crypto/bn/asm/x86-mont.pl @@ -88,6 +88,8 @@ $frame=32; # size of above frame rounded up to 16n &and ("esp",-64); # align to cache line + # An OS-agnostic version of __chkstk. + # # Some OSes (Windows) insist on stack being "wired" to # physical memory in strictly sequential manner, i.e. if stack # allocation spans two pages, then reference to farmost one can diff --git a/crypto/bn/asm/x86_64-mont.pl b/crypto/bn/asm/x86_64-mont.pl index f8070ca246..3e0a78e41f 100755 --- a/crypto/bn/asm/x86_64-mont.pl +++ b/crypto/bn/asm/x86_64-mont.pl @@ -130,6 +130,8 @@ $code.=<<___; mov %r11,8(%rsp,$num,8) # tp[num+1]=%rsp .Lmul_body: + # An OS-agnostic version of __chkstk. + # # Some OSes (Windows) insist on stack being "wired" to # physical memory in strictly sequential manner, i.e. if stack # allocation spans two pages, then reference to farmost one can diff --git a/crypto/bn/asm/x86_64-mont5.pl b/crypto/bn/asm/x86_64-mont5.pl index 712bfbc6b8..aa6a5d1d0e 100755 --- a/crypto/bn/asm/x86_64-mont5.pl +++ b/crypto/bn/asm/x86_64-mont5.pl @@ -115,6 +115,8 @@ $code.=<<___; mov %rax,8(%rsp,$num,8) # tp[num+1]=%rsp .Lmul_body: + # An OS-agnostic version of __chkstk. + # # Some OSes (Windows) insist on stack being "wired" to # physical memory in strictly sequential manner, i.e. if stack # allocation spans two pages, then reference to farmost one can -- 2.34.1