File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ lets the VM assume it worked.
164164| Rust | 464 |
165165| Zig | 186 |
166166| C | 103 |
167- | Assembly | 23 |
167+ | Assembly | 22 |
168168
169169This one starts to get interesting since it requires parsing the instruction
170170input. Since the assembly version knows exactly where to find everything, it can
Original file line number Diff line number Diff line change 1- .text
21 .globl entrypoint
32entrypoint:
43 ldxdw r2, [r1 + 0 ] # get number of accounts
@@ -8,14 +7,13 @@ entrypoint:
87 ldxdw r2, [r1 + 8 + 8 + 32 + 32] # get source lamports
98 ldxdw r3, [r1 + 8 + 8 + 32 + 32 + 8] # get account data size
109 mov64 r4, r1
11- add64 r4, 8 + 8 + 32 + 32 + 8 + 8 + 10240 # calculate end of account data
10+ add64 r4, 8 + 8 + 32 + 32 + 8 + 8 + 10240 + 8 # calculate end of account data
1211 add64 r4, r3
1312 mov64 r5, r4 # check how much padding we need to add
1413 and64 r5, 7 # clear high bits
1514 jeq r5, 0 , 1 # no low bits set, jump ahead
1615 add64 r4, 8 # add 8 for truncation if needed
1716 and64 r4, -8 # clear low bits
18- add64 r4, 8 # rent epoch
1917 ldxb r5, [r4 + 0 ] # get second account
2018 jne r5, 0xff , error # we don't allow duplicates
2119 ldxdw r5, [r4 + 8 + 32 + 32] # get destination lamports
You can’t perform that action at this time.
0 commit comments