Latest update
This commit is contained in:
@@ -66,18 +66,26 @@ $inc="x12";
|
||||
{
|
||||
my ($Xl,$Xm,$Xh,$IN)=map("q$_",(0..3));
|
||||
my ($t0,$t1,$t2,$xC2,$H,$Hhl,$H2)=map("q$_",(8..14));
|
||||
my $_byte = ($flavour =~ /win/ ? "DCB" : ".byte");
|
||||
|
||||
$code=<<___;
|
||||
#include "arm_arch.h"
|
||||
|
||||
#if __ARM_MAX_ARCH__>=7
|
||||
.text
|
||||
___
|
||||
$code.=".arch armv8-a+crypto\n" if ($flavour =~ /64/);
|
||||
$code.=<<___ if ($flavour !~ /64/);
|
||||
$code.=".arch armv8-a+crypto\n.text\n" if ($flavour =~ /64/);
|
||||
$code.=<<___ if ($flavour !~ /64/);
|
||||
.fpu neon
|
||||
.code 32
|
||||
#undef __thumb2__
|
||||
#ifdef __thumb2__
|
||||
.syntax unified
|
||||
.thumb
|
||||
# define INST(a,b,c,d) $_byte c,0xef,a,b
|
||||
#else
|
||||
.code 32
|
||||
# define INST(a,b,c,d) $_byte a,b,c,0xf2
|
||||
#endif
|
||||
|
||||
.text
|
||||
___
|
||||
|
||||
################################################################################
|
||||
@@ -752,7 +760,7 @@ if ($flavour =~ /64/) { ######## 64-bit code
|
||||
# since ARMv7 instructions are always encoded little-endian.
|
||||
# correct solution is to use .inst directive, but older
|
||||
# assemblers don't implement it:-(
|
||||
sprintf ".byte\t0x%02x,0x%02x,0x%02x,0x%02x\t@ %s %s",
|
||||
sprintf "INST(0x%02x,0x%02x,0x%02x,0x%02x)\t@ %s %s",
|
||||
$word&0xff,($word>>8)&0xff,
|
||||
($word>>16)&0xff,($word>>24)&0xff,
|
||||
$mnemonic,$arg;
|
||||
@@ -767,13 +775,17 @@ if ($flavour =~ /64/) { ######## 64-bit code
|
||||
# fix up remaining new-style suffixes
|
||||
s/\],#[0-9]+/]!/o;
|
||||
|
||||
s/cclr\s+([^,]+),\s*([a-z]+)/mov$2 $1,#0/o or
|
||||
s/cclr\s+([^,]+),\s*([a-z]+)/mov.$2 $1,#0/o or
|
||||
s/vdup\.32\s+(.*)/unvdup32($1)/geo or
|
||||
s/v?(pmull2?)\.p64\s+(.*)/unvpmullp64($1,$2)/geo or
|
||||
s/\bq([0-9]+)#(lo|hi)/sprintf "d%d",2*$1+($2 eq "hi")/geo or
|
||||
s/^(\s+)b\./$1b/o or
|
||||
s/^(\s+)ret/$1bx\tlr/o;
|
||||
|
||||
if (s/^(\s+)mov\.([a-z]+)/$1mov$2/) {
|
||||
print " it $2\n";
|
||||
}
|
||||
|
||||
print $_,"\n";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user