From 854e2e67ce0fc778443da955a8d1179406a9b845 Mon Sep 17 00:00:00 2001 From: Folkert van Heusden Date: Fri, 4 Apr 2025 20:45:45 +0200 Subject: [PATCH] more tests --- PDP11/test.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/PDP11/test.c b/PDP11/test.c index e43f0939..f33294ed 100644 --- a/PDP11/test.c +++ b/PDP11/test.c @@ -312,6 +312,107 @@ void emit_add_sub_c() dump_json(filename, out); } +void emit_cmp() +{ + printf("CMP instructions\n"); + const char *const filename = "pdp1170-valtest-CMP.json"; + if (file_exist(filename)) + return; + int id = 0; + json_t *out = json_array(); + int count = 0; + int total = n_test_values * n_test_values * 2 * 2; + time_t start = time(NULL); + for(int group=0; group<2; group++) { + uint16_t instr = 0; + int word = group & 1; + + if (group == 0 || group == 1) + instr = (2 << 12 /* instr */) | (word << 15 /* CMPb/CMPw */) | (1 << 6 /* src=R1 */); + + for(int v1=0; v1