Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,11 @@ file(GLOB KVLANG_RUNTIME_SRC CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/src/*.c")
set(KVLANG_GEN_SRC "${CMAKE_SOURCE_DIR}/src/rwir_special_gen.c")
set(KVLANG_COERCE_SRC "${CMAKE_SOURCE_DIR}/src/rwir_coerce.c")
set(KVLANG_DECODE_SRC "${CMAKE_SOURCE_DIR}/src/rwir_decode.c")
set(KVLANG_ISA_SIG_SRC "${CMAKE_SOURCE_DIR}/src/isa_sig.c")
set(KVLANG_SLOTVIEW_SRC "${CMAKE_SOURCE_DIR}/src/xvaluebodyview.c")
list(REMOVE_ITEM KVLANG_RUNTIME_SRC "${KVLANG_GEN_SRC}" "${KVLANG_COERCE_SRC}"
"${KVLANG_DECODE_SRC}" "${KVLANG_ISA_SIG_SRC}"
"${KVLANG_SLOTVIEW_SRC}")
"${KVLANG_DECODE_SRC}" "${KVLANG_SLOTVIEW_SRC}")
list(APPEND KVLANG_RUNTIME_SRC "${KVLANG_DECODE_SRC}" "${KVLANG_GEN_SRC}"
"${KVLANG_COERCE_SRC}" "${KVLANG_ISA_SIG_SRC}"
"${KVLANG_SLOTVIEW_SRC}")
"${KVLANG_COERCE_SRC}" "${KVLANG_SLOTVIEW_SRC}")
add_library(kvlang_runtime SHARED ${KVLANG_RUNTIME_SRC})
target_include_directories(kvlang_runtime PUBLIC include src)
target_compile_definitions(kvlang_runtime PRIVATE _GNU_SOURCE)
Expand Down Expand Up @@ -139,6 +136,10 @@ if(NOT APPLE)
if(PYTHON3_EXE)
add_test(NAME isa_conformance
COMMAND "${WITH_C_RUNTIME}" "${PYTHON3_EXE}" "${CMAKE_SOURCE_DIR}/tests/isa_conformance.py")
add_test(NAME myrwircap_ids
COMMAND "${PYTHON3_EXE}" "${CMAKE_SOURCE_DIR}/tests/myrwircap_ids.py")
add_test(NAME myrwircap_ids_selftest
COMMAND "${PYTHON3_EXE}" "${CMAKE_SOURCE_DIR}/tests/myrwircap_ids.py" --selftest)
endif()
add_test(NAME specialize_gate COMMAND "${WITH_C_RUNTIME}" bash "${CMAKE_SOURCE_DIR}/tests/specialize_gate.sh")
set_tests_properties(getmember_siblings kvset_invalid_head_shm pc_kvspace_source_shm crash_resume_shm param_address_shm delegate_shm scalar_wire pc_part_write_shm ro_rewrite_shm
Expand Down
15 changes: 4 additions & 11 deletions runtime/src/func_code.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,10 @@ static kvlangCodeRow_t *row_load(kvspace_t *kv, kvlangFuncCode_t *code, int s0,
}
row->handler_id =
row->opcode_id >= 0 ? row->opcode_id : kvlangRwirRouteId();
/* P1b3 typed_core:manifest core 具体项 = 签名列 BIN/CMP/UN(156 项)。
* 装载期一次固化,执行期不查 manifest。 */
if (row->opcode_id >= 0) {
uint32_t nsig = 0;
const kvlangIsaSig *sg = kvlangIsaSigs(&nsig);
if ((uint32_t)row->opcode_id < nsig) {
uint8_t k = sg[row->opcode_id].sig;
row->typed_core =
k == KV_ISA_BIN || k == KV_ISA_CMP || k == KV_ISA_UN;
}
}
/* typed_core:能力表里声明了定长结果类型的行(156 项),与派发同源。 */
if (row->opcode_id >= 0)
row->typed_core =
kvlangRwirCaps()[row->opcode_id].result_kind != NULL;
/* T-120 A:typed 行操作数 langtype 由 opcode 前缀承载(`int64·add`),
* 装载期解析一次;cell->type 在 typed 行上通常为空。 */
row->view_pack = 0;
Expand Down
327 changes: 0 additions & 327 deletions runtime/src/isa_sig.c

This file was deleted.

28 changes: 0 additions & 28 deletions runtime/src/runtime_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -1073,34 +1073,6 @@ typedef struct {
uint32_t result_width;
} kvlangRwirCap;

/* P1b1 ISA 签名列:与 myrwircaps 同序、逐项一行(see workspace P1 spec §1.3/§2.1)。
* rp/wp 类型由 sig 规则 + opcode 生成,不在发布器里另列 opcode 清单。 */
enum { KV_ISA_CORE = 0, KV_ISA_EXT = 1 };
enum {
KV_ISA_ANY = 0, /* 槽类型全 any(arity 显式;dynamic 时末读参 any...) */
KV_ISA_BIN, /* <kind>·op:rp=kind×2,wp=kind */
KV_ISA_CMP, /* <kind>·op:rp=kind×2,wp=bool */
KV_ISA_UN, /* <kind>·op:rp=kind,wp=kind */
KV_ISA_CAST, /* rp=any,wp=opcode kind */
};
enum {
KV_EFF_PURE = 1,
KV_EFF_READ = 2,
KV_EFF_WRITE = 4,
KV_EFF_CONTROL = 8,
KV_EFF_IO = 16,
KV_EFF_DEBUG = 32,
};
typedef struct {
uint8_t cls;
uint8_t sig;
uint8_t nr;
uint8_t nw;
uint8_t dynamic;
uint8_t effects;
} kvlangIsaSig;
__attribute__((visibility("hidden"))) const kvlangIsaSig *kvlangIsaSigs(uint32_t *n_out);

__attribute__((visibility("hidden"))) const kvlangRwirCap *kvlangRwirCaps(void);
__attribute__((visibility("hidden"))) int kvlangRwirRouteId(void);
__attribute__((visibility("hidden"))) int kvlangKvcpuRoute(kvlangFrame_t *f);
Expand Down
Loading
Loading