summaryrefslogtreecommitdiff
path: root/5/seat_id_sse3.asm
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2021-06-18 22:02:47 +0200
committerBond_009 <bond.009@outlook.com>2021-06-18 22:02:47 +0200
commit4ecc8a5baf2662dbb20071a96d8ac30180a6a0bc (patch)
tree1b1c34ca7b5a63be051955134237faea1162b3a5 /5/seat_id_sse3.asm
parent04e1607c944b5a133f20e5cd1f213e0d2da0702b (diff)
Fix SIMD asm impl of day 5
Diffstat (limited to '5/seat_id_sse3.asm')
-rw-r--r--5/seat_id_sse3.asm24
1 files changed, 0 insertions, 24 deletions
diff --git a/5/seat_id_sse3.asm b/5/seat_id_sse3.asm
deleted file mode 100644
index a377932..0000000
--- a/5/seat_id_sse3.asm
+++ /dev/null
@@ -1,24 +0,0 @@
-global seat_id
-
-section .rodata
- align 16
- xmm_shuf: db 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 10, 11, 12, 13, 14, 15
- xmm_cmp: db 1, 'RBBBBBBB', 1, 1, 1, 1, 1, 1, 1
-
-section .text
-
-seat_id:
- xor eax, eax ; set up return value
- movq xmm0, qword [rdi] ; load first 8 bytes
- pshufb xmm0, [rel xmm_shuf] ; reverse byte order and already shift left once
- pcmpeqb xmm0, [rel xmm_cmp]
- pmovmskb eax, xmm0 ; store mask in return value
- xor ecx, ecx
- cmp byte [rdi + 8], 'R'
- sete cl
- or eax, ecx
- shl eax, 1
- cmp byte [rdi + 9], 'R'
- sete cl
- or eax, ecx
- ret