CUDApp
CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.
Brought by drakestapleton
GitHub aien-dev/CUDApp#168 (code only)
Fetch it
curl -fsSL https://interplane.io/drakestapleton/CUDApp/patches/8c62e7a89caf5b5d.bundle -o 8c62e7a89caf5b5d.bundle git fetch 8c62e7a89caf5b5d.bundle refs/pull/168/head
Provenance
github-import 1
aien-dev/CUDApp
168
073ec1b7ce95617f18b37f61f87231b3eb66d824
{"kind":"github-import","owner":"aien-dev","repo":"CUDApp","number":168,"url":"https://github.com/aien-dev/CUDApp/pull/168","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:38:51Z","metadata":"unavailable","state_derived":true}
Changes
diff --git a/docs/SM121_INSTRUCTION_SPEC.md b/docs/SM121_INSTRUCTION_SPEC.md index 5398b6fd..e17ccc27 100644 --- a/docs/SM121_INSTRUCTION_SPEC.md +++ b/docs/SM121_INSTRUCTION_SPEC.md @@ -55,7 +55,30 @@ The following integer constants represent semantic field roles in `bw_spec_sm121 ## Specification Table Representation -In native seeded Omega, the specification is laid out as a flat global table `sp_tbl ulong 3000`. +The reusable module is function-mode Omega: no global pools and no `main`. +The owner allocates a zero-filled fixed-size `ulong 3001` workspace once per +encoding batch and passes it explicitly. Slots 0..2999 retain the authoritative +flat specification table; slot 3000 is the initialization marker, written only +after every table initializer completes. `sp_init` is idempotent for that owner. +`sp_enc` and `sp_dec` initialize on first use, including a cold decoder call. + +The workspace is private process state, not an authenticated input format. Do not +accept it from a caller or serialized artifact, mutate it after initialization, +or race/share it across concurrent owners. Reuse it within one batch rather than +rebuilding the table for every instruction. Fixed-size array parameters occupy +one seeded argument slot. Initialization setters use at most six arguments. + +Public signatures are `sp_init(state edit ulong 3001)`, +`sp_enc(state edit ulong 3001, o view ulong 16, w edit ulong 4) -> ulong`, and +`sp_dec(state edit ulong 3001, w view ulong 4, o edit ulong 16) -> ulong`. +Emit words only after `E_OK`: a failed encoder call may have already written +partial output. A native adapter must store these validated words directly, +including padding NOPs, rather than re-encode through the reference oracle. + +Standalone assertions now live in `om/encoder/bw_spec_test.om`; concatenate that +driver after the reusable module for executable mode. No source stripping or +second encoder table is needed. The original audit source remains frozen at +CUDApp `85c059cc15edf704c9833fe4832f18c052ee83b3` (draft PR #160). Each instruction form header occupies 10 slots: - `+0`: `op` (Blackwell IR opcode) @@ -91,13 +114,13 @@ The encoder refuses invalid input with explicit error codes instead of truncatin ## Dual Derivation -1. **`sp_enc o w -> err`**: +1. **`sp_enc state o w -> err`**: - Matches `o` to an instruction form. - Sets fixed word bits `w0_fix..w2_fix` and control word `w3`. - Validates the raw semantic operand before inserting masked bits. - Checks special-layout immediates by decoding their inserted representation and requiring exact equality. -2. **`sp_dec w o -> err`**: - - Initializes its shared table automatically, including standalone cold calls. +2. **`sp_dec state w o -> err`**: + - Initializes its owner-private table automatically, including standalone cold calls. - Searches `sp_tbl` for a form whose fixed bits match: `(w[k] & mask) == fix`. - Extracts each field: `val = (w[word] >> shift) & mask`. - Populates decoded IR array `o[]`. @@ -108,3 +131,23 @@ The encoder refuses invalid input with explicit error codes instead of truncatin - Boundary fixtures select representable aligned immediates; separate audit regressions require refusal of raw lossy values. - `sh tools/test_bw_spec_encoder.sh` checks reference bytes, active operands, cold decode, malformed streams and independent offline nvdisasm operands. Producer failure, truncated records and read errors fail closed. - All checks are host-only. Physical qualification of the changed encoder remains NOT_RUN until an authorized chip run. Frozen historical receipts are unchanged. + +## Function-mode host regression + +`OMEGA_BRIDGE=/path/to/omega-bridge sh tools/test_bw_spec_encoder.sh` also +compiles the reusable module plus `bw_spec_native.om` as function bytes and +executes the generated bridge binding through the existing C oracle driver. +The semantic assertions remain in Omega. They cover cold decoder initialization, +private workspace isolation, warmed-table mutation without accidental reinit, +full RRU destination/source semantics, a deliberately corrupted expected operand +(return 1), and actual raw SHFL refusal (return `E_RANGE`, 2). Build, bridge, +compiler-pin, ELF-image and binding-status failures are not semantic mutant kills. + +The exact compiler remains omega-mv `e5b32567a7aff3ce594e3254a622a846a6cd190b`, +SHA-256 `2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f`. +The unchanged bridge source `src/native.om` is pinned by SHA-256 +`c77a5922f91d53d4a0bbd4e7b1c4703f7098263abc843be2918db1ece7496782`. +This command proves a host function binding, not physical GPU qualification or +the downstream `bc_encode` consumer; that consumer requires its own native +runtime fixture at its exact integrated source pin. Physical qualification is +NOT_RUN. Historical audit and device receipts are not rewritten. diff --git a/om/encoder/bw_spec_cmp.om b/om/encoder/bw_spec_cmp.om index 9e6f94b3..6b6a84b1 100644 --- a/om/encoder/bw_spec_cmp.om +++ b/om/encoder/bw_spec_cmp.om @@ -37,12 +37,27 @@ end note Compare active semantic roles, not inactive packing slots. Zero control note and FSET default are documented canonicalizations, absent RA/RB means RZ. -fn same_sem o view ulong 16 dec view ulong 16 to bool -idx = sp_find o +note Keep field-local values out of the seeded comparator's register live range. +fn same_fld sp_tbl view ulong 3001 fb ulong o view ulong 16 dec view ulong 16 to bool +role = get sp_tbl fb +word = get sp_tbl add fb 1 +a = sp_val role word o +b = sp_val role word dec +if and eq role R_FSET eq a 0 +a = 66084864 +end +if ne a b +ret false +end +ret true +end + +fn same_sem sp_tbl view ulong 3001 o view ulong 16 dec view ulong 16 to bool +idx = sp_find sp_tbl o if eq idx 63 ret false end -if ne sp_find dec idx +if ne sp_find sp_tbl dec idx ret false end if ne get o 0 get dec 0 @@ -66,21 +81,14 @@ end nf = get sp_tbl add base 9 for f ulong nf fb = add add base 10 mul f 7 -role = get sp_tbl fb -word = get sp_tbl add fb 1 -a = sp_val role word o -b = sp_val role word dec -if and eq role R_FSET eq a 0 -a = 66084864 -end -if ne a b +if not same_fld sp_tbl fb o dec ret false end end ret true end -fn run_check_loop corrupt bool to int +fn run_check_loop sp_tbl edit ulong 3001 corrupt bool to int buf = new uchar 128 0 o = new ulong 16 0 w_ref = new ulong 4 0 @@ -97,12 +105,10 @@ if eq r 0 break end unpack_case buf o -st_ref = enc1 o w_ref -st_spec = sp_enc o w_spec -if ne st_ref 0 +if ne enc1 o w_ref 0 ret 1 end -if ne st_spec 0 +if ne sp_enc sp_tbl o w_spec 0 ret 1 end if and corrupt eq count 0 @@ -113,11 +119,10 @@ if ne get w_ref k get w_spec k ret 1 end end -dst = sp_dec w_spec o_dec -if ne dst 0 +if ne sp_dec sp_tbl w_spec o_dec 0 ret 1 end -if not same_sem o o_dec +if not same_sem sp_tbl o o_dec ret 1 end count = add count 1 @@ -129,7 +134,7 @@ end ret 0 end -fn emit_sample s_idx ulong to int +fn emit_sample sp_tbl edit ulong 3001 s_idx ulong to int o = new ulong 16 0 w = new ulong 4 0 buf = new uchar 16 0 @@ -172,7 +177,7 @@ put o 0 46 put o 6 16 end -st = sp_enc o w +st = sp_enc sp_tbl o w if ne st 0 ret 1 end @@ -197,7 +202,7 @@ end ret 0 end -fn run_neg_mutant to int +fn run_neg_mutant sp_tbl edit ulong 3001 to int o = new ulong 16 0 w_mut = new ulong 4 0 w_ref = new ulong 4 0 @@ -212,7 +217,7 @@ end note Shift field on form 1 (MOV_RZ): fbase = 55, shift is at 57 orig_sh = get sp_tbl 57 put sp_tbl 57 add orig_sh 1 -r_mut = sp_enc o w_mut +r_mut = sp_enc sp_tbl o w_mut put sp_tbl 57 orig_sh if ne r_mut 0 @@ -229,31 +234,31 @@ end if same ret 1 end -if ne sp_dec w_mut decoded E_OK +if ne sp_dec sp_tbl w_mut decoded E_OK ret 1 end -if same_sem o decoded +if same_sem sp_tbl o decoded ret 1 end ret 0 end -fn run_neg_range to int +fn run_neg_range sp_tbl edit ulong 3001 to int o = new ulong 16 0 w = new ulong 4 0 put o 0 1 put o 1 256 -st = sp_enc o w +st = sp_enc sp_tbl o w if ne st E_RANGE ret 1 end ret 0 end -fn run_neg_nomat to int +fn run_neg_nomat sp_tbl edit ulong 3001 to int w = new ulong 4 4294967295 dec = new ulong 16 0 -dst = sp_dec w dec +dst = sp_dec sp_tbl w dec if ne dst E_NOMAT ret 1 end @@ -261,7 +266,8 @@ ret 0 end fn main to int -sp_init +sp_tbl = new ulong 3001 0 +sp_init sp_tbl mode = new uchar 16 0 k = ulong 0 if ge argcnt 2 @@ -272,35 +278,35 @@ end end if eq k 0 -ret run_check_loop false +ret run_check_loop sp_tbl false end c0 = get mode 0 if eq c0 99 note 'c' -> corrupt -ret run_check_loop true +ret run_check_loop sp_tbl true end if eq c0 115 note 's' -> sample s_idx = sub ulong get mode 6 48 -ret emit_sample s_idx +ret emit_sample sp_tbl s_idx end if eq c0 109 note 'm' -> mutant -ret run_neg_mutant +ret run_neg_mutant sp_tbl end if eq c0 114 note 'r' -> range -ret run_neg_range +ret run_neg_range sp_tbl end if eq c0 110 note 'n' -> nomat -ret run_neg_nomat +ret run_neg_nomat sp_tbl end ret 1 diff --git a/om/encoder/bw_spec_corpus.om b/om/encoder/bw_spec_corpus.om index 32f653b0..fe517cd1 100644 --- a/om/encoder/bw_spec_corpus.om +++ b/om/encoder/bw_spec_corpus.om @@ -151,7 +151,8 @@ end ret 0 end -fn emit_one_field fbase ulong c_i ulong f_i ulong nf ulong op ulong o edit ulong 16 to void +fn emit_one_field sp_tbl view ulong 3001 fbase ulong c_i ulong f_i ulong nf ulong o edit ulong 16 to void +op = get o 0 role = get sp_tbl fbase word = get sp_tbl add fbase 1 min_v = get sp_tbl add fbase 5 @@ -171,16 +172,19 @@ end set_o_field role word val op o end -fn emit_form_multi base ulong op ulong var ulong nf ulong o edit ulong 16 buf edit uchar 128 to int +fn emit_form_multi sp_tbl view ulong 3001 base ulong o edit ulong 16 buf edit uchar 128 to int +op = get sp_tbl base +var = get sp_tbl add base 1 +nf = get sp_tbl add base 9 for c_i ulong 8 clear_o o op for f_i ulong nf fbase = add add base 10 mul f_i 7 -emit_one_field fbase c_i f_i nf op o +emit_one_field sp_tbl fbase c_i f_i nf o end finalize_o op var o st = write_case o buf -if ne sp_find o div base 45 +if ne sp_find sp_tbl o div base 45 ret 2 end if ne st 0 @@ -190,7 +194,7 @@ end ret 0 end -fn emit_form idx ulong o edit ulong 16 buf edit uchar 128 to int +fn emit_form sp_tbl view ulong 3001 idx ulong o edit ulong 16 buf edit uchar 128 to int base = mul idx 45 op = get sp_tbl base var = get sp_tbl add base 1 @@ -199,7 +203,7 @@ nf = get sp_tbl add base 9 if eq nf 0 clear_o o op finalize_o op var o -if ne sp_find o idx +if ne sp_find sp_tbl o idx ret 2 end ret write_case o buf @@ -209,10 +213,10 @@ if eq nf 1 fbase = add base 10 for c_i ulong 4 clear_o o op -emit_one_field fbase c_i 0 1 op o +emit_one_field sp_tbl fbase c_i 0 1 o finalize_o op var o st1 = write_case o buf -if ne sp_find o idx +if ne sp_find sp_tbl o idx ret 2 end if ne st1 0 @@ -222,15 +226,16 @@ end ret 0 end -ret emit_form_multi base op var nf o buf +ret emit_form_multi sp_tbl base o buf end fn main to int -sp_init +sp_tbl = new ulong 3001 0 +sp_init sp_tbl o = new ulong 16 0 buf = new uchar 128 0 for idx ulong 63 -st = emit_form idx o buf +st = emit_form sp_tbl idx o buf if ne st 0 ret 1 end diff --git a/om/encoder/bw_spec_native.om b/om/encoder/bw_spec_native.om new file mode 100644 index 00000000..13aaa23e --- /dev/null +++ b/om/encoder/bw_spec_native.om @@ -0,0 +1,94 @@ +note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +note Function-mode host probe. Concatenate bw_enc_sm121 and bw_spec_sm121 first. +note Mode 0 must return 0; mode 1 corrupts an expected operand byte and returns 1; +note mode 2 returns the real raw SHFL range refusal E_RANGE, never a setup error. +fn np_eq a view ulong 4 b view ulong 4 to bool +for i ulong 4 +if ne get a i get b i +ret false +end +end +ret true +end +fn sp_native_probe mode ulong to ulong +state = new ulong 3001 0 +fresh = new ulong 3001 0 +o = new ulong 16 0 +dec = new ulong 16 0 +w = new ulong 4 4294967295 +ref = new ulong 4 0 +if ne sp_dec state w dec E_NOMAT +ret 10 +end +if ne get state 3000 1 +ret 11 +end +if eq mode 2 +put o 0 42 +put o 6 32 +ret sp_enc state o w +end +note Warmed table mutation must survive cached initialization and change semantics. +put o 0 1 +put o 1 5 +if ne enc1 o ref E_OK +ret 12 +end +shift = get state 57 +put state 57 add shift 1 +status = sp_enc state o w +put state 57 shift +if ne status E_OK +ret 13 +end +if np_eq w ref +ret 14 +end +if ne sp_dec state w dec E_OK +ret 15 +end +if eq get dec 1 get o 1 +ret 16 +end +note Another zero-filled owner must retain canonical bytes independently. +if ne get fresh 3000 0 +ret 17 +end +if ne sp_enc fresh o w E_OK +ret 18 +end +if not np_eq w ref +ret 19 +end +note RRU full GPR destination and explicit uniform-source flags survive native calls. +put o 0 8 +put o 1 32 +put o 2 1 +put o 4 3 +put o 5 2 +put o 8 1 +put o 12 1 +put o 14 1 +if ne enc1 o ref E_OK +ret 20 +end +if ne sp_enc state o w E_OK +ret 21 +end +if eq mode 1 +put ref 0 xor get ref 0 65536 +end +if not np_eq w ref +ret 1 +end +if ne sp_dec state w dec E_OK +ret 22 +end +if or ne get dec 1 32 ne get dec 5 2 +ret 23 +end +if or ne get dec 8 1 ne get dec 14 1 +ret 24 +end +ret 0 +end diff --git a/om/encoder/bw_spec_regress.om b/om/encoder/bw_spec_regress.om index 0d6bd3aa..8ac42ace 100644 --- a/om/encoder/bw_spec_regress.om +++ b/om/encoder/bw_spec_regress.om @@ -11,22 +11,22 @@ put o i 0 end put o 0 op end -fn parity o view ulong 16 to void +fn parity sp_tbl edit ulong 3001 o view ulong 16 to void w = new ulong 4 0 ref = new ulong 4 0 dec = new ulong 16 0 require eq enc1 o ref E_OK -require eq sp_enc o w E_OK +require eq sp_enc sp_tbl o w E_OK for i ulong 4 require eq get w i get ref i end -require eq sp_dec w dec E_OK -require same_sem o dec +require eq sp_dec sp_tbl w dec E_OK +require same_sem sp_tbl o dec end -fn emit_words o view ulong 16 to void +fn emit_words sp_tbl edit ulong 3001 o view ulong 16 to void w = new ulong 4 0 buf = new uchar 16 0 -require eq sp_enc o w E_OK +require eq sp_enc sp_tbl o w E_OK for i ulong 4 v = get w i off = mul i 4 @@ -38,19 +38,20 @@ end require eq write 1 buf 0 16 16 end fn main to int +sp_tbl = new ulong 3001 0 w = new ulong 4 4294967295 dec = new ulong 16 0 buf128 = new uchar 128 0 o = new ulong 16 0 mode = new uchar 16 0 note Cold decoder must initialize without any prior encoder call. -require eq sp_dec w dec E_NOMAT +require eq sp_dec sp_tbl w dec E_NOMAT note All absent RA/RB operands must encode RZ, independently byte checked. for j ulong 3 reset_o o add 51 j put o 1 4 put o 4 7 -parity o +parity sp_tbl o end note RRU destination is a full GPR, not a uniform register. reset_o o 8 @@ -61,11 +62,11 @@ put o 4 3 put o 8 1 put o 12 1 put o 14 1 -parity o -require eq sp_enc o w E_OK -require eq sp_dec w dec E_OK +parity sp_tbl o +require eq sp_enc sp_tbl o w E_OK +require eq sp_dec sp_tbl w dec E_OK put dec 8 0 -require not same_sem o dec +require not same_sem sp_tbl o dec note Optional sample output for offline nvdisasm, no binary listing committed. if ge argcnt 2 got = argread 1 mode 0 16 @@ -75,43 +76,43 @@ reset_o o add ulong 51 sub ulong get mode 1 48 put o 1 4 put o 4 7 end -emit_words o +emit_words sp_tbl o ret 0 end reset_o o 42 put o 6 32 -require eq sp_enc o w E_RANGE +require eq sp_enc sp_tbl o w E_RANGE reset_o o 51 put o 6 256 -require eq sp_enc o w E_RANGE +require eq sp_enc sp_tbl o w E_RANGE reset_o o 10 put o 1 8 -require eq sp_enc o w E_RANGE +require eq sp_enc sp_tbl o w E_RANGE reset_o o 12 put o 6 4294967296 -require eq sp_enc o w E_RANGE +require eq sp_enc sp_tbl o w E_RANGE reset_o o 4 put o 6 1 -require eq sp_enc o w E_RANGE +require eq sp_enc sp_tbl o w E_RANGE put o 6 262143 -require eq sp_enc o w E_RANGE +require eq sp_enc sp_tbl o w E_RANGE reset_o o 54 put o 6 2147483647 -require eq sp_enc o w E_RANGE +require eq sp_enc sp_tbl o w E_RANGE reset_o o 46 put o 6 4294967296 -require eq sp_enc o w E_RANGE +require eq sp_enc sp_tbl o w E_RANGE note A decoded active operand mutation must fail semantically. reset_o o 8 put o 13 1 -require eq sp_enc o w E_OK -require eq sp_dec w dec E_OK -require same_sem o dec +require eq sp_enc sp_tbl o w E_OK +require eq sp_dec sp_tbl w dec E_OK +require same_sem sp_tbl o dec put dec 1 add get dec 1 1 -require not same_sem o dec -require eq sp_dec w dec E_OK +require not same_sem sp_tbl o dec +require eq sp_dec sp_tbl w dec E_OK put dec 7 xor get dec 7 1 -require not same_sem o dec +require not same_sem sp_tbl o dec note Read errors and partial EOF are distinct from clean EOF. require eq read_exact int -1 buf128 128 -1 ret 0 diff --git a/om/encoder/bw_spec_sm121.om b/om/encoder/bw_spec_sm121.om index d2ed1c93..666226d8 100644 --- a/om/encoder/bw_spec_sm121.om +++ b/om/encoder/bw_spec_sm121.om @@ -32,10 +32,10 @@ const R_LDSW ulong 19 const R_FSET ulong 20 const R_PRED3 ulong 21 -global sp_tbl ulong 3000 -global sp_ok ulong 1 +note Caller-owned state: slots 0..2999 table, slot 3000 initialized last. +note Allocate zero-filled state per owner; never accept serialized or shared mutable state. -fn set_hdr idx ulong op ulong var ulong w3_def ulong nf ulong to void +fn set_hdr sp_tbl edit ulong 3001 idx ulong op ulong var ulong w3_def ulong nf ulong to void base = mul idx 45 put sp_tbl base op put sp_tbl add base 1 var @@ -43,847 +43,847 @@ put sp_tbl add base 8 w3_def put sp_tbl add base 9 nf end -fn set_w0 idx ulong fix ulong mask ulong to void +fn set_w0 sp_tbl edit ulong 3001 idx ulong fix ulong mask ulong to void base = mul idx 45 put sp_tbl add base 2 fix put sp_tbl add base 3 mask end -fn set_w1 idx ulong fix ulong mask ulong to void +fn set_w1 sp_tbl edit ulong 3001 idx ulong fix ulong mask ulong to void base = mul idx 45 put sp_tbl add base 4 fix put sp_tbl add base 5 mask end -fn set_w2 idx ulong fix ulong mask ulong to void +fn set_w2 sp_tbl edit ulong 3001 idx ulong fix ulong mask ulong to void base = mul idx 45 put sp_tbl add base 6 fix put sp_tbl add base 7 mask end -fn set_fld idx ulong f_idx ulong role ulong word ulong shift ulong to void +fn set_fld sp_tbl edit ulong 3001 idx ulong f_idx ulong role ulong word ulong shift ulong to void fbase = add add mul idx 45 10 mul f_idx 7 put sp_tbl fbase role put sp_tbl add fbase 1 word put sp_tbl add fbase 2 shift end -fn set_bnd idx ulong f_idx ulong width ulong is_s ulong min_v ulong to void +fn set_bnd sp_tbl edit ulong 3001 idx ulong f_idx ulong width ulong is_s ulong min_v ulong to void fbase = add add mul idx 45 10 mul f_idx 7 put sp_tbl add fbase 3 width put sp_tbl add fbase 4 is_s put sp_tbl add fbase 5 min_v end -fn set_max idx ulong f_idx ulong max_v ulong to void +fn set_max sp_tbl edit ulong 3001 idx ulong f_idx ulong max_v ulong to void fbase = add add mul idx 45 10 mul f_idx 7 put sp_tbl add fbase 6 max_v end -fn c_init0 to void -set_hdr 0 0 0 1032192 0 -set_w0 0 31000 4294967295 -set_w1 0 0 4294967295 -set_w2 0 0 4294967295 -set_hdr 1 1 0 1040896 1 -set_w0 1 29186 4278255615 -set_w1 1 255 4294967295 -set_w2 1 3840 4294967295 -set_fld 1 0 1 0 16 -set_bnd 1 0 8 0 0 -set_max 1 0 255 -set_hdr 2 2 0 1040896 2 -set_w0 2 30722 4278255615 -set_w1 2 0 0 -set_w2 2 3840 4294967295 -set_fld 2 0 1 0 16 -set_bnd 2 0 8 0 0 -set_max 2 0 255 -set_fld 2 1 9 1 0 -set_bnd 2 1 32 0 0 -set_max 2 1 4294967295 -set_hdr 3 3 0 926208 2 -set_w0 3 31001 4278255615 -set_w1 3 0 4294967295 -set_w2 3 0 4294902015 -set_fld 3 0 1 0 16 -set_bnd 3 0 8 0 0 -set_max 3 0 255 -set_fld 3 1 18 2 8 -set_bnd 3 1 8 0 0 -set_max 3 1 255 -set_hdr 4 4 0 1040896 2 -set_w0 4 4278221698 4278255615 -set_w1 4 0 4278190143 -set_w2 4 2048 4294967295 -set_fld 4 0 1 0 16 -set_bnd 4 0 8 0 0 -set_max 4 0 255 -set_fld 4 1 15 1 6 -set_bnd 4 1 18 0 0 -set_max 4 1 262143 -set_hdr 5 5 0 926208 2 -set_w0 5 4278221698 4278255615 -set_w1 5 0 4278190143 -set_w2 5 2560 4294967295 -set_fld 5 0 1 0 16 -set_bnd 5 0 8 0 0 -set_max 5 0 255 -set_fld 5 1 15 1 6 -set_bnd 5 1 18 0 0 -set_max 5 1 262143 -set_hdr 6 6 0 926208 2 -set_w0 6 4278220716 4278255615 -set_w1 6 0 4278190111 -set_w2 6 134219776 4294967295 -set_fld 6 0 5 0 16 -set_bnd 6 0 8 0 0 -set_max 6 0 31 -set_fld 6 1 15 1 5 -set_bnd 6 1 19 0 0 -set_max 6 1 524287 -set_hdr 7 7 0 945664 2 -set_w0 7 4278220716 4278255615 -set_w1 7 0 4278190111 -set_w2 7 134220288 4294967295 -set_fld 7 0 5 0 16 -set_bnd 7 0 8 0 0 -set_max 7 0 31 -set_fld 7 1 15 1 5 -set_bnd 7 1 19 0 0 -set_max 7 1 524287 -set_hdr 8 8 0 2083328 4 -set_w0 8 29220 65535 -set_w1 8 0 4294967040 -set_w2 8 126747136 4294967040 -set_fld 8 0 1 0 16 -set_bnd 8 0 8 0 0 -set_max 8 0 255 -set_fld 8 1 2 0 24 -set_bnd 8 1 8 0 0 -set_max 8 1 255 -set_fld 8 2 3 1 0 -set_bnd 8 2 8 0 0 -set_max 8 2 255 -set_fld 8 3 4 2 0 -set_bnd 8 3 8 0 0 -set_max 8 3 255 +fn c_init0 sp_tbl edit ulong 3001 to void +set_hdr sp_tbl 0 0 0 1032192 0 +set_w0 sp_tbl 0 31000 4294967295 +set_w1 sp_tbl 0 0 4294967295 +set_w2 sp_tbl 0 0 4294967295 +set_hdr sp_tbl 1 1 0 1040896 1 +set_w0 sp_tbl 1 29186 4278255615 +set_w1 sp_tbl 1 255 4294967295 +set_w2 sp_tbl 1 3840 4294967295 +set_fld sp_tbl 1 0 1 0 16 +set_bnd sp_tbl 1 0 8 0 0 +set_max sp_tbl 1 0 255 +set_hdr sp_tbl 2 2 0 1040896 2 +set_w0 sp_tbl 2 30722 4278255615 +set_w1 sp_tbl 2 0 0 +set_w2 sp_tbl 2 3840 4294967295 +set_fld sp_tbl 2 0 1 0 16 +set_bnd sp_tbl 2 0 8 0 0 +set_max sp_tbl 2 0 255 +set_fld sp_tbl 2 1 9 1 0 +set_bnd sp_tbl 2 1 32 0 0 +set_max sp_tbl 2 1 4294967295 +set_hdr sp_tbl 3 3 0 926208 2 +set_w0 sp_tbl 3 31001 4278255615 +set_w1 sp_tbl 3 0 4294967295 +set_w2 sp_tbl 3 0 4294902015 +set_fld sp_tbl 3 0 1 0 16 +set_bnd sp_tbl 3 0 8 0 0 +set_max sp_tbl 3 0 255 +set_fld sp_tbl 3 1 18 2 8 +set_bnd sp_tbl 3 1 8 0 0 +set_max sp_tbl 3 1 255 +set_hdr sp_tbl 4 4 0 1040896 2 +set_w0 sp_tbl 4 4278221698 4278255615 +set_w1 sp_tbl 4 0 4278190143 +set_w2 sp_tbl 4 2048 4294967295 +set_fld sp_tbl 4 0 1 0 16 +set_bnd sp_tbl 4 0 8 0 0 +set_max sp_tbl 4 0 255 +set_fld sp_tbl 4 1 15 1 6 +set_bnd sp_tbl 4 1 18 0 0 +set_max sp_tbl 4 1 262143 +set_hdr sp_tbl 5 5 0 926208 2 +set_w0 sp_tbl 5 4278221698 4278255615 +set_w1 sp_tbl 5 0 4278190143 +set_w2 sp_tbl 5 2560 4294967295 +set_fld sp_tbl 5 0 1 0 16 +set_bnd sp_tbl 5 0 8 0 0 +set_max sp_tbl 5 0 255 +set_fld sp_tbl 5 1 15 1 6 +set_bnd sp_tbl 5 1 18 0 0 +set_max sp_tbl 5 1 262143 +set_hdr sp_tbl 6 6 0 926208 2 +set_w0 sp_tbl 6 4278220716 4278255615 +set_w1 sp_tbl 6 0 4278190111 +set_w2 sp_tbl 6 134219776 4294967295 +set_fld sp_tbl 6 0 5 0 16 +set_bnd sp_tbl 6 0 8 0 0 +set_max sp_tbl 6 0 31 +set_fld sp_tbl 6 1 15 1 5 +set_bnd sp_tbl 6 1 19 0 0 +set_max sp_tbl 6 1 524287 +set_hdr sp_tbl 7 7 0 945664 2 +set_w0 sp_tbl 7 4278220716 4278255615 +set_w1 sp_tbl 7 0 4278190111 +set_w2 sp_tbl 7 134220288 4294967295 +set_fld sp_tbl 7 0 5 0 16 +set_bnd sp_tbl 7 0 8 0 0 +set_max sp_tbl 7 0 31 +set_fld sp_tbl 7 1 15 1 5 +set_bnd sp_tbl 7 1 19 0 0 +set_max sp_tbl 7 1 524287 +set_hdr sp_tbl 8 8 0 2083328 4 +set_w0 sp_tbl 8 29220 65535 +set_w1 sp_tbl 8 0 4294967040 +set_w2 sp_tbl 8 126747136 4294967040 +set_fld sp_tbl 8 0 1 0 16 +set_bnd sp_tbl 8 0 8 0 0 +set_max sp_tbl 8 0 255 +set_fld sp_tbl 8 1 2 0 24 +set_bnd sp_tbl 8 1 8 0 0 +set_max sp_tbl 8 1 255 +set_fld sp_tbl 8 2 3 1 0 +set_bnd sp_tbl 8 2 8 0 0 +set_max sp_tbl 8 2 255 +set_fld sp_tbl 8 3 4 2 0 +set_bnd sp_tbl 8 3 8 0 0 +set_max sp_tbl 8 3 255 end -fn c_init1 to void -set_hdr 9 8 1 2083328 4 -set_w0 9 31780 65535 -set_w1 9 0 4294967040 -set_w2 9 260964864 4294967040 -set_fld 9 0 1 0 16 -set_bnd 9 0 8 0 0 -set_max 9 0 255 -set_fld 9 1 2 0 24 -set_bnd 9 1 8 0 0 -set_max 9 1 255 -set_fld 9 2 7 1 0 -set_bnd 9 2 5 0 0 -set_max 9 2 31 -set_fld 9 3 4 2 0 -set_bnd 9 3 8 0 0 -set_max 9 3 255 -set_hdr 10 8 2 2083328 4 -set_w0 10 30756 65535 -set_w1 10 0 0 -set_w2 10 126747136 4294967040 -set_fld 10 0 1 0 16 -set_bnd 10 0 8 0 0 -set_max 10 0 255 -set_fld 10 1 2 0 24 -set_bnd 10 1 8 0 0 -set_max 10 1 255 -set_fld 10 2 9 1 0 -set_bnd 10 2 32 0 0 -set_max 10 2 4294967295 -set_fld 10 3 4 2 0 -set_bnd 10 3 8 0 0 -set_max 10 3 255 -set_hdr 11 9 0 2083840 4 -set_w0 11 30757 65535 -set_w1 11 0 0 -set_w2 11 126746624 4294967040 -set_fld 11 0 1 0 16 -set_bnd 11 0 8 0 0 -set_max 11 0 255 -set_fld 11 1 2 0 24 -set_bnd 11 1 8 0 0 -set_max 11 1 255 -set_fld 11 2 9 1 0 -set_bnd 11 2 32 0 0 -set_max 11 2 4294967295 -set_fld 11 3 4 2 0 -set_bnd 11 3 8 0 0 -set_max 11 3 255 -set_hdr 12 10 0 3136000 3 -set_w0 12 31756 65535 -set_w1 12 0 4294967040 -set_w2 12 200302704 4294967295 -set_fld 12 0 21 0 16 -set_bnd 12 0 8 0 0 -set_max 12 0 7 -set_fld 12 1 2 0 24 -set_bnd 12 1 8 0 0 -set_max 12 1 255 -set_fld 12 2 7 1 0 -set_bnd 12 2 8 0 0 -set_max 12 2 31 -set_hdr 13 10 1 2087424 3 -set_w0 13 30732 65535 -set_w1 13 0 0 -set_w2 13 66085488 4294967295 -set_fld 13 0 21 0 16 -set_bnd 13 0 8 0 0 -set_max 13 0 7 -set_fld 13 1 2 0 24 -set_bnd 13 1 8 0 0 -set_max 13 1 255 -set_fld 13 2 9 1 0 -set_bnd 13 2 32 0 0 -set_max 13 2 4294967295 -set_hdr 14 11 0 991744 3 -set_w0 14 31105 65535 -set_w1 14 0 4294967040 -set_w2 14 203299072 4294967295 -set_fld 14 0 1 0 16 -set_bnd 14 0 8 0 0 -set_max 14 0 255 -set_fld 14 1 2 0 24 -set_bnd 14 1 8 0 0 -set_max 14 1 255 -set_fld 14 2 7 1 0 -set_bnd 14 2 8 0 0 -set_max 14 2 31 -set_hdr 15 12 0 1040896 4 -set_w0 15 31110 16777215 -set_w1 15 0 0 -set_w2 15 202381568 4294967040 -set_fld 15 0 2 0 24 -set_bnd 15 0 8 0 0 -set_max 15 0 255 -set_fld 15 1 3 1 0 -set_bnd 15 1 8 0 0 -set_max 15 1 255 -set_fld 15 2 10 1 8 -set_bnd 15 2 24 1 18446744073701163008 -set_max 15 2 8388607 -set_fld 15 3 7 2 0 -set_bnd 15 3 8 0 0 -set_max 15 3 31 -set_hdr 16 13 0 1040896 3 -set_w0 16 31110 16777215 -set_w1 16 0 4294967040 -set_w2 16 202447104 4294967040 -set_fld 16 0 2 0 24 -set_bnd 16 0 8 0 0 -set_max 16 0 255 -set_fld 16 1 3 1 0 -set_bnd 16 1 8 0 0 -set_max 16 1 255 -set_fld 16 2 7 2 0 -set_bnd 16 2 8 0 0 -set_max 16 2 31 -set_hdr 17 14 0 17811968 3 -set_w0 17 29200 65535 -set_w1 17 0 4294967040 -set_w2 17 134209791 4294967295 -set_fld 17 0 1 0 16 -set_bnd 17 0 8 0 0 -set_max 17 0 255 -set_fld 17 1 2 0 24 -set_bnd 17 1 8 0 0 -set_max 17 1 255 -set_fld 17 2 3 1 0 -set_bnd 17 2 8 0 0 -set_max 17 2 255 +fn c_init1 sp_tbl edit ulong 3001 to void +set_hdr sp_tbl 9 8 1 2083328 4 +set_w0 sp_tbl 9 31780 65535 +set_w1 sp_tbl 9 0 4294967040 +set_w2 sp_tbl 9 260964864 4294967040 +set_fld sp_tbl 9 0 1 0 16 +set_bnd sp_tbl 9 0 8 0 0 +set_max sp_tbl 9 0 255 +set_fld sp_tbl 9 1 2 0 24 +set_bnd sp_tbl 9 1 8 0 0 +set_max sp_tbl 9 1 255 +set_fld sp_tbl 9 2 7 1 0 +set_bnd sp_tbl 9 2 5 0 0 +set_max sp_tbl 9 2 31 +set_fld sp_tbl 9 3 4 2 0 +set_bnd sp_tbl 9 3 8 0 0 +set_max sp_tbl 9 3 255 +set_hdr sp_tbl 10 8 2 2083328 4 +set_w0 sp_tbl 10 30756 65535 +set_w1 sp_tbl 10 0 0 +set_w2 sp_tbl 10 126747136 4294967040 +set_fld sp_tbl 10 0 1 0 16 +set_bnd sp_tbl 10 0 8 0 0 +set_max sp_tbl 10 0 255 +set_fld sp_tbl 10 1 2 0 24 +set_bnd sp_tbl 10 1 8 0 0 +set_max sp_tbl 10 1 255 +set_fld sp_tbl 10 2 9 1 0 +set_bnd sp_tbl 10 2 32 0 0 +set_max sp_tbl 10 2 4294967295 +set_fld sp_tbl 10 3 4 2 0 +set_bnd sp_tbl 10 3 8 0 0 +set_max sp_tbl 10 3 255 +set_hdr sp_tbl 11 9 0 2083840 4 +set_w0 sp_tbl 11 30757 65535 +set_w1 sp_tbl 11 0 0 +set_w2 sp_tbl 11 126746624 4294967040 +set_fld sp_tbl 11 0 1 0 16 +set_bnd sp_tbl 11 0 8 0 0 +set_max sp_tbl 11 0 255 +set_fld sp_tbl 11 1 2 0 24 +set_bnd sp_tbl 11 1 8 0 0 +set_max sp_tbl 11 1 255 +set_fld sp_tbl 11 2 9 1 0 +set_bnd sp_tbl 11 2 32 0 0 +set_max sp_tbl 11 2 4294967295 +set_fld sp_tbl 11 3 4 2 0 +set_bnd sp_tbl 11 3 8 0 0 +set_max sp_tbl 11 3 255 +set_hdr sp_tbl 12 10 0 3136000 3 +set_w0 sp_tbl 12 31756 65535 +set_w1 sp_tbl 12 0 4294967040 +set_w2 sp_tbl 12 200302704 4294967295 +set_fld sp_tbl 12 0 21 0 16 +set_bnd sp_tbl 12 0 8 0 0 +set_max sp_tbl 12 0 7 +set_fld sp_tbl 12 1 2 0 24 +set_bnd sp_tbl 12 1 8 0 0 +set_max sp_tbl 12 1 255 +set_fld sp_tbl 12 2 7 1 0 +set_bnd sp_tbl 12 2 8 0 0 +set_max sp_tbl 12 2 31 +set_hdr sp_tbl 13 10 1 2087424 3 +set_w0 sp_tbl 13 30732 65535 +set_w1 sp_tbl 13 0 0 +set_w2 sp_tbl 13 66085488 4294967295 +set_fld sp_tbl 13 0 21 0 16 +set_bnd sp_tbl 13 0 8 0 0 +set_max sp_tbl 13 0 7 +set_fld sp_tbl 13 1 2 0 24 +set_bnd sp_tbl 13 1 8 0 0 +set_max sp_tbl 13 1 255 +set_fld sp_tbl 13 2 9 1 0 +set_bnd sp_tbl 13 2 32 0 0 +set_max sp_tbl 13 2 4294967295 +set_hdr sp_tbl 14 11 0 991744 3 +set_w0 sp_tbl 14 31105 65535 +set_w1 sp_tbl 14 0 4294967040 +set_w2 sp_tbl 14 203299072 4294967295 +set_fld sp_tbl 14 0 1 0 16 +set_bnd sp_tbl 14 0 8 0 0 +set_max sp_tbl 14 0 255 +set_fld sp_tbl 14 1 2 0 24 +set_bnd sp_tbl 14 1 8 0 0 +set_max sp_tbl 14 1 255 +set_fld sp_tbl 14 2 7 1 0 +set_bnd sp_tbl 14 2 8 0 0 +set_max sp_tbl 14 2 31 +set_hdr sp_tbl 15 12 0 1040896 4 +set_w0 sp_tbl 15 31110 16777215 +set_w1 sp_tbl 15 0 0 +set_w2 sp_tbl 15 202381568 4294967040 +set_fld sp_tbl 15 0 2 0 24 +set_bnd sp_tbl 15 0 8 0 0 +set_max sp_tbl 15 0 255 +set_fld sp_tbl 15 1 3 1 0 +set_bnd sp_tbl 15 1 8 0 0 +set_max sp_tbl 15 1 255 +set_fld sp_tbl 15 2 10 1 8 +set_bnd sp_tbl 15 2 24 1 18446744073701163008 +set_max sp_tbl 15 2 8388607 +set_fld sp_tbl 15 3 7 2 0 +set_bnd sp_tbl 15 3 8 0 0 +set_max sp_tbl 15 3 31 +set_hdr sp_tbl 16 13 0 1040896 3 +set_w0 sp_tbl 16 31110 16777215 +set_w1 sp_tbl 16 0 4294967040 +set_w2 sp_tbl 16 202447104 4294967040 +set_fld sp_tbl 16 0 2 0 24 +set_bnd sp_tbl 16 0 8 0 0 +set_max sp_tbl 16 0 255 +set_fld sp_tbl 16 1 3 1 0 +set_bnd sp_tbl 16 1 8 0 0 +set_max sp_tbl 16 1 255 +set_fld sp_tbl 16 2 7 2 0 +set_bnd sp_tbl 16 2 8 0 0 +set_max sp_tbl 16 2 31 +set_hdr sp_tbl 17 14 0 17811968 3 +set_w0 sp_tbl 17 29200 65535 +set_w1 sp_tbl 17 0 4294967040 +set_w2 sp_tbl 17 134209791 4294967295 +set_fld sp_tbl 17 0 1 0 16 +set_bnd sp_tbl 17 0 8 0 0 +set_max sp_tbl 17 0 255 +set_fld sp_tbl 17 1 2 0 24 +set_bnd sp_tbl 17 1 8 0 0 +set_max sp_tbl 17 1 255 +set_fld sp_tbl 17 2 3 1 0 +set_bnd sp_tbl 17 2 8 0 0 +set_max sp_tbl 17 2 255 end -fn c_init2 to void -set_hdr 18 15 0 1040896 4 -set_w0 18 29244 65535 -set_w1 18 0 4294967040 -set_w2 18 6144 4294967040 -set_fld 18 0 1 0 16 -set_bnd 18 0 8 0 0 -set_max 18 0 255 -set_fld 18 1 2 0 24 -set_bnd 18 1 8 0 0 -set_max 18 1 255 -set_fld 18 2 3 1 0 -set_bnd 18 2 8 0 0 -set_max 18 2 255 -set_fld 18 3 4 2 0 -set_bnd 18 3 8 0 0 -set_max 18 3 255 -set_hdr 19 16 0 1040896 4 -set_w0 19 29244 65535 -set_w1 19 0 4294967040 -set_w2 19 268288 4294967040 -set_fld 19 0 1 0 16 -set_bnd 19 0 8 0 0 -set_max 19 0 255 -set_fld 19 1 2 0 24 -set_bnd 19 1 8 0 0 -set_max 19 1 255 -set_fld 19 2 3 1 0 -set_bnd 19 2 8 0 0 -set_max 19 2 255 -set_fld 19 3 4 2 0 -set_bnd 19 3 8 0 0 -set_max 19 3 255 -set_hdr 20 17 0 2083328 3 -set_w0 20 4278220825 4278255615 -set_w1 20 0 0 -set_w2 20 71168 4294967040 -set_fld 20 0 1 0 16 -set_bnd 20 0 8 0 0 -set_max 20 0 255 -set_fld 20 1 9 1 0 -set_bnd 20 1 32 0 0 -set_max 20 1 4294967295 -set_fld 20 2 2 2 0 -set_bnd 20 2 8 0 0 -set_max 20 2 255 -set_hdr 21 18 0 2083328 3 -set_w0 21 30738 65535 -set_w1 21 0 0 -set_w2 21 126796031 4294967295 -set_fld 21 0 1 0 16 -set_bnd 21 0 8 0 0 -set_max 21 0 255 -set_fld 21 1 2 0 24 -set_bnd 21 1 8 0 0 -set_max 21 1 255 -set_fld 21 2 9 1 0 -set_bnd 21 2 32 0 0 -set_max 21 2 4294967295 -set_hdr 22 19 0 991744 3 -set_w0 22 31105 65535 -set_w1 22 0 4294967040 -set_w2 22 203298048 4294967295 -set_fld 22 0 1 0 16 -set_bnd 22 0 8 0 0 -set_max 22 0 255 -set_fld 22 1 2 0 24 -set_bnd 22 1 8 0 0 -set_max 22 1 255 -set_fld 22 2 7 1 0 -set_bnd 22 2 8 0 0 -set_max 22 2 31 -set_hdr 23 20 0 991744 3 -set_w0 23 31105 65535 -set_w1 23 0 4294967040 -set_w2 23 203380992 4294967295 -set_fld 23 0 1 0 16 -set_bnd 23 0 8 0 0 -set_max 23 0 255 -set_fld 23 1 2 0 24 -set_bnd 23 1 8 0 0 -set_max 23 1 255 -set_fld 23 2 7 1 0 -set_bnd 23 2 8 0 0 -set_max 23 2 31 -set_hdr 24 21 0 991744 3 -set_w0 24 31105 65535 -set_w1 24 0 4294967040 -set_w2 24 202250496 4294967295 -set_fld 24 0 1 0 16 -set_bnd 24 0 8 0 0 -set_max 24 0 255 -set_fld 24 1 2 0 24 -set_bnd 24 1 8 0 0 -set_max 24 1 255 -set_fld 24 2 7 1 0 -set_bnd 24 2 8 0 0 -set_max 24 2 31 -set_hdr 25 22 0 1040896 4 -set_w0 25 2438 4095 -set_w1 25 0 4294967040 -set_w2 25 202463488 4294967040 -set_fld 25 0 8 0 12 -set_bnd 25 0 4 0 0 -set_max 25 0 8 -set_fld 25 1 2 0 24 -set_bnd 25 1 8 0 0 -set_max 25 1 255 -set_fld 25 2 3 1 0 -set_bnd 25 2 8 0 0 -set_max 25 2 255 -set_fld 25 3 7 2 0 -set_bnd 25 3 8 0 0 -set_max 25 3 31 -set_hdr 26 23 0 1043456 0 -set_w0 26 31122 4294967295 -set_w1 26 0 4294967295 -set_w2 26 45056 4294967295 +fn c_init2 sp_tbl edit ulong 3001 to void +set_hdr sp_tbl 18 15 0 1040896 4 +set_w0 sp_tbl 18 29244 65535 +set_w1 sp_tbl 18 0 4294967040 +set_w2 sp_tbl 18 6144 4294967040 +set_fld sp_tbl 18 0 1 0 16 +set_bnd sp_tbl 18 0 8 0 0 +set_max sp_tbl 18 0 255 +set_fld sp_tbl 18 1 2 0 24 +set_bnd sp_tbl 18 1 8 0 0 +set_max sp_tbl 18 1 255 +set_fld sp_tbl 18 2 3 1 0 +set_bnd sp_tbl 18 2 8 0 0 +set_max sp_tbl 18 2 255 +set_fld sp_tbl 18 3 4 2 0 +set_bnd sp_tbl 18 3 8 0 0 +set_max sp_tbl 18 3 255 +set_hdr sp_tbl 19 16 0 1040896 4 +set_w0 sp_tbl 19 29244 65535 +set_w1 sp_tbl 19 0 4294967040 +set_w2 sp_tbl 19 268288 4294967040 +set_fld sp_tbl 19 0 1 0 16 +set_bnd sp_tbl 19 0 8 0 0 +set_max sp_tbl 19 0 255 +set_fld sp_tbl 19 1 2 0 24 +set_bnd sp_tbl 19 1 8 0 0 +set_max sp_tbl 19 1 255 +set_fld sp_tbl 19 2 3 1 0 +set_bnd sp_tbl 19 2 8 0 0 +set_max sp_tbl 19 2 255 +set_fld sp_tbl 19 3 4 2 0 +set_bnd sp_tbl 19 3 8 0 0 +set_max sp_tbl 19 3 255 +set_hdr sp_tbl 20 17 0 2083328 3 +set_w0 sp_tbl 20 4278220825 4278255615 +set_w1 sp_tbl 20 0 0 +set_w2 sp_tbl 20 71168 4294967040 +set_fld sp_tbl 20 0 1 0 16 +set_bnd sp_tbl 20 0 8 0 0 +set_max sp_tbl 20 0 255 +set_fld sp_tbl 20 1 9 1 0 +set_bnd sp_tbl 20 1 32 0 0 +set_max sp_tbl 20 1 4294967295 +set_fld sp_tbl 20 2 2 2 0 +set_bnd sp_tbl 20 2 8 0 0 +set_max sp_tbl 20 2 255 +set_hdr sp_tbl 21 18 0 2083328 3 +set_w0 sp_tbl 21 30738 65535 +set_w1 sp_tbl 21 0 0 +set_w2 sp_tbl 21 126796031 4294967295 +set_fld sp_tbl 21 0 1 0 16 +set_bnd sp_tbl 21 0 8 0 0 +set_max sp_tbl 21 0 255 +set_fld sp_tbl 21 1 2 0 24 +set_bnd sp_tbl 21 1 8 0 0 +set_max sp_tbl 21 1 255 +set_fld sp_tbl 21 2 9 1 0 +set_bnd sp_tbl 21 2 32 0 0 +set_max sp_tbl 21 2 4294967295 +set_hdr sp_tbl 22 19 0 991744 3 +set_w0 sp_tbl 22 31105 65535 +set_w1 sp_tbl 22 0 4294967040 +set_w2 sp_tbl 22 203298048 4294967295 +set_fld sp_tbl 22 0 1 0 16 +set_bnd sp_tbl 22 0 8 0 0 +set_max sp_tbl 22 0 255 +set_fld sp_tbl 22 1 2 0 24 +set_bnd sp_tbl 22 1 8 0 0 +set_max sp_tbl 22 1 255 +set_fld sp_tbl 22 2 7 1 0 +set_bnd sp_tbl 22 2 8 0 0 +set_max sp_tbl 22 2 31 +set_hdr sp_tbl 23 20 0 991744 3 +set_w0 sp_tbl 23 31105 65535 +set_w1 sp_tbl 23 0 4294967040 +set_w2 sp_tbl 23 203380992 4294967295 +set_fld sp_tbl 23 0 1 0 16 +set_bnd sp_tbl 23 0 8 0 0 +set_max sp_tbl 23 0 255 +set_fld sp_tbl 23 1 2 0 24 +set_bnd sp_tbl 23 1 8 0 0 +set_max sp_tbl 23 1 255 +set_fld sp_tbl 23 2 7 1 0 +set_bnd sp_tbl 23 2 8 0 0 +set_max sp_tbl 23 2 31 +set_hdr sp_tbl 24 21 0 991744 3 +set_w0 sp_tbl 24 31105 65535 +set_w1 sp_tbl 24 0 4294967040 +set_w2 sp_tbl 24 202250496 4294967295 +set_fld sp_tbl 24 0 1 0 16 +set_bnd sp_tbl 24 0 8 0 0 +set_max sp_tbl 24 0 255 +set_fld sp_tbl 24 1 2 0 24 +set_bnd sp_tbl 24 1 8 0 0 +set_max sp_tbl 24 1 255 +set_fld sp_tbl 24 2 7 1 0 +set_bnd sp_tbl 24 2 8 0 0 +set_max sp_tbl 24 2 31 +set_hdr sp_tbl 25 22 0 1040896 4 +set_w0 sp_tbl 25 2438 4095 +set_w1 sp_tbl 25 0 4294967040 +set_w2 sp_tbl 25 202463488 4294967040 +set_fld sp_tbl 25 0 8 0 12 +set_bnd sp_tbl 25 0 4 0 0 +set_max sp_tbl 25 0 8 +set_fld sp_tbl 25 1 2 0 24 +set_bnd sp_tbl 25 1 8 0 0 +set_max sp_tbl 25 1 255 +set_fld sp_tbl 25 2 3 1 0 +set_bnd sp_tbl 25 2 8 0 0 +set_max sp_tbl 25 2 255 +set_fld sp_tbl 25 3 7 2 0 +set_bnd sp_tbl 25 3 8 0 0 +set_max sp_tbl 25 3 31 +set_hdr sp_tbl 26 23 0 1043456 0 +set_w0 sp_tbl 26 31122 4294967295 +set_w1 sp_tbl 26 0 4294967295 +set_w2 sp_tbl 26 45056 4294967295 end -fn c_init3 to void -set_hdr 27 24 0 1043456 0 -set_w0 27 31122 4294967295 -set_w1 27 0 4294967295 -set_w2 27 12288 4294967295 -set_hdr 28 25 0 1042432 0 -set_w0 28 4278221199 4294967295 -set_w1 28 0 4294967295 -set_w2 28 33554432 4294967295 -set_hdr 29 26 0 3284480 4 -set_w0 29 31144 65535 -set_w1 29 2147483648 2147483648 -set_w2 29 136270080 4294967040 -set_fld 29 0 1 0 16 -set_bnd 29 0 8 0 0 -set_max 29 0 255 -set_fld 29 1 2 0 24 -set_bnd 29 1 8 0 0 -set_max 29 1 255 -set_fld 29 2 3 1 0 -set_bnd 29 2 8 0 0 -set_max 29 2 255 -set_fld 29 3 7 2 0 -set_bnd 29 3 8 0 0 -set_max 29 3 31 -set_hdr 30 27 0 3284480 4 -set_w0 30 31144 65535 -set_w1 30 2147483648 2147483648 -set_w2 30 203378944 4294967040 -set_fld 30 0 1 0 16 -set_bnd 30 0 8 0 0 -set_max 30 0 255 -set_fld 30 1 2 0 24 -set_bnd 30 1 8 0 0 -set_max 30 1 255 -set_fld 30 2 3 1 0 -set_bnd 30 2 8 0 0 -set_max 30 2 255 -set_fld 30 3 7 2 0 -set_bnd 30 3 8 0 0 -set_max 30 3 31 -set_hdr 31 28 0 2087424 2 -set_w0 31 29196 65535 -set_w1 31 0 4294967040 -set_w2 31 66084976 4294967295 -set_fld 31 0 2 0 24 -set_bnd 31 0 8 0 0 -set_max 31 0 255 -set_fld 31 1 3 1 0 -set_bnd 31 1 8 0 0 -set_max 31 1 255 -set_hdr 32 29 0 2083328 3 -set_w0 32 29202 65535 -set_w1 32 0 4294967040 -set_w2 32 126762239 4294967295 -set_fld 32 0 1 0 16 -set_bnd 32 0 8 0 0 -set_max 32 0 255 -set_fld 32 1 2 0 24 -set_bnd 32 1 8 0 0 -set_max 32 1 255 -set_fld 32 2 3 1 0 -set_bnd 32 2 8 0 0 -set_max 32 2 255 -set_hdr 33 30 0 5227520 3 -set_w0 33 29217 65535 -set_w1 33 0 4294967040 -set_w2 33 0 4294967295 -set_fld 33 0 1 0 16 -set_bnd 33 0 8 0 0 -set_max 33 0 255 -set_fld 33 1 2 0 24 -set_bnd 33 1 8 0 0 -set_max 33 1 255 -set_fld 33 2 3 1 0 -set_bnd 33 2 8 0 0 -set_max 33 2 255 -set_hdr 34 31 0 5227520 3 -set_w0 34 29217 65535 -set_w1 34 2147483648 2147483648 -set_w2 34 0 4294967295 -set_fld 34 0 1 0 16 -set_bnd 34 0 8 0 0 -set_max 34 0 255 -set_fld 34 1 2 0 24 -set_bnd 34 1 8 0 0 -set_max 34 1 255 -set_fld 34 2 3 1 0 -set_bnd 34 2 8 0 0 -set_max 34 2 255 -set_hdr 35 32 0 5227520 3 -set_w0 35 29216 65535 -set_w1 35 0 4294967040 -set_w2 35 4194304 4294967295 -set_fld 35 0 1 0 16 -set_bnd 35 0 8 0 0 -set_max 35 0 255 -set_fld 35 1 2 0 24 -set_bnd 35 1 8 0 0 -set_max 35 1 255 -set_fld 35 2 3 1 0 -set_bnd 35 2 8 0 0 -set_max 35 2 255 +fn c_init3 sp_tbl edit ulong 3001 to void +set_hdr sp_tbl 27 24 0 1043456 0 +set_w0 sp_tbl 27 31122 4294967295 +set_w1 sp_tbl 27 0 4294967295 +set_w2 sp_tbl 27 12288 4294967295 +set_hdr sp_tbl 28 25 0 1042432 0 +set_w0 sp_tbl 28 4278221199 4294967295 +set_w1 sp_tbl 28 0 4294967295 +set_w2 sp_tbl 28 33554432 4294967295 +set_hdr sp_tbl 29 26 0 3284480 4 +set_w0 sp_tbl 29 31144 65535 +set_w1 sp_tbl 29 2147483648 2147483648 +set_w2 sp_tbl 29 136270080 4294967040 +set_fld sp_tbl 29 0 1 0 16 +set_bnd sp_tbl 29 0 8 0 0 +set_max sp_tbl 29 0 255 +set_fld sp_tbl 29 1 2 0 24 +set_bnd sp_tbl 29 1 8 0 0 +set_max sp_tbl 29 1 255 +set_fld sp_tbl 29 2 3 1 0 +set_bnd sp_tbl 29 2 8 0 0 +set_max sp_tbl 29 2 255 +set_fld sp_tbl 29 3 7 2 0 +set_bnd sp_tbl 29 3 8 0 0 +set_max sp_tbl 29 3 31 +set_hdr sp_tbl 30 27 0 3284480 4 +set_w0 sp_tbl 30 31144 65535 +set_w1 sp_tbl 30 2147483648 2147483648 +set_w2 sp_tbl 30 203378944 4294967040 +set_fld sp_tbl 30 0 1 0 16 +set_bnd sp_tbl 30 0 8 0 0 +set_max sp_tbl 30 0 255 +set_fld sp_tbl 30 1 2 0 24 +set_bnd sp_tbl 30 1 8 0 0 +set_max sp_tbl 30 1 255 +set_fld sp_tbl 30 2 3 1 0 +set_bnd sp_tbl 30 2 8 0 0 +set_max sp_tbl 30 2 255 +set_fld sp_tbl 30 3 7 2 0 +set_bnd sp_tbl 30 3 8 0 0 +set_max sp_tbl 30 3 31 +set_hdr sp_tbl 31 28 0 2087424 2 +set_w0 sp_tbl 31 29196 65535 +set_w1 sp_tbl 31 0 4294967040 +set_w2 sp_tbl 31 66084976 4294967295 +set_fld sp_tbl 31 0 2 0 24 +set_bnd sp_tbl 31 0 8 0 0 +set_max sp_tbl 31 0 255 +set_fld sp_tbl 31 1 3 1 0 +set_bnd sp_tbl 31 1 8 0 0 +set_max sp_tbl 31 1 255 +set_hdr sp_tbl 32 29 0 2083328 3 +set_w0 sp_tbl 32 29202 65535 +set_w1 sp_tbl 32 0 4294967040 +set_w2 sp_tbl 32 126762239 4294967295 +set_fld sp_tbl 32 0 1 0 16 +set_bnd sp_tbl 32 0 8 0 0 +set_max sp_tbl 32 0 255 +set_fld sp_tbl 32 1 2 0 24 +set_bnd sp_tbl 32 1 8 0 0 +set_max sp_tbl 32 1 255 +set_fld sp_tbl 32 2 3 1 0 +set_bnd sp_tbl 32 2 8 0 0 +set_max sp_tbl 32 2 255 +set_hdr sp_tbl 33 30 0 5227520 3 +set_w0 sp_tbl 33 29217 65535 +set_w1 sp_tbl 33 0 4294967040 +set_w2 sp_tbl 33 0 4294967295 +set_fld sp_tbl 33 0 1 0 16 +set_bnd sp_tbl 33 0 8 0 0 +set_max sp_tbl 33 0 255 +set_fld sp_tbl 33 1 2 0 24 +set_bnd sp_tbl 33 1 8 0 0 +set_max sp_tbl 33 1 255 +set_fld sp_tbl 33 2 3 1 0 +set_bnd sp_tbl 33 2 8 0 0 +set_max sp_tbl 33 2 255 +set_hdr sp_tbl 34 31 0 5227520 3 +set_w0 sp_tbl 34 29217 65535 +set_w1 sp_tbl 34 2147483648 2147483648 +set_w2 sp_tbl 34 0 4294967295 +set_fld sp_tbl 34 0 1 0 16 +set_bnd sp_tbl 34 0 8 0 0 +set_max sp_tbl 34 0 255 +set_fld sp_tbl 34 1 2 0 24 +set_bnd sp_tbl 34 1 8 0 0 +set_max sp_tbl 34 1 255 +set_fld sp_tbl 34 2 3 1 0 +set_bnd sp_tbl 34 2 8 0 0 +set_max sp_tbl 34 2 255 +set_hdr sp_tbl 35 32 0 5227520 3 +set_w0 sp_tbl 35 29216 65535 +set_w1 sp_tbl 35 0 4294967040 +set_w2 sp_tbl 35 4194304 4294967295 +set_fld sp_tbl 35 0 1 0 16 +set_bnd sp_tbl 35 0 8 0 0 +set_max sp_tbl 35 0 255 +set_fld sp_tbl 35 1 2 0 24 +set_bnd sp_tbl 35 1 8 0 0 +set_max sp_tbl 35 1 255 +set_fld sp_tbl 35 2 3 1 0 +set_bnd sp_tbl 35 2 8 0 0 +set_max sp_tbl 35 2 255 end -fn c_init4 to void -set_hdr 36 33 0 5227520 4 -set_w0 36 29219 65535 -set_w1 36 0 4294967040 -set_w2 36 0 4294967040 -set_fld 36 0 1 0 16 -set_bnd 36 0 8 0 0 -set_max 36 0 255 -set_fld 36 1 2 0 24 -set_bnd 36 1 8 0 0 -set_max 36 1 255 -set_fld 36 2 3 1 0 -set_bnd 36 2 8 0 0 -set_max 36 2 255 -set_fld 36 3 4 2 0 -set_bnd 36 3 8 0 0 -set_max 36 3 255 -set_hdr 37 34 0 5227520 4 -set_w0 37 29195 65535 -set_w1 37 0 4294967040 -set_w2 37 0 0 -set_fld 37 0 21 0 16 -set_bnd 37 0 8 0 0 -set_max 37 0 7 -set_fld 37 1 2 0 24 -set_bnd 37 1 8 0 0 -set_max 37 1 255 -set_fld 37 2 3 1 0 -set_bnd 37 2 8 0 0 -set_max 37 2 255 -set_fld 37 3 20 2 0 -set_bnd 37 3 32 0 0 -set_max 37 3 4294967295 -set_hdr 38 35 0 1034752 4 -set_w0 38 29192 65535 -set_w1 38 0 4294967040 -set_w2 38 0 4294967288 -set_fld 38 0 1 0 16 -set_bnd 38 0 8 0 0 -set_max 38 0 255 -set_fld 38 1 2 0 24 -set_bnd 38 1 8 0 0 -set_max 38 1 255 -set_fld 38 2 3 1 0 -set_bnd 38 2 8 0 0 -set_max 38 2 255 -set_fld 38 3 21 2 0 -set_bnd 38 3 8 0 0 -set_max 38 3 7 -set_hdr 39 36 0 5227520 3 -set_w0 39 29193 65535 -set_w1 39 0 4294967040 -set_w2 39 58720256 4294967295 -set_fld 39 0 1 0 16 -set_bnd 39 0 8 0 0 -set_max 39 0 255 -set_fld 39 1 2 0 24 -set_bnd 39 1 8 0 0 -set_max 39 1 255 -set_fld 39 2 3 1 0 -set_bnd 39 2 8 0 0 -set_max 39 2 255 -set_hdr 40 37 0 5227520 3 -set_w0 40 29193 65535 -set_w1 40 0 4294967040 -set_w2 40 125829120 4294967295 -set_fld 40 0 1 0 16 -set_bnd 40 0 8 0 0 -set_max 40 0 255 -set_fld 40 1 2 0 24 -set_bnd 40 1 8 0 0 -set_max 40 1 255 -set_fld 40 2 3 1 0 -set_bnd 40 2 8 0 0 -set_max 40 2 255 -set_hdr 41 38 0 5235200 2 -set_w0 41 29253 4278255615 -set_w1 41 0 4294967040 -set_w2 41 2102272 4294967295 -set_fld 41 0 1 0 16 -set_bnd 41 0 8 0 0 -set_max 41 0 255 -set_fld 41 1 2 1 0 -set_bnd 41 1 8 0 0 -set_max 41 1 255 -set_hdr 42 39 0 5120512 2 -set_w0 42 29445 4278255615 -set_w1 42 0 4294967040 -set_w2 42 2158848 4294967295 -set_fld 42 0 1 0 16 -set_bnd 42 0 8 0 0 -set_max 42 0 255 -set_fld 42 1 2 1 0 -set_bnd 42 1 8 0 0 -set_max 42 1 255 -set_hdr 43 40 0 926720 2 -set_w0 43 29448 4278255615 -set_w1 43 0 4294967040 -set_w2 43 4096 4294967295 -set_fld 43 0 1 0 16 -set_bnd 43 0 8 0 0 -set_max 43 0 255 -set_fld 43 1 2 1 0 -set_bnd 43 1 8 0 0 -set_max 43 1 255 -set_hdr 44 41 0 926720 2 -set_w0 44 29448 4278255615 -set_w1 44 0 4294967040 -set_w2 44 5120 4294967295 -set_fld 44 0 1 0 16 -set_bnd 44 0 8 0 0 -set_max 44 0 255 -set_fld 44 1 2 1 0 -set_bnd 44 1 8 0 0 -set_max 44 1 255 +fn c_init4 sp_tbl edit ulong 3001 to void +set_hdr sp_tbl 36 33 0 5227520 4 +set_w0 sp_tbl 36 29219 65535 +set_w1 sp_tbl 36 0 4294967040 +set_w2 sp_tbl 36 0 4294967040 +set_fld sp_tbl 36 0 1 0 16 +set_bnd sp_tbl 36 0 8 0 0 +set_max sp_tbl 36 0 255 +set_fld sp_tbl 36 1 2 0 24 +set_bnd sp_tbl 36 1 8 0 0 +set_max sp_tbl 36 1 255 +set_fld sp_tbl 36 2 3 1 0 +set_bnd sp_tbl 36 2 8 0 0 +set_max sp_tbl 36 2 255 +set_fld sp_tbl 36 3 4 2 0 +set_bnd sp_tbl 36 3 8 0 0 +set_max sp_tbl 36 3 255 +set_hdr sp_tbl 37 34 0 5227520 4 +set_w0 sp_tbl 37 29195 65535 +set_w1 sp_tbl 37 0 4294967040 +set_w2 sp_tbl 37 0 0 +set_fld sp_tbl 37 0 21 0 16 +set_bnd sp_tbl 37 0 8 0 0 +set_max sp_tbl 37 0 7 +set_fld sp_tbl 37 1 2 0 24 +set_bnd sp_tbl 37 1 8 0 0 +set_max sp_tbl 37 1 255 +set_fld sp_tbl 37 2 3 1 0 +set_bnd sp_tbl 37 2 8 0 0 +set_max sp_tbl 37 2 255 +set_fld sp_tbl 37 3 20 2 0 +set_bnd sp_tbl 37 3 32 0 0 +set_max sp_tbl 37 3 4294967295 +set_hdr sp_tbl 38 35 0 1034752 4 +set_w0 sp_tbl 38 29192 65535 +set_w1 sp_tbl 38 0 4294967040 +set_w2 sp_tbl 38 0 4294967288 +set_fld sp_tbl 38 0 1 0 16 +set_bnd sp_tbl 38 0 8 0 0 +set_max sp_tbl 38 0 255 +set_fld sp_tbl 38 1 2 0 24 +set_bnd sp_tbl 38 1 8 0 0 +set_max sp_tbl 38 1 255 +set_fld sp_tbl 38 2 3 1 0 +set_bnd sp_tbl 38 2 8 0 0 +set_max sp_tbl 38 2 255 +set_fld sp_tbl 38 3 21 2 0 +set_bnd sp_tbl 38 3 8 0 0 +set_max sp_tbl 38 3 7 +set_hdr sp_tbl 39 36 0 5227520 3 +set_w0 sp_tbl 39 29193 65535 +set_w1 sp_tbl 39 0 4294967040 +set_w2 sp_tbl 39 58720256 4294967295 +set_fld sp_tbl 39 0 1 0 16 +set_bnd sp_tbl 39 0 8 0 0 +set_max sp_tbl 39 0 255 +set_fld sp_tbl 39 1 2 0 24 +set_bnd sp_tbl 39 1 8 0 0 +set_max sp_tbl 39 1 255 +set_fld sp_tbl 39 2 3 1 0 +set_bnd sp_tbl 39 2 8 0 0 +set_max sp_tbl 39 2 255 +set_hdr sp_tbl 40 37 0 5227520 3 +set_w0 sp_tbl 40 29193 65535 +set_w1 sp_tbl 40 0 4294967040 +set_w2 sp_tbl 40 125829120 4294967295 +set_fld sp_tbl 40 0 1 0 16 +set_bnd sp_tbl 40 0 8 0 0 +set_max sp_tbl 40 0 255 +set_fld sp_tbl 40 1 2 0 24 +set_bnd sp_tbl 40 1 8 0 0 +set_max sp_tbl 40 1 255 +set_fld sp_tbl 40 2 3 1 0 +set_bnd sp_tbl 40 2 8 0 0 +set_max sp_tbl 40 2 255 +set_hdr sp_tbl 41 38 0 5235200 2 +set_w0 sp_tbl 41 29253 4278255615 +set_w1 sp_tbl 41 0 4294967040 +set_w2 sp_tbl 41 2102272 4294967295 +set_fld sp_tbl 41 0 1 0 16 +set_bnd sp_tbl 41 0 8 0 0 +set_max sp_tbl 41 0 255 +set_fld sp_tbl 41 1 2 1 0 +set_bnd sp_tbl 41 1 8 0 0 +set_max sp_tbl 41 1 255 +set_hdr sp_tbl 42 39 0 5120512 2 +set_w0 sp_tbl 42 29445 4278255615 +set_w1 sp_tbl 42 0 4294967040 +set_w2 sp_tbl 42 2158848 4294967295 +set_fld sp_tbl 42 0 1 0 16 +set_bnd sp_tbl 42 0 8 0 0 +set_max sp_tbl 42 0 255 +set_fld sp_tbl 42 1 2 1 0 +set_bnd sp_tbl 42 1 8 0 0 +set_max sp_tbl 42 1 255 +set_hdr sp_tbl 43 40 0 926720 2 +set_w0 sp_tbl 43 29448 4278255615 +set_w1 sp_tbl 43 0 4294967040 +set_w2 sp_tbl 43 4096 4294967295 +set_fld sp_tbl 43 0 1 0 16 +set_bnd sp_tbl 43 0 8 0 0 +set_max sp_tbl 43 0 255 +set_fld sp_tbl 43 1 2 1 0 +set_bnd sp_tbl 43 1 8 0 0 +set_max sp_tbl 43 1 255 +set_hdr sp_tbl 44 41 0 926720 2 +set_w0 sp_tbl 44 29448 4278255615 +set_w1 sp_tbl 44 0 4294967040 +set_w2 sp_tbl 44 5120 4294967295 +set_fld sp_tbl 44 0 1 0 16 +set_bnd sp_tbl 44 0 8 0 0 +set_max sp_tbl 44 0 255 +set_fld sp_tbl 44 1 2 1 0 +set_bnd sp_tbl 44 1 8 0 0 +set_max sp_tbl 44 1 255 end -fn c_init5 to void -set_hdr 45 42 0 926720 3 -set_w0 45 32649 65535 -set_w1 45 134225664 4229955583 -set_w2 45 917504 4294967295 -set_fld 45 0 1 0 16 -set_bnd 45 0 8 0 0 -set_max 45 0 255 -set_fld 45 1 2 0 24 -set_bnd 45 1 8 0 0 -set_max 45 1 255 -set_fld 45 2 16 1 21 -set_bnd 45 2 5 0 0 -set_max 45 2 31 -set_hdr 46 58 0 1042432 3 -set_w0 46 31108 65535 -set_w1 46 0 255 -set_w2 46 3072 4294967295 -set_fld 46 0 1 0 16 -set_bnd 46 0 8 0 0 -set_max 46 0 255 -set_fld 46 1 2 0 24 -set_bnd 46 1 8 0 0 -set_max 46 1 255 -set_fld 46 2 19 1 8 -set_bnd 46 2 24 0 0 -set_max 46 2 8388607 -set_hdr 47 43 0 1040896 3 -set_w0 47 31108 65535 -set_w1 47 0 4294967295 -set_w2 47 0 4294901760 -set_fld 47 0 1 0 16 -set_bnd 47 0 8 0 0 -set_max 47 0 255 -set_fld 47 1 2 0 24 -set_bnd 47 1 8 0 0 -set_max 47 1 255 -set_fld 47 2 11 2 0 -set_bnd 47 2 16 0 0 -set_max 47 2 65535 -set_hdr 48 44 0 1040896 3 -set_w0 48 29576 16777215 -set_w1 48 0 4294967040 -set_w2 48 0 4294901760 -set_fld 48 0 2 0 24 -set_bnd 48 0 8 0 0 -set_max 48 0 255 -set_fld 48 1 3 1 0 -set_bnd 48 1 8 0 0 -set_max 48 1 255 -set_fld 48 2 11 2 0 -set_bnd 48 2 16 0 0 -set_max 48 2 65535 -set_hdr 49 45 0 1042944 1 -set_w0 49 2381 4095 -set_w1 49 0 4294967295 -set_w2 49 58720256 4294967295 -set_fld 49 0 8 0 12 -set_bnd 49 0 4 0 0 -set_max 49 0 7 -set_hdr 50 46 0 1042944 2 -set_w0 50 2375 4095 -set_w1 50 0 3 -set_w2 50 58720256 4286578688 -set_fld 50 0 8 0 12 -set_bnd 50 0 4 0 0 -set_max 50 0 8 -set_fld 50 1 14 0 0 -set_bnd 50 1 32 1 18446744071562067968 -set_max 50 1 2147483647 -set_hdr 51 47 0 926720 2 -set_w0 51 29448 4278255615 -set_w1 51 0 4294967040 -set_w2 51 2048 4294967295 -set_fld 51 0 1 0 16 -set_bnd 51 0 8 0 0 -set_max 51 0 255 -set_fld 51 1 2 1 0 -set_bnd 51 1 8 0 0 -set_max 51 1 255 -set_hdr 52 48 0 1043456 0 -set_w0 52 31517 4294967295 -set_w1 52 0 4294967295 -set_w2 52 65536 4294967295 -set_hdr 53 49 0 927744 2 -set_w0 53 31108 65535 -set_w1 53 255 4294967295 -set_w2 53 134219776 4294967295 -set_fld 53 0 1 0 16 -set_bnd 53 0 8 0 0 -set_max 53 0 255 -set_fld 53 1 2 0 24 -set_bnd 53 1 8 0 0 -set_max 53 1 255 +fn c_init5 sp_tbl edit ulong 3001 to void +set_hdr sp_tbl 45 42 0 926720 3 +set_w0 sp_tbl 45 32649 65535 +set_w1 sp_tbl 45 134225664 4229955583 +set_w2 sp_tbl 45 917504 4294967295 +set_fld sp_tbl 45 0 1 0 16 +set_bnd sp_tbl 45 0 8 0 0 +set_max sp_tbl 45 0 255 +set_fld sp_tbl 45 1 2 0 24 +set_bnd sp_tbl 45 1 8 0 0 +set_max sp_tbl 45 1 255 +set_fld sp_tbl 45 2 16 1 21 +set_bnd sp_tbl 45 2 5 0 0 +set_max sp_tbl 45 2 31 +set_hdr sp_tbl 46 58 0 1042432 3 +set_w0 sp_tbl 46 31108 65535 +set_w1 sp_tbl 46 0 255 +set_w2 sp_tbl 46 3072 4294967295 +set_fld sp_tbl 46 0 1 0 16 +set_bnd sp_tbl 46 0 8 0 0 +set_max sp_tbl 46 0 255 +set_fld sp_tbl 46 1 2 0 24 +set_bnd sp_tbl 46 1 8 0 0 +set_max sp_tbl 46 1 255 +set_fld sp_tbl 46 2 19 1 8 +set_bnd sp_tbl 46 2 24 0 0 +set_max sp_tbl 46 2 8388607 +set_hdr sp_tbl 47 43 0 1040896 3 +set_w0 sp_tbl 47 31108 65535 +set_w1 sp_tbl 47 0 4294967295 +set_w2 sp_tbl 47 0 4294901760 +set_fld sp_tbl 47 0 1 0 16 +set_bnd sp_tbl 47 0 8 0 0 +set_max sp_tbl 47 0 255 +set_fld sp_tbl 47 1 2 0 24 +set_bnd sp_tbl 47 1 8 0 0 +set_max sp_tbl 47 1 255 +set_fld sp_tbl 47 2 11 2 0 +set_bnd sp_tbl 47 2 16 0 0 +set_max sp_tbl 47 2 65535 +set_hdr sp_tbl 48 44 0 1040896 3 +set_w0 sp_tbl 48 29576 16777215 +set_w1 sp_tbl 48 0 4294967040 +set_w2 sp_tbl 48 0 4294901760 +set_fld sp_tbl 48 0 2 0 24 +set_bnd sp_tbl 48 0 8 0 0 +set_max sp_tbl 48 0 255 +set_fld sp_tbl 48 1 3 1 0 +set_bnd sp_tbl 48 1 8 0 0 +set_max sp_tbl 48 1 255 +set_fld sp_tbl 48 2 11 2 0 +set_bnd sp_tbl 48 2 16 0 0 +set_max sp_tbl 48 2 65535 +set_hdr sp_tbl 49 45 0 1042944 1 +set_w0 sp_tbl 49 2381 4095 +set_w1 sp_tbl 49 0 4294967295 +set_w2 sp_tbl 49 58720256 4294967295 +set_fld sp_tbl 49 0 8 0 12 +set_bnd sp_tbl 49 0 4 0 0 +set_max sp_tbl 49 0 7 +set_hdr sp_tbl 50 46 0 1042944 2 +set_w0 sp_tbl 50 2375 4095 +set_w1 sp_tbl 50 0 3 +set_w2 sp_tbl 50 58720256 4286578688 +set_fld sp_tbl 50 0 8 0 12 +set_bnd sp_tbl 50 0 4 0 0 +set_max sp_tbl 50 0 8 +set_fld sp_tbl 50 1 14 0 0 +set_bnd sp_tbl 50 1 32 1 18446744071562067968 +set_max sp_tbl 50 1 2147483647 +set_hdr sp_tbl 51 47 0 926720 2 +set_w0 sp_tbl 51 29448 4278255615 +set_w1 sp_tbl 51 0 4294967040 +set_w2 sp_tbl 51 2048 4294967295 +set_fld sp_tbl 51 0 1 0 16 +set_bnd sp_tbl 51 0 8 0 0 +set_max sp_tbl 51 0 255 +set_fld sp_tbl 51 1 2 1 0 +set_bnd sp_tbl 51 1 8 0 0 +set_max sp_tbl 51 1 255 +set_hdr sp_tbl 52 48 0 1043456 0 +set_w0 sp_tbl 52 31517 4294967295 +set_w1 sp_tbl 52 0 4294967295 +set_w2 sp_tbl 52 65536 4294967295 +set_hdr sp_tbl 53 49 0 927744 2 +set_w0 sp_tbl 53 31108 65535 +set_w1 sp_tbl 53 255 4294967295 +set_w2 sp_tbl 53 134219776 4294967295 +set_fld sp_tbl 53 0 1 0 16 +set_bnd sp_tbl 53 0 8 0 0 +set_max sp_tbl 53 0 255 +set_fld sp_tbl 53 1 2 0 24 +set_bnd sp_tbl 53 1 8 0 0 +set_max sp_tbl 53 1 255 end -fn c_init6 to void -set_hdr 54 50 0 1040896 2 -set_w0 54 31112 16777215 -set_w1 54 0 4294967040 -set_w2 54 134220031 4294967295 -set_fld 54 0 2 0 24 -set_bnd 54 0 8 0 0 -set_max 54 0 255 -set_fld 54 1 3 1 0 -set_bnd 54 1 8 0 0 -set_max 54 1 255 -set_hdr 55 51 0 2083328 5 -set_w0 55 29202 65535 -set_w1 55 0 4294967040 -set_w2 55 126746624 4294901760 -set_fld 55 0 1 0 16 -set_bnd 55 0 8 0 0 -set_max 55 0 255 -set_fld 55 1 2 0 24 -set_bnd 55 1 8 0 0 -set_max 55 1 255 -set_fld 55 2 3 1 0 -set_bnd 55 2 8 0 0 -set_max 55 2 255 -set_fld 55 3 4 2 0 -set_bnd 55 3 8 0 0 -set_max 55 3 255 -set_fld 55 4 17 2 8 -set_bnd 55 4 8 0 0 -set_max 55 4 255 -set_hdr 56 52 0 2083328 4 -set_w0 56 29209 65535 -set_w1 56 0 4294967040 -set_w2 56 1536 4294967040 -set_fld 56 0 1 0 16 -set_bnd 56 0 8 0 0 -set_max 56 0 255 -set_fld 56 1 2 0 24 -set_bnd 56 1 8 0 0 -set_max 56 1 255 -set_fld 56 2 3 1 0 -set_bnd 56 2 8 0 0 -set_max 56 2 255 -set_fld 56 3 4 2 0 -set_bnd 56 3 8 0 0 -set_max 56 3 255 -set_hdr 57 53 0 2083328 4 -set_w0 57 29223 65535 -set_w1 57 0 4294967040 -set_w2 57 126746624 4294967040 -set_fld 57 0 1 0 16 -set_bnd 57 0 8 0 0 -set_max 57 0 255 -set_fld 57 1 2 0 24 -set_bnd 57 1 8 0 0 -set_max 57 1 255 -set_fld 57 2 3 1 0 -set_bnd 57 2 8 0 0 -set_max 57 2 255 -set_fld 57 3 4 2 0 -set_bnd 57 3 8 0 0 -set_max 57 3 255 -set_hdr 58 54 0 1040896 3 -set_w0 58 2373 4095 -set_w1 58 0 0 -set_w2 58 58720768 4294967295 -set_fld 58 0 8 0 12 -set_bnd 58 0 4 0 0 -set_max 58 0 8 -set_fld 58 1 12 0 16 -set_bnd 58 1 4 0 0 -set_max 58 1 15 -set_fld 58 2 13 1 0 -set_bnd 58 2 32 0 2 -set_max 58 2 2147483647 -set_hdr 59 55 0 1042944 2 -set_w0 59 2369 4095 -set_w1 59 0 4294967295 -set_w2 59 58720768 4294967295 -set_fld 59 0 8 0 12 -set_bnd 59 0 4 0 0 -set_max 59 0 8 -set_fld 59 1 12 0 16 -set_bnd 59 1 4 0 0 -set_max 59 1 15 -set_hdr 60 56 0 991744 4 -set_w0 60 31105 65535 -set_w1 60 0 0 -set_w2 60 203299584 4294967295 -set_fld 60 0 1 0 16 -set_bnd 60 0 8 0 0 -set_max 60 0 255 -set_fld 60 1 2 0 24 -set_bnd 60 1 8 0 0 -set_max 60 1 255 -set_fld 60 2 7 1 0 -set_bnd 60 2 8 0 0 -set_max 60 2 31 -set_fld 60 3 10 1 8 -set_bnd 60 3 24 1 18446744073701163008 -set_max 60 3 8388607 -set_hdr 61 57 0 991744 4 -set_w0 61 31105 65535 -set_w1 61 0 0 -set_w2 61 203300096 4294967295 -set_fld 61 0 1 0 16 -set_bnd 61 0 8 0 0 -set_max 61 0 255 -set_fld 61 1 2 0 24 -set_bnd 61 1 8 0 0 -set_max 61 1 255 -set_fld 61 2 7 1 0 -set_bnd 61 2 8 0 0 -set_max 61 2 31 -set_fld 61 3 10 1 8 -set_bnd 61 3 24 1 18446744073701163008 -set_max 61 3 8388607 -set_hdr 62 59 0 926720 2 -set_w0 62 29448 4278255615 -set_w1 62 0 4294967040 -set_w2 62 3072 4294967295 -set_fld 62 0 1 0 16 -set_bnd 62 0 8 0 0 -set_max 62 0 255 -set_fld 62 1 2 1 0 -set_bnd 62 1 8 0 0 -set_max 62 1 255 +fn c_init6 sp_tbl edit ulong 3001 to void +set_hdr sp_tbl 54 50 0 1040896 2 +set_w0 sp_tbl 54 31112 16777215 +set_w1 sp_tbl 54 0 4294967040 +set_w2 sp_tbl 54 134220031 4294967295 +set_fld sp_tbl 54 0 2 0 24 +set_bnd sp_tbl 54 0 8 0 0 +set_max sp_tbl 54 0 255 +set_fld sp_tbl 54 1 3 1 0 +set_bnd sp_tbl 54 1 8 0 0 +set_max sp_tbl 54 1 255 +set_hdr sp_tbl 55 51 0 2083328 5 +set_w0 sp_tbl 55 29202 65535 +set_w1 sp_tbl 55 0 4294967040 +set_w2 sp_tbl 55 126746624 4294901760 +set_fld sp_tbl 55 0 1 0 16 +set_bnd sp_tbl 55 0 8 0 0 +set_max sp_tbl 55 0 255 +set_fld sp_tbl 55 1 2 0 24 +set_bnd sp_tbl 55 1 8 0 0 +set_max sp_tbl 55 1 255 +set_fld sp_tbl 55 2 3 1 0 +set_bnd sp_tbl 55 2 8 0 0 +set_max sp_tbl 55 2 255 +set_fld sp_tbl 55 3 4 2 0 +set_bnd sp_tbl 55 3 8 0 0 +set_max sp_tbl 55 3 255 +set_fld sp_tbl 55 4 17 2 8 +set_bnd sp_tbl 55 4 8 0 0 +set_max sp_tbl 55 4 255 +set_hdr sp_tbl 56 52 0 2083328 4 +set_w0 sp_tbl 56 29209 65535 +set_w1 sp_tbl 56 0 4294967040 +set_w2 sp_tbl 56 1536 4294967040 +set_fld sp_tbl 56 0 1 0 16 +set_bnd sp_tbl 56 0 8 0 0 +set_max sp_tbl 56 0 255 +set_fld sp_tbl 56 1 2 0 24 +set_bnd sp_tbl 56 1 8 0 0 +set_max sp_tbl 56 1 255 +set_fld sp_tbl 56 2 3 1 0 +set_bnd sp_tbl 56 2 8 0 0 +set_max sp_tbl 56 2 255 +set_fld sp_tbl 56 3 4 2 0 +set_bnd sp_tbl 56 3 8 0 0 +set_max sp_tbl 56 3 255 +set_hdr sp_tbl 57 53 0 2083328 4 +set_w0 sp_tbl 57 29223 65535 +set_w1 sp_tbl 57 0 4294967040 +set_w2 sp_tbl 57 126746624 4294967040 +set_fld sp_tbl 57 0 1 0 16 +set_bnd sp_tbl 57 0 8 0 0 +set_max sp_tbl 57 0 255 +set_fld sp_tbl 57 1 2 0 24 +set_bnd sp_tbl 57 1 8 0 0 +set_max sp_tbl 57 1 255 +set_fld sp_tbl 57 2 3 1 0 +set_bnd sp_tbl 57 2 8 0 0 +set_max sp_tbl 57 2 255 +set_fld sp_tbl 57 3 4 2 0 +set_bnd sp_tbl 57 3 8 0 0 +set_max sp_tbl 57 3 255 +set_hdr sp_tbl 58 54 0 1040896 3 +set_w0 sp_tbl 58 2373 4095 +set_w1 sp_tbl 58 0 0 +set_w2 sp_tbl 58 58720768 4294967295 +set_fld sp_tbl 58 0 8 0 12 +set_bnd sp_tbl 58 0 4 0 0 +set_max sp_tbl 58 0 8 +set_fld sp_tbl 58 1 12 0 16 +set_bnd sp_tbl 58 1 4 0 0 +set_max sp_tbl 58 1 15 +set_fld sp_tbl 58 2 13 1 0 +set_bnd sp_tbl 58 2 32 0 2 +set_max sp_tbl 58 2 2147483647 +set_hdr sp_tbl 59 55 0 1042944 2 +set_w0 sp_tbl 59 2369 4095 +set_w1 sp_tbl 59 0 4294967295 +set_w2 sp_tbl 59 58720768 4294967295 +set_fld sp_tbl 59 0 8 0 12 +set_bnd sp_tbl 59 0 4 0 0 +set_max sp_tbl 59 0 8 +set_fld sp_tbl 59 1 12 0 16 +set_bnd sp_tbl 59 1 4 0 0 +set_max sp_tbl 59 1 15 +set_hdr sp_tbl 60 56 0 991744 4 +set_w0 sp_tbl 60 31105 65535 +set_w1 sp_tbl 60 0 0 +set_w2 sp_tbl 60 203299584 4294967295 +set_fld sp_tbl 60 0 1 0 16 +set_bnd sp_tbl 60 0 8 0 0 +set_max sp_tbl 60 0 255 +set_fld sp_tbl 60 1 2 0 24 +set_bnd sp_tbl 60 1 8 0 0 +set_max sp_tbl 60 1 255 +set_fld sp_tbl 60 2 7 1 0 +set_bnd sp_tbl 60 2 8 0 0 +set_max sp_tbl 60 2 31 +set_fld sp_tbl 60 3 10 1 8 +set_bnd sp_tbl 60 3 24 1 18446744073701163008 +set_max sp_tbl 60 3 8388607 +set_hdr sp_tbl 61 57 0 991744 4 +set_w0 sp_tbl 61 31105 65535 +set_w1 sp_tbl 61 0 0 +set_w2 sp_tbl 61 203300096 4294967295 +set_fld sp_tbl 61 0 1 0 16 +set_bnd sp_tbl 61 0 8 0 0 +set_max sp_tbl 61 0 255 +set_fld sp_tbl 61 1 2 0 24 +set_bnd sp_tbl 61 1 8 0 0 +set_max sp_tbl 61 1 255 +set_fld sp_tbl 61 2 7 1 0 +set_bnd sp_tbl 61 2 8 0 0 +set_max sp_tbl 61 2 31 +set_fld sp_tbl 61 3 10 1 8 +set_bnd sp_tbl 61 3 24 1 18446744073701163008 +set_max sp_tbl 61 3 8388607 +set_hdr sp_tbl 62 59 0 926720 2 +set_w0 sp_tbl 62 29448 4278255615 +set_w1 sp_tbl 62 0 4294967040 +set_w2 sp_tbl 62 3072 4294967295 +set_fld sp_tbl 62 0 1 0 16 +set_bnd sp_tbl 62 0 8 0 0 +set_max sp_tbl 62 0 255 +set_fld sp_tbl 62 1 2 1 0 +set_bnd sp_tbl 62 1 8 0 0 +set_max sp_tbl 62 1 255 end -fn sp_init to void -if ne get sp_ok 0 0 +fn sp_init sp_tbl edit ulong 3001 to void +if ne get sp_tbl 3000 0 ret end -c_init0 -c_init1 -c_init2 -c_init3 -c_init4 -c_init5 -c_init6 -put sp_ok 0 1 +c_init0 sp_tbl +c_init1 sp_tbl +c_init2 sp_tbl +c_init3 sp_tbl +c_init4 sp_tbl +c_init5 sp_tbl +c_init6 sp_tbl +put sp_tbl 3000 1 end -fn sp_find o view ulong 16 to ulong +fn sp_find sp_tbl view ulong 3001 o view ulong 16 to ulong op = get o 0 for i ulong 63 base = mul i 45 @@ -1005,7 +1005,7 @@ end ret not or lt val min_v lt max_v val end -fn sp_fput fbase ulong val ulong w edit ulong 4 to void +fn sp_fput sp_tbl view ulong 3001 fbase ulong val ulong w edit ulong 4 to void role = get sp_tbl fbase if eq role R_BRA rel = and sub val 1 4294967295 @@ -1050,7 +1050,7 @@ cur_w = get w word put w word or cur_w shl val_m shift end -fn sp_fenc fbase ulong o view ulong 16 w edit ulong 4 to ulong +fn sp_fenc sp_tbl view ulong 3001 fbase ulong o view ulong 16 w edit ulong 4 to ulong role = get sp_tbl fbase word = get sp_tbl add fbase 1 min_v = get sp_tbl add fbase 5 @@ -1060,10 +1060,10 @@ ok = sp_chkr role val min_v max_v if not ok ret E_RANGE end -sp_fput fbase val w +sp_fput sp_tbl fbase val w note Reject values whose special bit layout would discard semantic bits. probe = new ulong 16 0 -special = sp_dimm role fbase w probe +special = sp_dimm sp_tbl role fbase w probe if special if eq role R_FSET if eq val 0 @@ -1077,9 +1077,9 @@ end ret E_OK end -fn sp_enc o view ulong 16 w edit ulong 4 to ulong -sp_init -idx = sp_find o +fn sp_enc sp_tbl edit ulong 3001 o view ulong 16 w edit ulong 4 to ulong +sp_init sp_tbl +idx = sp_find sp_tbl o if eq idx 63 ret E_UNSUP end @@ -1096,7 +1096,7 @@ end nf = get sp_tbl add base 9 for f_i ulong nf fbase = add add base 10 mul f_i 7 -st = sp_fenc fbase o w +st = sp_fenc sp_tbl fbase o w if ne st E_OK ret st end @@ -1114,7 +1114,7 @@ end ret E_OK end -fn sp_dfnd w view ulong 4 to ulong +fn sp_dfnd sp_tbl view ulong 3001 w view ulong 4 to ulong for i ulong 63 base = mul i 45 w0_fix = get sp_tbl add base 2 @@ -1137,8 +1137,8 @@ end ret 63 end -fn sp_dimm role ulong fbase ulong w view ulong 4 o edit ulong 16 to bool -if eq role R_BRA +note Isolate branch extraction to keep the seeded function-mode register budget bounded. +fn sp_brad w view ulong 4 o edit ulong 16 to void low6 = and shr get w 0 18 63 hi = and shr get w 1 2 67108863 if or eq get w 2 58982399 ne and get w 1 2147483648 0 @@ -1148,6 +1148,11 @@ end end rel = or shl hi 6 low6 put o 6 and add rel 1 4294967295 +end + +fn sp_dimm sp_tbl view ulong 3001 role ulong fbase ulong w view ulong 4 o edit ulong 16 to bool +if eq role R_BRA +sp_brad w o ret true end if eq role R_BSSY @@ -1174,9 +1179,9 @@ end ret false end -fn sp_fdec fbase ulong w view ulong 4 o edit ulong 16 to void +fn sp_fdec sp_tbl view ulong 3001 fbase ulong w view ulong 4 o edit ulong 16 to void role = get sp_tbl fbase -is_imm = sp_dimm role fbase w o +is_imm = sp_dimm sp_tbl role fbase w o if is_imm ret end @@ -1245,9 +1250,9 @@ end put o 6 raw end -fn sp_dec w view ulong 4 o edit ulong 16 to ulong -sp_init -idx = sp_dfnd w +fn sp_dec sp_tbl edit ulong 3001 w view ulong 4 o edit ulong 16 to ulong +sp_init sp_tbl +idx = sp_dfnd sp_tbl w if eq idx 63 ret E_NOMAT end @@ -1260,101 +1265,9 @@ put o 7 get w 3 nf = get sp_tbl add base 9 for f_i ulong nf fbase = add add base 10 mul f_i 7 -sp_fdec fbase w o +sp_fdec sp_tbl fbase w o end ret E_OK end -fn main to int -sp_init -o = new ulong 16 0 -w = new ulong 4 0 -dec = new ulong 16 0 - -note Test 1: NOP encode and decode -for i ulong 16 -put o i 0 -end -st = sp_enc o w -if ne st 0 -ret 10 -end -if ne get w 0 31000 -ret 11 -end -dst = sp_dec w dec -if ne dst 0 -ret 12 -end -if ne get dec 0 0 -ret 13 -end - -note Test 2: IMAD encode and decode -for i ulong 16 -put o i 0 -end -put o 0 8 -put o 1 10 -put o 2 11 -put o 3 12 -put o 4 13 -put o 13 1 -st = sp_enc o w -if ne st 0 -ret 20 -end -dst = sp_dec w dec -if ne dst 0 -ret 21 -end -if ne get dec 0 8 -ret 22 -end -if ne get dec 1 10 -ret 23 -end -if ne get dec 2 11 -ret 24 -end -if ne get dec 3 12 -ret 25 -end -if ne get dec 4 13 -ret 26 -end - -note Test 3: Out-of-range register refusal (register 256) -for i ulong 16 -put o i 0 -end -put o 0 1 -put o 1 256 -st2 = sp_enc o w -if ne st2 E_RANGE -ret 30 -end - -note Test 4: Unsupported opcode refusal -for i ulong 16 -put o i 0 -end -put o 0 99 -st3 = sp_enc o w -if ne st3 E_UNSUP -ret 40 -end - -note Test 5: Refusal of unmatched bit pattern on decode -put w 0 4294967295 -put w 1 4294967295 -put w 2 4294967295 -put w 3 4294967295 -dst = sp_dec w dec -if ne dst E_NOMAT -ret 50 -end - -ret 0 -end diff --git a/om/encoder/bw_spec_test.om b/om/encoder/bw_spec_test.om new file mode 100644 index 00000000..25878b15 --- /dev/null +++ b/om/encoder/bw_spec_test.om @@ -0,0 +1,95 @@ +note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +note Standalone checks for bw_spec_sm121.om; the reusable module has no entrypoint. +fn main to int +sp_tbl = new ulong 3001 0 +sp_init sp_tbl +o = new ulong 16 0 +w = new ulong 4 0 +dec = new ulong 16 0 + +note Test 1: NOP encode and decode +for i ulong 16 +put o i 0 +end +st = sp_enc sp_tbl o w +if ne st 0 +ret 10 +end +if ne get w 0 31000 +ret 11 +end +dst = sp_dec sp_tbl w dec +if ne dst 0 +ret 12 +end +if ne get dec 0 0 +ret 13 +end + +note Test 2: IMAD encode and decode +for i ulong 16 +put o i 0 +end +put o 0 8 +put o 1 10 +put o 2 11 +put o 3 12 +put o 4 13 +put o 13 1 +st = sp_enc sp_tbl o w +if ne st 0 +ret 20 +end +dst = sp_dec sp_tbl w dec +if ne dst 0 +ret 21 +end +if ne get dec 0 8 +ret 22 +end +if ne get dec 1 10 +ret 23 +end +if ne get dec 2 11 +ret 24 +end +if ne get dec 3 12 +ret 25 +end +if ne get dec 4 13 +ret 26 +end + +note Test 3: Out-of-range register refusal (register 256) +for i ulong 16 +put o i 0 +end +put o 0 1 +put o 1 256 +st2 = sp_enc sp_tbl o w +if ne st2 E_RANGE +ret 30 +end + +note Test 4: Unsupported opcode refusal +for i ulong 16 +put o i 0 +end +put o 0 99 +st3 = sp_enc sp_tbl o w +if ne st3 E_UNSUP +ret 40 +end + +note Test 5: Refusal of unmatched bit pattern on decode +put w 0 4294967295 +put w 1 4294967295 +put w 2 4294967295 +put w 3 4294967295 +dst = sp_dec sp_tbl w dec +if ne dst E_NOMAT +ret 50 +end + +ret 0 +end diff --git a/tests/bw_encode_control_test.c b/tests/bw_encode_control_test.c index 46a67b11..a09c4b94 100644 --- a/tests/bw_encode_control_test.c +++ b/tests/bw_encode_control_test.c @@ -1,3 +1,20 @@ +#ifdef BW_SPEC_NATIVE_PROBE +#include "omega_native.h" +#include <stdio.h> +int main(void) { + for (uint64_t mode = 0; mode < 3; ++mode) { + uint64_t result = UINT64_MAX; + uint32_t status = omega_sp_native_probe(&result, mode); + if (status != 0 || result != mode) { + fprintf(stderr, "native spec probe mode %llu: status %u result %llu\n", + (unsigned long long)mode, status, (unsigned long long)result); + return 1; + } + } + puts("PASS: generated function binding, private state, semantic mutant=1, raw refusal=2"); + return 0; +} +#else /* * bw_encode_control_test: every opcode the encoder accepts must carry the control word the emitter scheduled * (BlackwellIRInsn.control: stall, yield, write / read scoreboards, wait mask) into the instruction's top word @@ -48,3 +65,5 @@ int main(void) { checked, refused, bad, bad ? "FAIL" : "PASS"); return bad ? 1 : 0; } + +#endif diff --git a/tools/test_bw_spec_encoder.sh b/tools/test_bw_spec_encoder.sh index 54c4f41a..df08eeff 100755 --- a/tools/test_bw_spec_encoder.sh +++ b/tools/test_bw_spec_encoder.sh @@ -50,9 +50,9 @@ ENC_OM="om/encoder/bw_enc_sm121.om" CORPUS_OM="om/encoder/bw_spec_corpus.om" CMP_OM="om/encoder/bw_spec_cmp.om" -# 1. Compile native om unit and run internal checks -log "1. Compiling and running native om/encoder/bw_spec_sm121.om..." -"$OMC" < "$SPEC_OM" > "$WORK/native_test" 2> "$WORK/native_test.err" || { +# 1. Compose the pure specification with its separate executable test driver +log "1. Compiling and running standalone specification assertions..." +cat "$SPEC_OM" om/encoder/bw_spec_test.om | "$OMC" > "$WORK/native_test" 2> "$WORK/native_test.err" || { cat "$WORK/native_test.err" >&2 exit 1 } @@ -69,15 +69,13 @@ log "2. Building temporary reference runner for bw_enc_sm121.om..." log "3. Parsing authoritative specification from bw_spec_sm121.om..." log "Parsed 63 instruction forms from single specification." -sed '/^fn main to int/,$d' "$SPEC_OM" > "$WORK/spec_nomain.om" - -cat "$WORK/spec_nomain.om" "$CORPUS_OM" | "$OMC" > "$WORK/corpus" 2> "$WORK/corpus.err" || { +cat "$SPEC_OM" "$CORPUS_OM" | "$OMC" > "$WORK/corpus" 2> "$WORK/corpus.err" || { cat "$WORK/corpus.err" >&2 exit 1 } chmod 755 "$WORK/corpus" -cat "$ENC_OM" "$WORK/spec_nomain.om" "$CMP_OM" | "$OMC" > "$WORK/cmp" 2> "$WORK/cmp.err" || { +cat "$ENC_OM" "$SPEC_OM" "$CMP_OM" | "$OMC" > "$WORK/cmp" 2> "$WORK/cmp.err" || { cat "$WORK/cmp.err" >&2 exit 1 } @@ -194,7 +192,7 @@ log "PASS: corrupted expected byte fails byte-identity comparison (exit 1)" # Audit controls: build failures are never treated as semantic mutant kills. sed '/^fn main to int/,$d' "$CMP_OM" > "$WORK/cmp_nomain.om" -cat "$ENC_OM" "$WORK/spec_nomain.om" "$WORK/cmp_nomain.om" om/encoder/bw_spec_regress.om > "$WORK/regress.om" +cat "$ENC_OM" "$SPEC_OM" "$WORK/cmp_nomain.om" om/encoder/bw_spec_regress.om > "$WORK/regress.om" "$OMC" < "$WORK/regress.om" > "$WORK/regress" 2> "$WORK/regress.err" || { cat "$WORK/regress.err" >&2 exit 1 @@ -227,4 +225,23 @@ else fi log "PASS: audit raw ranges, absent RZ parity, cold decode, active-operand mutant, read error and truncated records" +# 8. Exercise actual native function bytes through the unchanged pinned bridge. +BRIDGE=${OMEGA_BRIDGE:-"$ROOT/../omega-bridge"} +NATIVE_PIN=c77a5922f91d53d4a0bbd4e7b1c4703f7098263abc843be2918db1ece7496782 +[ -f "$BRIDGE/src/native.om" ] || { echo "NOT_RUN: set OMEGA_BRIDGE to pinned bridge" >&2; exit 3; } +[ "$(sha256sum < "$BRIDGE/src/native.om" | cut -c1-64)" = "$NATIVE_PIN" ] || { + echo "FAIL: native bridge source pin mismatch" >&2; exit 1; +} +cat "$ENC_OM" "$SPEC_OM" om/encoder/bw_spec_native.om > "$WORK/function.om" +"$OMC" < "$WORK/function.om" > "$WORK/function.bin" +magic=$(od -An -tx1 -N4 "$WORK/function.bin" | tr -d ' \n') +[ "$magic" != 7f454c46 ] || { echo "FAIL: native unit is an ELF executable" >&2; exit 1; } +"$OMC" < "$BRIDGE/src/native.om" > "$WORK/native-gen" +chmod 755 "$WORK/native-gen" +{ cat "$WORK/function.om"; printf '\0'; printf '%08d' "$(wc -c < "$WORK/function.bin")"; cat "$WORK/function.bin"; } > "$WORK/native.in" +"$WORK/native-gen" c < "$WORK/native.in" > "$WORK/omega_native.c" +"$WORK/native-gen" h < "$WORK/native.in" > "$WORK/omega_native.h" +${CC:-cc} -std=gnu11 -O2 -Wall -Wextra -Werror -DBW_SPEC_NATIVE_PROBE -I"$WORK" \ + -include "$WORK/omega_native.h" tests/bw_encode_control_test.c "$WORK/omega_native.c" -o "$WORK/native-probe" +"$WORK/native-probe" log "ALL SPEC-DRIVEN ENCODER/DECODER VERIFICATIONS PASSED (HOST_TESTED)!"