From ba8692cbf23571da44e20c4b240a65a393436c42 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Tue, 25 Aug 2026 11:58:37 -0400 Subject: [PATCH] 2077224595858280506 --- .../index.md | 52 +++++++++++++++++++ .../index.md | 36 ------------- .../index.md | 1 + archive/threads/NOTimothyLottes/index.md | 2 +- 4 files changed, 54 insertions(+), 37 deletions(-) create mode 100644 archive/threads/NOTimothyLottes/2026-07-15-one-advantage-of-sar-aka-signed-is-that-the-shift/index.md delete mode 100644 archive/threads/NOTimothyLottes/2026-07-15-sar-on-a-control-word-can-in-theory-grab-3-values/index.md diff --git a/archive/threads/NOTimothyLottes/2026-07-15-one-advantage-of-sar-aka-signed-is-that-the-shift/index.md b/archive/threads/NOTimothyLottes/2026-07-15-one-advantage-of-sar-aka-signed-is-that-the-shift/index.md new file mode 100644 index 0000000..5501d78 --- /dev/null +++ b/archive/threads/NOTimothyLottes/2026-07-15-one-advantage-of-sar-aka-signed-is-that-the-shift/index.md @@ -0,0 +1,52 @@ +--- +title: "One advantage of SAR (aka signed '>>') is that the shift-by operand HW uses only the 5|6 LSBs automatically." +type: archive +source: twitter +source_url: "https://x.com/NOTimothyLottes/status/2077224595858280506" +author: "NOTimothyLottes" +handle: NOTimothyLottes +post_id: "2077224595858280506" +date: 2026-07-15 +archived: 2026-08-25 +draft: false +tags: + - archive + - twitter + - NOTimothyLottes +description: "One advantage of SAR (aka signed '>>') is that the shift-by operand HW uses only the 5|6 LSBs automatically." +in_reply_to: "" +--- + +## Source + +- URL: https://x.com/NOTimothyLottes/status/2077224595858280506 +- Author: NOTimothyLottes (@NOTimothyLottes) +- Posted: 2026-07-15 02:51:51 + +## Thread + +**1/** + +One advantage of SAR (aka signed '>>') is that the shift-by operand HW uses only the 5|6 LSBs automatically. So if you have a mixed used control word, you don't have to mask out the MSBs. Can save an instruction. + +**2/** + +Working through an idea of a single uber-instruction interpreted language for code generation. Meaning something that never misses the instruction cache and executes fully out of the micro-op cache. Fully data driven with a direct map 64k entry symbol table. + +**3/** + +Borrows some ideas from SIMD GPU programming. Like instead of branching/predicating to avoid stores, just store to a discarded area (like a negative offset on the GPU, or a designated trash address on the CPU). + +**4/** + +Don't want exit condition logic in the infinite loop, so exit will have to be having the program store an exit value into a set address, and an external watchdog polling for exit at some sleep frequency. + +**5/** + +SAR on a control word can in theory grab 3 values. +SF (sign flag) is set to MSB bit +CF (carry flag) is set to what shifts into bit -1 +and output + +The SF and CF can be used for CMOVcc +Output can be used for another shift (after CMOVccs) diff --git a/archive/threads/NOTimothyLottes/2026-07-15-sar-on-a-control-word-can-in-theory-grab-3-values/index.md b/archive/threads/NOTimothyLottes/2026-07-15-sar-on-a-control-word-can-in-theory-grab-3-values/index.md deleted file mode 100644 index efe0afa..0000000 --- a/archive/threads/NOTimothyLottes/2026-07-15-sar-on-a-control-word-can-in-theory-grab-3-values/index.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: "SAR on a control word can in theory grab 3 values." -type: archive -source: twitter -source_url: "https://x.com/NOTimothyLottes/status/2077241596869751029" -author: "NOTimothyLottes" -handle: NOTimothyLottes -post_id: "2077241596869751029" -date: 2026-07-15 -archived: 2026-08-23 -draft: false -tags: - - archive - - twitter - - NOTimothyLottes -description: "SAR on a control word can in theory grab 3 values." -in_reply_to: "" ---- - -## Source - -- URL: https://x.com/NOTimothyLottes/status/2077241596869751029 -- Author: NOTimothyLottes (@NOTimothyLottes) -- Posted: 2026-07-15 03:59:24 - -## Thread - -**1/** - -SAR on a control word can in theory grab 3 values. -SF (sign flag) is set to MSB bit -CF (carry flag) is set to what shifts into bit -1 -and output - -The SF and CF can be used for CMOVcc -Output can be used for another shift (after CMOVccs) diff --git a/archive/threads/NOTimothyLottes/2026-07-17-oh-f-it-the-urge-to-drop-the-c-baggage-was-too/index.md b/archive/threads/NOTimothyLottes/2026-07-17-oh-f-it-the-urge-to-drop-the-c-baggage-was-too/index.md index de23222..ecf1657 100644 --- a/archive/threads/NOTimothyLottes/2026-07-17-oh-f-it-the-urge-to-drop-the-c-baggage-was-too/index.md +++ b/archive/threads/NOTimothyLottes/2026-07-17-oh-f-it-the-urge-to-drop-the-c-baggage-was-too/index.md @@ -30,4 +30,5 @@ in_reply_to: "" Oh, F-it! The urge to drop the C baggage was too strong, using nasm to bootstrap another radical Forth for Linux. Will see how far I can get in a 4 KiB binary to start. Apparently this wants to exist, and I have no choice but to lend some fingers. ELF64 out of the way. ![](https://pbs.twimg.com/media/HNdzRxAXMAEom1u?format=png&name=orig) + Branches: [[archive/threads/NOTimothyLottes/2026-07-17-oh-f-it-the-urge-to-drop-the-c-baggage-was-too/2026-07-18-furan-sorry-for-the-tangent-what-is-this-font-and-where]] diff --git a/archive/threads/NOTimothyLottes/index.md b/archive/threads/NOTimothyLottes/index.md index 88d0672..a44a27d 100644 --- a/archive/threads/NOTimothyLottes/index.md +++ b/archive/threads/NOTimothyLottes/index.md @@ -91,7 +91,7 @@ tags: - [[archive/threads/NOTimothyLottes/2026-07-13-going-all-in-to-only-if-goto-but-through-better]] - [[archive/threads/NOTimothyLottes/2026-07-13-ill-mark-this-down-a-more-code-obfustication-for]] - [[archive/threads/NOTimothyLottes/2026-07-14-another-round-of-getting-optimized-error-checking]] -- [[archive/threads/NOTimothyLottes/2026-07-15-sar-on-a-control-word-can-in-theory-grab-3-values]] +- [[archive/threads/NOTimothyLottes/2026-07-15-one-advantage-of-sar-aka-signed-is-that-the-shift]] - [[archive/threads/NOTimothyLottes/2026-07-17-oh-f-it-the-urge-to-drop-the-c-baggage-was-too]] - [[archive/threads/NOTimothyLottes/2026-07-18-i-realized-at-some-point-i-can-have-most]] - [[archive/threads/NOTimothyLottes/2026-07-19-the-aim-of-course-keep-the-stuff-that-doesnt-need]]