Re: rom_i2c funcs?
Posted: Wed Sep 08, 2021 11:52 am
I will try to interpret the function prologue.
So this saves a few registers, we still don't know what registers (parameters) are used. More to come
Assembler Syntax
S32I at, as, 0..1020
Description S32I is a 32-bit store from address register at to memory. It forms a virtual address by adding the contents of address register as and an 8-bit zero-extended constant value encoded in the instruction word shifted left by two. Therefore, the offset can specify mul- tiples of four from zero to 1020. The data to be stored is taken from the contents of ad- dress register at and written to memory at the physical address.
Code: Select all
40007968: e0c112 addi a1, a1, -32 ; make 32 bytes of space on the stack (a1)
4000796b: 0139 s32i.n a3, a1, 0 ; move a3 to 0(a1), i.e. save the contents of a3 on the stack
4000796d: 1109 s32i.n a0, a1, 4 ; move a0 to 4(a1), i.e. save the contents of a0 on the stack
4000796f: 31d9 s32i.n a13, a1, 12 ; move a13 to 12(a1), same way
40007971: 21c9 s32i.n a12, a1, 8 ; move a12 to 8(a1), same way
40007973: 41e9 s32i.n a14, a1, 16 ; move a14 to 16(a1), same way
So this saves a few registers, we still don't know what registers (parameters) are used. More to come