2077224595858280506
This commit is contained in:
1 parent
59bc0a7e1f
commit
ba8692cbf2
4 files changed
+54
-37
No files matched your search
+52
@@ -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)
|
||||
-36
@@ -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)
|
||||
+1
@@ -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.
|
||||
|
||||

|
||||
|
||||
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]]
|
||||
@@ -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]]
|
||||
|
||||
Reference in new issue
Block a user