3 ms·
According to google, there are somewhere between 900 to 4000 x86 instructions (not sure which value is correct or what variants means in this context), and 329
by PurpleRamen 3y ago
According to google, there are somewhere between 900 to 4000 x86 instructions (not sure which value is correct or what variants means in this context), and 329 Linux calls. Meaning, there is a lot missing. Which leaves the question: will it communicate in an obvious way if it encounters an unknown instruction or call? Or can I check at least for potential problems before executing a program?
- jart 3y agoThe default build (make MODE=) has logging enabled (so do the release binaries). If any system calls are missing, then Blink will return ENOSYS to the program and then create a "blink.log" file in the current directory reporting that, e.g. master jart@nightmare:~/cosmo$ blink ruby --yjit -e 'printf("%d\n",2+2)' <main>: warning: timer_create failed: Function not implemented, signals racy 4 master jart@nightmare:~/cosmo$ cat blink.log I2023-06-05T04:22:15.525179:blink/syscall.c:1020:29575 unsupported prctl op 0x29 I2023-06-05T04:22:15.556803:blink/syscall.c:5720:29575 missing syscall 0x122 I2023-06-05T04:22:15.556866:blink/syscall.c:5720:29575 missing syscall 0x122 I2023-06-05T04:22:15.556886:blink/syscall.c:5720:29575 missing syscall 0x0de You can also use `blink -es program...` to log system calls to stderr, similar to strace, when you need to troubleshoot further. Once you do that, please file a feature request.
- sspiff 3y agoIs there a list of unsupported syscalls and instructions, and how to add support for them for people interested in contributing?
- jart 3y agoHere are the missing system calls that people filed issues requesting: https://github.com/jart/blink/issues?q=is%3Aissue+is%3Aopen+label%3Asyscalls https://github.com/jart/blink/issues?q=is%3Aissue+is%3Aopen+... The place where they go is https://github.com/jart/blink/blob/master/blink/syscall.c https://github.com/jart/blink/blob/master/blink/syscall.c Looking forward to any changes you send us!
- peterfirefly 3y agoA lot of those are post-SSE2 SIMD instructions. It's not something I would worry about.
- packetlost 3y agoDo applications not typically make use of SSE3+?
- Asm2D 3y agoThey do! The most important post-SSE2 extensions are SSSE3 (pshufb) and SSE4.1 (rounding, min/max, blending, etc...). Pure SSE2 is a nightmare to use as it's a totally unbalanced SIMD ISA (a lot of missing stuff here are there requires a lot of workarounds and sometimes it's just better to go scalar). In addition, just [V]PSHUFB alone can do wonders and has a lot of application - I would say that almost all interesting problems can take the advantage of PSHUFB.
- Asm2D 3y agoIt's above 4400 instructions actually if you count different encoding of SIMD instructions (like SSE2, VEX, and EVEX variations) and consider instructions using 128-bit, 256-bit, and 512-bit SIMD as separate instructions. Instructions can be comfortably explored here: https://asmjit.com/asmgrid/ https://asmjit.com/asmgrid/