diff options
Diffstat (limited to '')
-rw-r--r-- | šola/ars/kol1.txt | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/šola/ars/kol1.txt b/šola/ars/kol1.txt new file mode 100644 index 0000000..8d10834 --- /dev/null +++ b/šola/ars/kol1.txt @@ -0,0 +1,51 @@ +registri: x0 zero 0 + x1 ra return address + x2 sp stack pointer + x5-7 t0-2 temporary + x8-9 fp/s0-1 saved + x10-17 a0-7 argument + x18-27 s2-11 saved + x28-31 t3-6 temporary + +psevdoinštrukcije: + + delta = symbol - pc + la rd, sym auipc rd, delta[31:12]+delta[11]; addi rd, rd, delta[11:0] + lla rd, sym TODO + l[bhwd] rd, sym auipc rd, delta[31:12]+delta[11]; l[bhwd] rd, delta[11:0](rd) + s[bhwd] rd, sym, rt auipc rt, delta[31:12]+delta[11]; s[bhws] rd, delta[11:0](rt) + + nop addi x0, x0, 0 + mv rd, rs addi rd, rs, 0 + not rd, rs xori rd, rs, -1 + neg rd, rs sub rd, x0, rs + + bgt[u] rs, rt, off blt[u] rt, rs, off + ble[u] rs, rt, off bge[u] rt, rs, off + + j off jal x0, off + jal off jal x1, off + jr rs jalr x0, 0(rs) + jalr rs jalr x1, 0(rs) + ret jalr x0, 0(x1) + call of auipc x1, of[31:12]+of[11]; jalr x1, of[11:0](x1) + tail of auipc x6, of[31:12]+of[11]; jalr x0, of[11:0](x6) + +float: (-1)^s*2^(E-e)*1,M_1 M_2 M_3 M_4...M_n + exp e man + single 32 8 127 23 + double 64 11 1023 52 + + inf: E=255/2047, m=0 + nan: E=255/2047, m!=0 + računamo z več biti: varovalni, zaokroževalni, lepljivi + +.data, .text, .byte, .half, .word, .dword, .align + +a*10 = a*(8+2) = a*8+a*2 + +rabimo ceil(log_base(1/error)) decimalk + +Dostop do visokih naslovov: %hi(A) -- top 20b, %lo(A) low 12b + +TODO: slide 3b množenje floatov, chapter 2.4 intager computation |