From db42bb440e76399b89fc8ae04644441a2a5f6821 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Fri, 15 Feb 2019 22:16:41 +0100 Subject: ARM64 assembly pack: make it Windows-friendly. "Windows friendliness" means a) unified PIC-ification, unified across all platforms; b) unified commantary delimiter; c) explicit ldur/stur, as Visual Studio assembler can't automatically encode ldr/str as ldur/stur when needed. Reviewed-by: Paul Dale Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/8256) --- crypto/perlasm/arm-xlate.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'crypto/perlasm') diff --git a/crypto/perlasm/arm-xlate.pl b/crypto/perlasm/arm-xlate.pl index b953f1fc19..af6f7d3188 100755 --- a/crypto/perlasm/arm-xlate.pl +++ b/crypto/perlasm/arm-xlate.pl @@ -103,6 +103,12 @@ my $asciz = sub { { ""; } }; +my $adrp = sub { + my ($args,$comment) = split(m|\s*//|,shift); + "\tadrp\t$args\@PAGE"; +} if ($flavour =~ /ios64/); + + sub range { my ($r,$sfx,$start,$end) = @_; @@ -132,6 +138,10 @@ sub expand_line { $line =~ s/\b(\w+)/$GLOBALS{$1} or $1/ge; + if ($flavour =~ /ios64/) { + $line =~ s/#:lo12:(\w+)/$1\@PAGEOFF/; + } + return $line; } -- cgit v1.2.3