bit of line wrapping
This commit is contained in:
@ -23,27 +23,28 @@ There are four virtual objects that are accessible (we can access their variable
|
||||
- Frame (local and tmp variables)
|
||||
- NewMessage ( to build the next message sent)
|
||||
|
||||
These are pretty much the first four registers. When the code goes from virtual to register, we use register instructions
|
||||
to replace virtual ones.
|
||||
These are pretty much the first four registers. When the code goes from virtual to register,
|
||||
we use register instructions to replace virtual ones.
|
||||
|
||||
Eg: A Virtual::Set can move data around inside those objects. And since in Arm this can not be done in one instruciton,
|
||||
we use two, one to move to an unused register and then into the destination. And then we need some fiddling of bits
|
||||
to shift the type info.
|
||||
Eg: A Virtual::Set can move data around inside those objects.
|
||||
And since in Arm this can not be done in one instruction, we use two, one to move to an unused register
|
||||
and then into the destination. And then we need some fiddling of bits to shift the type info.
|
||||
|
||||
Another simple example is a Call. A simple case of a Class function call resolves the class object, and with the
|
||||
method name the function to be found at compile-time. And so this results in a Register::Call, which is an Arm
|
||||
instruction.
|
||||
Another simple example is a Call. A simple case of a Class function call resolves the class object,
|
||||
and with the method name the function to be found at compile-time.
|
||||
And so this results in a Register::Call, which is an Arm instruction.
|
||||
|
||||
A C call
|
||||
---------
|
||||
|
||||
Ok, there are no c calls. But syscalls are very similar. This is not at all as simple as the nice Class call described
|
||||
above.
|
||||
Ok, there are no c calls. But syscalls are very similar.
|
||||
This is not at all as simple as the nice Class call described above.
|
||||
|
||||
For syscall in Arm (linux) you have to load registers 0-x (depending on call), load R7 with the syscall number and then
|
||||
issue the software interupt instruction. If you get back something back, it's in R0.
|
||||
For syscall in Arm (linux) you have to load registers 0-x (depending on call), load R7 with the
|
||||
syscall number and then issue the software interupt instruction.
|
||||
If you get back something back, it's in R0.
|
||||
|
||||
In short, lots of shuffling. And to make it fit with our four object architecture, we need the Message to hold the data
|
||||
for the call and Sys (module) to be self. And then the actual functions do the shuffle, saving the data and restoring it.
|
||||
In short, lots of shuffling. And to make it fit with our four object architecture,
|
||||
we need the Message to hold the data for the call and Sys (module) to be self.
|
||||
And then the actual functions do the shuffle, saving the data and restoring it.
|
||||
And setting type information according to kernel documentation (as there is no runtime info)
|
||||
|
Reference in New Issue
Block a user