Stack sizes – Creating Our Own FibersStack sizes – Creating Our Own Fibers
Note The actual addresses you get will be different every time you run the program. In other words, the values 240, 205, 252, 56, 67, 86, 0, 0 represent the
Note The actual addresses you get will be different every time you run the program. In other words, the values 240, 205, 252, 56, 67, 86, 0, 0 represent the
Tip As we end the program in an endless loop, you’ll have to exit by pressing Ctrl + C. OK, so what happened? We didn’t call the function hello at
Options The last thing we need to introduce to get a minimal understanding of Rust’s inline assembly for now is the options keyword. After the input and output parameters, you’ll
We’ll use the body of our gt_switch function as a starting point by going through everything step by step. If you haven’t used inline assembly before, this might look foreign,
Now, this is where it gets a little difficult. On the x86-64 instruction set, there is no way for us to manipulate rip directly, so we have to use a
Note We will use the Intel dialect in our examples. Assembly has strong backward compatibility guarantees. That’s why you will see that the same registers are addressed in different ways.
The x86-64 ISA defines 16 general-purpose registers. These are registers the CPU provides for programmers to use for whatever they see fit. Note that programmers here include the ones that