From 1ffa25152f18588b381fa9260f437f07d9a04003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Mon, 15 Apr 2024 10:33:24 +0200 Subject: =?UTF-8?q?=C5=A1ola?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\305\241ola/ars/kol1.txt" | 51 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 "\305\241ola/ars/kol1.txt" (limited to 'šola/ars') diff --git "a/\305\241ola/ars/kol1.txt" "b/\305\241ola/ars/kol1.txt" new file mode 100644 index 0000000..8d10834 --- /dev/null +++ "b/\305\241ola/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 -- cgit v1.2.3