interplane.Get Omega
Read in your language

omega-bridge

Omega-first language interoperability: checked conversion backends and native language bindings

Brought by drakestapleton

GitHub aien-dev/omega-bridge#64 (code only)

closed derived d91fa988dc3165d9 #64

Imported from GitHub aien-dev/omega-bridge#64 (code only)

GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).

Base d11246116c38bbe0e72a92ed6c13dafa46eb187d · Head 3e6000ca90885df7f002b1d1a0007ddfffb60248

Fetch it

A git bundle of the pull request's head, 3732 bytes.

curl -fsSL https://interplane.io/drakestapleton/omega-bridge/patches/d91fa988dc3165d9.bundle -o d91fa988dc3165d9.bundle
git fetch d91fa988dc3165d9.bundle refs/pull/64/head

Raw bundle · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/omega-bridge
64
3e6000ca90885df7f002b1d1a0007ddfffb60248
{"kind":"github-import","owner":"aien-dev","repo":"omega-bridge","number":64,"url":"https://github.com/aien-dev/omega-bridge/pull/64","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:40:02Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/tests/native/v2/caller.c b/tests/native/v2/caller.c
index 655bd91..8bef4ac 100644
--- a/tests/native/v2/caller.c
+++ b/tests/native/v2/caller.c
@@ -1,7 +1,8 @@
 /* Native ABI v2 oracle (tests/native/v2/run.sh): calls the OM-2 test units vec, lay, one and hoist, and the
  * OM-1 unit madd, through the generated declarations only (omega_native.h, omega_api.h). Expected
  * values are computed here independently of Omega. Prints one PASS or FAIL line per check; exit 0
- * only when all pass. */
+ * only when all pass. The hoist checks are AArch64 only: they probe AArch64 callee-saved registers,
+ * and the x86-64 suite (tests/native/x86) links madd, vec, lay and one without hoist. */
 #define _GNU_SOURCE
 #include "omega_api.h"
 #include <dlfcn.h>
@@ -66,6 +67,7 @@ static void *swap_thread(void *arg)
     return 0;
 }
 
+#if defined(__aarch64__)
 /* hoist_thread: 5000 calls of the hoisting unit on this thread's own Omega stack; every fifth call traps
  * in inner, after the loop wrote this thread's array. */
 static void *hoist_thread(void *arg)
@@ -101,6 +103,7 @@ __asm__(".text\n.balign 4\n.globl ombr_probe\n.type ombr_probe,%function\nombr_p
         "orr x0,x0,x9,lsl #32\nldp d14,d15,[sp,#144]\nldp d12,d13,[sp,#128]\nldp d10,d11,[sp,#112]\nldp d8,d9,[sp,#96]\n"
         "ldp x27,x28,[sp,#80]\nldp x25,x26,[sp,#64]\nldp x23,x24,[sp,#48]\nldp x21,x22,[sp,#32]\nldp x19,x20,[sp,#16]\n"
         "ldp x29,x30,[sp],#160\nret\n.size ombr_probe,.-ombr_probe\n");
