Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global _start
- section .text
- ; JCC erratum mitigation should in theory disable the DSB when N is in {0, 1, 2, 30, 31} mod 32 (cmp and jg are macrofused and take 5 bytes).
- ; ...except when N == 0 mod 64 - DSB+LSD are much more active (running on core i7-10710U, microcode 0xca)
- ; NASM snippet:
- ; nasm -f elf64 -o test.o test.S
- ; ld -o test test.o
- _start:
- ; Replace N with 64 and see DSB+LSD unexpectedly (?) kick in
- db N-(loopend-loopstart) dup(0x90)
- loopstart:
- mov ebp, 1
- mov r15d, 2
- cmp r15d, ebp
- loopend:
- jg loopstart
Advertisement
Add Comment
Please, Sign In to add comment