[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 10/10: Define missing shuffling assembler for string-set
From: |
Andy Wingo |
Subject: |
[Guile-commits] 10/10: Define missing shuffling assembler for string-set! et al |
Date: |
Sun, 18 Aug 2019 17:12:20 -0400 (EDT) |
wingo pushed a commit to branch master
in repository guile.
commit 2751096c4212f7851072e5b9a7f991a7749e3225
Author: Andy Wingo <address@hidden>
Date: Sun Aug 18 22:57:10 2019 +0200
Define missing shuffling assembler for string-set! et al
* module/system/vm/assembler.scm (encode-X8_S8_S8_S8-C32!/shuffle):
Define shuffling assembler for this instruction type.
---
module/system/vm/assembler.scm | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/module/system/vm/assembler.scm b/module/system/vm/assembler.scm
index d8a84dd..ab23452 100644
--- a/module/system/vm/assembler.scm
+++ b/module/system/vm/assembler.scm
@@ -887,6 +887,16 @@ later by the linker."
(emit-push asm a)
(encode-X8_S8_C8_S8 asm 0 const 0 opcode)
(emit-pop asm dst))))
+(define (encode-X8_S8_S8_S8-C32!/shuffle asm a b c const opcode)
+ (cond
+ ((< (logior a b c) (ash 1 8))
+ (encode-X8_S8_S8_S8-C32 asm a b c const opcode))
+ (else
+ (emit-push asm a)
+ (emit-push asm (+ b 1))
+ (emit-push asm (+ c 2))
+ (encode-X8_S8_S8_S8-C32 asm 2 1 0 const opcode)
+ (emit-drop asm 3))))
(define (encode-X8_S8_S8_S8-C32<-/shuffle asm dst a b c32 opcode)
(cond
((< (logior dst a b) (ash 1 8))
@@ -950,6 +960,7 @@ 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_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)
- [Guile-commits] branch master updated (b16ad94 -> 2751096), Andy Wingo, 2019/08/18
- [Guile-commits] 01/10: Fix bug in which codegen accessed data beyond end of stack, Andy Wingo, 2019/08/18
- [Guile-commits] 03/10: Simplify the define-primitive-expander macro, Andy Wingo, 2019/08/18
- [Guile-commits] 09/10: Fix coverage test for top-level binding optimization, Andy Wingo, 2019/08/18
- [Guile-commits] 08/10: Skip tests that don't work under letrectification, Andy Wingo, 2019/08/18
- [Guile-commits] 10/10: Define missing shuffling assembler for string-set! et al,
Andy Wingo <=
- [Guile-commits] 07/10: Enable letrectification, Andy Wingo, 2019/08/18
- [Guile-commits] 05/10: Add letrectify tree-il pass, Andy Wingo, 2019/08/18
- [Guile-commits] 06/10: Add notion of declarative modules, Andy Wingo, 2019/08/18
- [Guile-commits] 02/10: Add "mod" field to tree-il toplevel ref, set, define, Andy Wingo, 2019/08/18
- [Guile-commits] 04/10: Add primitive support for working with module variables, Andy Wingo, 2019/08/18