Commit c32fcca6 authored by Andy Polyakov's avatar Andy Polyakov
Browse files

SPARCv9 assembler pack: refine CPU detection on Linux, fix for "unaligned

opcodes detected in executable segment" error.
parent 9674de7d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -315,6 +315,7 @@ gcm_gmult_4bit:
.type	gcm_gmult_4bit,#function
.size	gcm_gmult_4bit,(.-gcm_gmult_4bit)
.asciz	"GHASH for SPARCv9, CRYPTOGAMS by <appro\@openssl.org>"
.align	4
___

$code =~ s/\`([^\`]*)\`/eval $1/gem;
+1 −0
Original line number Diff line number Diff line
@@ -276,6 +276,7 @@ $code.=<<___;
.type	sha1_block_data_order,#function
.size	sha1_block_data_order,(.-sha1_block_data_order)
.asciz	"SHA1 block transform for SPARCv9, CRYPTOGAMS by <appro\@openssl.org>"
.align	4
___

$code =~ s/\`([^\`]*)\`/eval $1/gem;
+1 −0
Original line number Diff line number Diff line
@@ -539,6 +539,7 @@ $code.=<<___;
.type	sha1_block_data_order,#function
.size	sha1_block_data_order,(.-sha1_block_data_order)
.asciz	"SHA1 block transform for SPARCv9a, CRYPTOGAMS by <appro\@openssl.org>"
.align	4
___

# Purpose of these subroutines is to explicitly encode VIS instructions,
+1 −0
Original line number Diff line number Diff line
@@ -586,6 +586,7 @@ $code.=<<___;
.type	sha${label}_block_data_order,#function
.size	sha${label}_block_data_order,(.-sha${label}_block_data_order)
.asciz	"SHA${label} block transform for SPARCv9, CRYPTOGAMS by <appro\@openssl.org>"
.align	4
___

$code =~ s/\`([^\`]*)\`/eval $1/gem;
+21 −1
Original line number Diff line number Diff line
@@ -225,13 +225,33 @@ _sparcv9_rdtick:
	xor	%o0,%o0,%o0
	.word	0x91410000	!rd	%tick,%o0
	retl
	.word	0x93323020	!srlx	%o2,32,%o1
	.word	0x93323020	!srlx	%o0,32,%o1
.notick:
	retl
	xor	%o1,%o1,%o1
.type	_sparcv9_rdtick,#function
.size	_sparcv9_rdtick,.-_sparcv9_rdtick

.global	_sparcv9_rdwrasi
.align	8
_sparcv9_rdwrasi:
	.word	0x9340c000	!rd	%asi,%o1
	.word	0x87820000	!wr	%o0,%g0,%asi
	retl
	mov	%o1,%o0
.type	_sparcv9_rdwrasi,#function
.size	_sparcv9_rdwrasi,.-_sparcv9_rdwrasi

.global	_sparcv9_vis1_probe
.align	8
_sparcv9_vis1_probe:
	.word	0x81b00c20	!fzeros	%f0
	.word	0xc19ba002+BIAS	!ldda	[%sp+BIAS+2]%asi,%f0
	retl
	nop
.type	_sparcv9_vis1_probe,#function
.size	_sparcv9_vis1_probe,.-_sparcv9_vis1_probe

.global	OPENSSL_cleanse
.align	32
OPENSSL_cleanse:
Loading