From a87935509535b933cf3f5f703f65daafcc8adc5c Mon Sep 17 00:00:00 2001 From: Test_User Date: Wed, 15 Feb 2023 22:01:03 -0500 Subject: Make conditional stuff work nicely --- cpu/instructions/overview.txt | 69 +++++++++++-------------------------------- 1 file changed, 18 insertions(+), 51 deletions(-) (limited to 'cpu/instructions/overview.txt') diff --git a/cpu/instructions/overview.txt b/cpu/instructions/overview.txt index 1c945fb..205f382 100644 --- a/cpu/instructions/overview.txt +++ b/cpu/instructions/overview.txt @@ -9,63 +9,30 @@ Dynamic VLIW If multiple exceptions would have theoretically occurred, which one is triggered is undefined If outputs from multiple instructions overlap: - Conditional instructions will be preferred above all others + Flag saving will always take priority + Conditional instructions will be preferred above all other instructions Indirect writes, such as `jmp` and `push`, will be preferred over direct writes If a conflict still remains, which value will be written to the overlapping area is undefined If an exception would be generated by attempting to write one value there but not the other, the exception might not occur if the other value is what is written - Current format ideas: - A) - effects: - uses space efficiently when using many repetitions of the same opcodes - allows reuse of immediate references - easier for the CPU to parse - - requires all parameter lengths to be the same within the opcode - wastes space when few repetitions of the same opcode exists and immediate references are rarely reused - - format: - num_opcodes - for each: - opcode - num_parameters - for each: - value - size_of_immediate_references - for each: - value - - B) - effects: - allows variable length parameters - - harder for the CPU to parse - - format: - size_of_queue - for each instruction: - opcode - parameters - immediate references - - C) - effects: - allows variable length parameters - allows reuse of immediate references - - harder for the CPU to parse - larger if immediate references are not reused - - format: - size_of_instructions - for each instruction: - opcode - parameters - size_of_immediate_references - for each: - value + Format: + size_of_instructions + for each: + opcode + num_parameters + for each: + value + size_of_immediate_references + for each: + value + size_of_flag_save_definitions + for each: + instruction index in queue + which flags to save + where to save them + bitwise offset in the destination A minimum of instructions must be accepted by all CPUs TODO: define n -- cgit v1.2.3