mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
Fix shuffling assembler for new primcalls
* module/system/vm/assembler.scm (encode-X8_S8_C8_S8-C32!/shuffle): New shuffling assembler.
This commit is contained in:
parent
7f4bbc3dba
commit
2ba3eb4cf2
1 changed files with 10 additions and 1 deletions
|
@ -975,6 +975,15 @@ later by the linker."
|
||||||
(emit-push asm (+ c 2))
|
(emit-push asm (+ c 2))
|
||||||
(encode-X8_S8_S8_S8-C32 asm 2 1 0 c32 opcode)
|
(encode-X8_S8_S8_S8-C32 asm 2 1 0 c32 opcode)
|
||||||
(emit-drop asm 3))))
|
(emit-drop asm 3))))
|
||||||
|
(define (encode-X8_S8_C8_S8-C32!/shuffle asm a const b c32 opcode)
|
||||||
|
(cond
|
||||||
|
((< (logior a b) (ash 1 8))
|
||||||
|
(encode-X8_S8_C8_S8-C32 asm a const b c32 opcode))
|
||||||
|
(else
|
||||||
|
(emit-push asm a)
|
||||||
|
(emit-push asm (+ b 1))
|
||||||
|
(encode-X8_S8_C8_S8-C32 asm 1 const 0 c32 opcode)
|
||||||
|
(emit-drop asm 2))))
|
||||||
(define (encode-X8_S12_S12-C32<-/shuffle asm dst src c32 opcode)
|
(define (encode-X8_S12_S12-C32<-/shuffle asm dst src c32 opcode)
|
||||||
(cond
|
(cond
|
||||||
((< (logior dst src) (ash 1 12))
|
((< (logior dst src) (ash 1 12))
|
||||||
|
@ -1011,9 +1020,9 @@ later by the linker."
|
||||||
(('<- 'X8_S8_S8_S8) #'encode-X8_S8_S8_S8<-/shuffle)
|
(('<- 'X8_S8_S8_S8) #'encode-X8_S8_S8_S8<-/shuffle)
|
||||||
(('<- 'X8_S8_S8_C8) #'encode-X8_S8_S8_C8<-/shuffle)
|
(('<- 'X8_S8_S8_C8) #'encode-X8_S8_S8_C8<-/shuffle)
|
||||||
(('! 'X8_S8_S8_S8 'C32) #'encode-X8_S8_S8_S8-C32!/shuffle)
|
(('! 'X8_S8_S8_S8 'C32) #'encode-X8_S8_S8_S8-C32!/shuffle)
|
||||||
|
(('! 'X8_S8_C8_S8 'C32) #'encode-X8_S8_C8_S8-C32!/shuffle)
|
||||||
(('<- 'X8_S8_S8_S8 'C32) #'encode-X8_S8_S8_S8-C32<-/shuffle)
|
(('<- 'X8_S8_S8_S8 'C32) #'encode-X8_S8_S8_S8-C32<-/shuffle)
|
||||||
(('<- 'X8_S8_S8_C8 'C32) #'encode-X8_S8_S8_C8-C32<-/shuffle)
|
(('<- 'X8_S8_S8_C8 'C32) #'encode-X8_S8_S8_C8-C32<-/shuffle)
|
||||||
(('! 'X8_S8_S8_C8 'C32) #'encode-X8_S8_S8_C8-C32!/shuffle)
|
|
||||||
(('<- 'X8_S12_S12 'C32) #'encode-X8_S12_S12-C32<-/shuffle)
|
(('<- 'X8_S12_S12 'C32) #'encode-X8_S12_S12-C32<-/shuffle)
|
||||||
(('! 'X8_S12_S12 'C32) #'encode-X8_S12_S12-C32!/shuffle)
|
(('! 'X8_S12_S12 'C32) #'encode-X8_S12_S12-C32!/shuffle)
|
||||||
(('! 'X8_S8_C8_S8) #'encode-X8_S8_C8_S8!/shuffle)
|
(('! 'X8_S8_C8_S8) #'encode-X8_S8_C8_S8!/shuffle)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue