[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 09/09: Fix shuffling assembler for new primcalls
From: |
Andy Wingo |
Subject: |
[Guile-commits] 09/09: Fix shuffling assembler for new primcalls |
Date: |
Mon, 11 May 2020 09:08:29 -0400 (EDT) |
wingo pushed a commit to branch master
in repository guile.
commit 2ba3eb4cf2295b4d5087d1ff58392c2a17d8451e
Author: Andy Wingo <address@hidden>
AuthorDate: Mon May 11 15:03:19 2020 +0200
Fix shuffling assembler for new primcalls
* module/system/vm/assembler.scm (encode-X8_S8_C8_S8-C32!/shuffle): New
shuffling assembler.
---
module/system/vm/assembler.scm | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/module/system/vm/assembler.scm b/module/system/vm/assembler.scm
index 7849e55..774a2aa 100644
--- a/module/system/vm/assembler.scm
+++ b/module/system/vm/assembler.scm
@@ -975,6 +975,15 @@ later by the linker."
(emit-push asm (+ c 2))
(encode-X8_S8_S8_S8-C32 asm 2 1 0 c32 opcode)
(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)
(cond
((< (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_C8) #'encode-X8_S8_S8_C8<-/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_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_S8_C8_S8) #'encode-X8_S8_C8_S8!/shuffle)
- [Guile-commits] branch master updated (f168a66 -> 2ba3eb4), Andy Wingo, 2020/05/11
- [Guile-commits] 03/09: Baseline compiler: add pop-fluid primitive., Andy Wingo, 2020/05/11
- [Guile-commits] 06/09: Fix module capture for closures in <fix>, Andy Wingo, 2020/05/11
- [Guile-commits] 01/09: Fix baseline miscompilation of <, Andy Wingo, 2020/05/11
- [Guile-commits] 02/09: Fix baseline compilation error for make-struct/simple, Andy Wingo, 2020/05/11
- [Guile-commits] 04/09: Fix "cons" compilation in baseline compiler in some cases, Andy Wingo, 2020/05/11
- [Guile-commits] 07/09: Reload FP if needed in bind-rest also, Andy Wingo, 2020/05/11
- [Guile-commits] 08/09: Improve tail recursion in compiler, Andy Wingo, 2020/05/11
- [Guile-commits] 09/09: Fix shuffling assembler for new primcalls,
Andy Wingo <=
- [Guile-commits] 05/09: Fix JIT asserts with different code generated by baseline, Andy Wingo, 2020/05/11