+#endif
 
 int main(void)
 {
@@ -384,6 +387,7 @@ int main(void)
     pthread_join(t2, 0);
     check("two threads x 20000 swap8 calls", ok1 && ok2);
 
+#if defined(__aarch64__)
     /* Callee-saved registers: hoist's code keeps hadd's seven loop constants in x20..x26 and inner's in x20
      * and x21, and inner's conversions write d8..d15 (with a hoisting OM-2 omc; run.sh fails unless the code
      * writes them). The caller's x19..x28 and d8..d15 survive a normal return and a trap 9 raised in inner,
@@ -406,6 +410,7 @@ int main(void)
     pthread_join(t1, 0);
     pthread_join(t2, 0);
     check("two threads x 5000 hadd calls (every fifth a trap)", hk1 && hk2);
+#endif
 
     free(lb);
     free(lw);
diff --git a/tests/native/x86/.crumb b/tests/native/x86/.crumb
index b6bd2fb..4d90154 100644
--- a/tests/native/x86/.crumb
+++ b/tests/native/x86/.crumb
@@ -3,14 +3,14 @@
     "generated": {
       "children": [],
       "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "compiled_at": "2026-11-05T17:05:34Z",
+      "compiled_at": "2026-11-05T17:19:52Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:792675ff5d5be923201b24acf07a5109699763cf3ac13835e0a08fb583d20a96",
+      "digest": "sha256:32eba9fc2eeb4112c2bd1edb8ec971efed7ba76f18ab6fcedebd6520de631c45",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 12,
-      "generated_at_commit": "004ccc32ac1904e533486908a7157162837a46dc",
-      "source_tree": "sha256:186ace7c240990f890b4f1011130d4fb6ec719532acb50d067d9b34bf570f86e"
+      "generated_at_commit": "3b107093d844c8699dfdd77497f80bac95fb2807",
+      "source_tree": "sha256:eccdbdc1cedbfa91f14a264e15524a652e6a773debeb52bd3ea06757cca5be53"
     }
   },
   "layer": "tests",
diff --git a/tests/native/x86/suite.py b/tests/native/x86/suite.py
index eaee86a..b99512a 100755
--- a/tests/native/x86/suite.py
+++ b/tests/native/x86/suite.py
@@ -41,14 +41,18 @@ REQUIRED = {"c", "cpp", "python", "rust", "zig", "go"}
 # f637021 (#26, f32 and ushort array kinds). Moving it requires a reviewed AArch64 output change.
 BASELINE = "f637021"
 # #27 respelled the object-format directives (OMBR_* macros in the texts pre, fp, fr, fv and xjmp)
-# and the Python loader's library name (tb); the AArch64 bytes they assemble to are unchanged. Before
-# the comparison, a "~"-separated piece of those baseline texts that equals the same piece of
-# PREOBJ's takes that piece of OBJFMT (blob of src/native.om as #27 left it), and tb's two loader
-# literals take #27's spelling. Both sides are pinned objects, never this tree's src/native.om, so any
-# other change to those texts still fails parity (tests/native/v2/run.sh basegen does the same for
-# fr, fv and tb). PREOBJ's texts equal BASELINE's for all six names.
+# and the Python loader's library name (tb); the AArch64 bytes they assemble to are unchanged. #24
+# reworded pre's comment on the registers a unit may write; that is C comment text only. Before the
+# comparison, a "~"-separated piece of those baseline texts that equals the same piece of PREOBJ's
+# takes that piece of OBJFMT (blob of src/native.om after #24 and #27), and tb's two loader literals
+# take #27's spelling. Both sides are pinned objects, never this tree's src/native.om, so any other
+# change to those texts still fails parity (tests/native/v2/run.sh basegen does the same for fr, fv
+# and tb). PREOBJ's texts equal BASELINE's for all six names.
 PREOBJ = "7af4d11"
-OBJFMT = "51151131855ee8c805bbc7a00dd60ceaf9f63a4d"
+OBJFMT = "3eece7baf184ac38b102e7edd7b120f41f225e78"
+# OM-2 units that output freest refuses (docs/NATIVE-ABI.md, freestanding: no f64/f32 and no
+# arrays): hoist.om uses both, so the baseline and this generator must both refuse it.
+FREEST_REFUSED = {"v2/hoist.om"}
 SPELLED = (b"pre", b"fp", b"fr", b"fv", b"xjmp")
 LOADER = ((rb"import ctypes, os\n", rb"import ctypes, os, sys\n"),
           (rb'os.path.abspath(__file__)), \"libomega_native.so\"))',
@@ -618,6 +622,10 @@ class Suite:
             for word in (*OUTPUTS, "freest"):
                 old = self.generate(word, frame, baseline, target=False)
                 new = self.generate(word, frame, target=False)
+                if word == "freest" and name in FREEST_REFUSED:
+                    self.check("AArch64 freest " + name + ": refused by " + BASELINE + " and now (exit 110, no output)",
+                               old.returncode == 110 and not old.stdout and new.returncode == 110 and not new.stdout)
+                    continue
                 if word == "freest" and name in om2_frames:
                     # Deliberate change: the baseline refuses OM-2 units in output freest (exit 110);
                     # they are now bound on the caller's stack (docs/NATIVE-ABI.md, ABI v2, freestanding).