Daily Archive for March 1st, 2009

WireOS scheme #09

This scheme is a solution to this problem with sizes. Especially when doing mov [ptr1],[ptr2]. This is solved by treating size field of second operand as amount of bytes copied (1, 2, 4, or 8 bytes), and using size field of first operand as constant size specifier for both operands (there is a mistake on scheme, we’re using first operand as “memptr1_size”, and second as “opsize”)

This way you can only copy two values pointed by same size pointers (64-bit to 64-bit, 32-bit to 32-bit, although you can use 64-bit and 32-bit pointer if they dont have high bits).