1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
|