From d3b4ec5b691e0bcd23e4233c9db0173a30b535a9 Mon Sep 17 00:00:00 2001 From: spsandwichman <73349893+spsandwichman@users.noreply.github.com> Date: Tue, 27 Jun 2023 12:43:12 -0400 Subject: [PATCH 1/2] calling convention + get rid of stupid tabs --- arch/quickref.md | 14 +++++++------- handbook/branch.txt | 30 +++++++++++++++--------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/arch/quickref.md b/arch/quickref.md index 92ef407..7e5f735 100644 --- a/arch/quickref.md +++ b/arch/quickref.md @@ -3,17 +3,17 @@ Registers - 64 bits wide rz always reads zero, writes are ignored - ra general purpose - rb general purpose - rc general purpose - rd general purpose + ra general purpose (function parameters) + rb general purpose (function parameters) + rc general purpose (function parameters) + rd general purpose (function parameters) re general purpose rf general purpose rg general purpose rh general purpose - ri general purpose - rj general purpose - rk general purpose + ri general purpose (callee saved) + rj general purpose (callee saved) + rk general purpose (callee saved) pc program counter - points to current instruction in memory sp stack pointer - stack grows down fp frame pointer diff --git a/handbook/branch.txt b/handbook/branch.txt index 1a479ab..1590502 100644 --- a/handbook/branch.txt +++ b/handbook/branch.txt @@ -1,17 +1,17 @@ -instruction func description +instruction func description bra 0 0000 true -beq 1 0001 equal -bez 2 0010 zero -blt 3 0011 less than -ble 4 0100 less than or equal to -bltu 5 0101 less than (unsigned) -bleu 6 0110 less than or equal to (unsigned) -bpe 7 0111 parity bit enabled (odd) -bne 9 1001 not equal -bnz A 1010 not zero -bge B 1011 greater than or equal to -bgt C 1100 greater than -bgeu D 1101 greater than or equal to (unsigned) -bgtu E 1110 greater than (unsigned) -bpd F 1111 parity bit disabled (even) \ No newline at end of file +beq 1 0001 equal +bez 2 0010 zero +blt 3 0011 less than +ble 4 0100 less than or equal to +bltu 5 0101 less than (unsigned) +bleu 6 0110 less than or equal to (unsigned) +bpe 7 0111 parity bit enabled (odd) +bne 9 1001 not equal +bnz A 1010 not zero +bge B 1011 greater than or equal to +bgt C 1100 greater than +bgeu D 1101 greater than or equal to (unsigned) +bgtu E 1110 greater than (unsigned) +bpd F 1111 parity bit disabled (even) \ No newline at end of file From 8976755060b636e1dba03e93eb4620e9dde61163 Mon Sep 17 00:00:00 2001 From: spsandwichman <73349893+spsandwichman@users.noreply.github.com> Date: Tue, 27 Jun 2023 16:11:04 -0400 Subject: [PATCH 2/2] newline --- handbook/registers.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handbook/registers.txt b/handbook/registers.txt index 474464f..36d714b 100644 --- a/handbook/registers.txt +++ b/handbook/registers.txt @@ -9,4 +9,5 @@ D sp stack pointer E fp frame pointer F st status register, contains bit flags and information about the processor state -note - fp and st are initialized to 0 and that the stack expands downward. in order to use the stack, you must relocate the stack somewhere specific. \ No newline at end of file +note - fp and st are initialized to 0 and that the stack expands downward. +in order to use the stack, you must relocate the stack somewhere specific. \ No newline at end of file