mirror of https://github.com/openssl/openssl.git
Fix sm3ss1 translation issue in sm3-armv8.pl
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17542)
This commit is contained in:
parent
acce055778
commit
bca6cc53d4
|
@ -109,7 +109,7 @@ ___
|
||||||
|
|
||||||
$code=<<___;
|
$code=<<___;
|
||||||
#include "arm_arch.h"
|
#include "arm_arch.h"
|
||||||
.arch armv8.2-a+sm4
|
.arch armv8.2-a
|
||||||
.text
|
.text
|
||||||
___
|
___
|
||||||
|
|
||||||
|
@ -222,8 +222,8 @@ my %sm3partopcode = (
|
||||||
"sm3partw1" => 0xce60C000,
|
"sm3partw1" => 0xce60C000,
|
||||||
"sm3partw2" => 0xce60C400);
|
"sm3partw2" => 0xce60C400);
|
||||||
|
|
||||||
my %sm3sslopcode = (
|
my %sm3ss1opcode = (
|
||||||
"sm3ssl" => 0xce400000);
|
"sm3ss1" => 0xce400000);
|
||||||
|
|
||||||
my %sm3ttopcode = (
|
my %sm3ttopcode = (
|
||||||
"sm3tt1a" => 0xce408000,
|
"sm3tt1a" => 0xce408000,
|
||||||
|
@ -241,14 +241,13 @@ sub unsm3part {
|
||||||
$mnemonic,$arg;
|
$mnemonic,$arg;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub unsm3ssl {
|
sub unsm3ss1 {
|
||||||
my ($mnemonic,$arg)=@_;
|
my ($mnemonic,$arg)=@_;
|
||||||
|
|
||||||
$arg=~ m/[qv](\d+)[^,]*,\s*[qv](\d+)[^,]*,\s*[qv](\d+)[^,]*,
|
$arg=~ m/[qv](\d+)[^,]*,\s*[qv](\d+)[^,]*,\s*[qv](\d+)[^,]*,\s*[qv](\d+)/o
|
||||||
\s*[qv](\d+)/o
|
|
||||||
&&
|
&&
|
||||||
sprintf ".inst\t0x%08x\t//%s %s",
|
sprintf ".inst\t0x%08x\t//%s %s",
|
||||||
$sm3sslopcode{$mnemonic}|$1|($2<<5)|($3<<16)|($4<<10),
|
$sm3ss1opcode{$mnemonic}|$1|($2<<5)|($3<<16)|($4<<10),
|
||||||
$mnemonic,$arg;
|
$mnemonic,$arg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,7 +273,7 @@ foreach(split("\n",$code)) {
|
||||||
s/\`([^\`]*)\`/eval($1)/ge;
|
s/\`([^\`]*)\`/eval($1)/ge;
|
||||||
|
|
||||||
s/\b(sm3partw[1-2])\s+([qv].*)/unsm3part($1,$2)/ge;
|
s/\b(sm3partw[1-2])\s+([qv].*)/unsm3part($1,$2)/ge;
|
||||||
s/\b(sm3ssl)\s+([qv].*)/unsm3ssl($1,$2)/ge;
|
s/\b(sm3ss1)\s+([qv].*)/unsm3ss1($1,$2)/ge;
|
||||||
s/\b(sm3tt[1-2][a-b])\s+([qv].*)/unsm3tt($1,$2)/ge;
|
s/\b(sm3tt[1-2][a-b])\s+([qv].*)/unsm3tt($1,$2)/ge;
|
||||||
print $_,"\n";
|
print $_,"\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue