TRAP test
This commit is contained in:
parent
640643cb65
commit
7d68b74113
1 changed files with 59 additions and 33 deletions
32
PDP11/test.c
32
PDP11/test.c
|
@ -467,9 +467,7 @@ void emit_misc_operations()
|
|||
printf("misc instructions\n");
|
||||
|
||||
const char *const filename = "pdp1170-valtest-MISC.json";
|
||||
if (file_exist(filename))
|
||||
return;
|
||||
|
||||
if (file_exist(filename) == 0) {
|
||||
int id = 0;
|
||||
json_t *out = json_array();
|
||||
|
||||
|
@ -513,6 +511,34 @@ void emit_misc_operations()
|
|||
}
|
||||
|
||||
dump_json(filename, out);
|
||||
}
|
||||
|
||||
// TRAP
|
||||
const char *const filename2 = "pdp1170-valtest-MISC2.json";
|
||||
if (file_exist(filename2) == 0) {
|
||||
int id = 0;
|
||||
json_t *out = json_array();
|
||||
|
||||
uint16_t instr = 0104420; // TRAP #020
|
||||
|
||||
init_simh();
|
||||
|
||||
saved_PC = 0100;
|
||||
randomize_registers_all_values();
|
||||
init_stack_registers();
|
||||
|
||||
struct mem_t mem[1] = {
|
||||
{ 0100, instr }
|
||||
};
|
||||
|
||||
PSW = 012;
|
||||
|
||||
json_t *obj = generate_test(instr, &id, mem, 1);
|
||||
if (obj)
|
||||
json_array_append_new(out, obj);
|
||||
|
||||
dump_json(filename2, out);
|
||||
}
|
||||
}
|
||||
|
||||
void produce_validation_tests()
|
||||
|
|
Loading…
Add table
Reference in a new issue