diff options
author | Flavian Kaufmann <flavian@flaviankaufmann.ch> | 2024-05-12 21:27:41 +0200 |
---|---|---|
committer | Flavian Kaufmann <flavian@flaviankaufmann.ch> | 2024-05-12 21:27:41 +0200 |
commit | deb7d0a6fc76d5250c238d479cf97d4755abef01 (patch) | |
tree | 395c266ff4757e83e151d1286d6d2388e63d9a9c /prog | |
parent | 008059fbe4e960a10bb4c444013129e0aaa02818 (diff) | |
download | riscv_cpu-deb7d0a6fc76d5250c238d479cf97d4755abef01.tar.gz riscv_cpu-deb7d0a6fc76d5250c238d479cf97d4755abef01.zip |
refactoring
Diffstat (limited to 'prog')
-rw-r--r-- | prog/src/prog.s | 58 |
1 files changed, 3 insertions, 55 deletions
diff --git a/prog/src/prog.s b/prog/src/prog.s index 4187c8a..8f23632 100644 --- a/prog/src/prog.s +++ b/prog/src/prog.s @@ -3,66 +3,14 @@ _start: - # testing alu -/* - addi t0, zero, 5 - addi t1, zero, 3 - - #add t2, t0, t1 - #sub t2, t0, t1 - - xor t2, t0, t1 - or t2, t0, t1 - and t2, t0, t1 - - slt t2, t0, t1 - slt t2, t1, t0 - - addi t0, zero, -1 - - slt t2, t0, t1 - slt t2, t1, t0 - - sltu t2, t0, t1 - sltu t2, t1, t0 - - addi t0, zero, 1 - - sll t2, t0, 31 - sra t2, t2, 31 - sll t2, t0, 31 - srl t2, t2, 31 -*/ - - -# jal target -# addi t0, zero, 2 -#0010 0000 - -# addi t0, zero, 0x0010 -# slli t0, t0, 16 -# ori t0, t0, 0x0000 - -# addi t1, zero, 0xff -# sw t1, 0(t0) -# lw t2, 0(t0) - - addi t0, zero, 1 - addi t1, zero, 2 - bge t0, t1, branch_taken - addi t2, zero, 1 + addi t0, zero, 3 + addi t1, zero, 5 + add t2, t0, t1 halt_loop: j halt_loop -branch_taken: - addi t2, zero, 2 - j halt_loop - -#target: -# addi t0, zero, 1 -# jalr zero, ra, 0 .section .data |