general propose registers(r9 - r15)
Hello my friends
I have a question about general propose registers; Please help me. How I can write into r9,r10,r11, r12,13,r14,15 registers using embedded assembly in C. I wrote some code but when I want to compile the code I get “bad register name “ error . Please help me . thank you. |
Are you compiling 32 bit code that doesn't have those registers (even when run on a 64 bit CPU) or are you compiling 64 bit code?
If you are compiling 64 bit, post the code that didn't work as well as the version of compiler you are using. Then we might have a chance to help you. But in embedded assembly, it generally is not a good idea to force the choice of register. It is usually better to use registers generically and let the compiler select the specific registers. Why do you want to force the register choice? |
HI , thank u my friend
i tried to compile code in 32bit mode. how i can use these registers. is there any solution to this problem. i want to save six four bytes operands in a place that don't change any program this place and after some time i wnat to restore these operands. what's your idea about this. if it's posible for u please give me some assembly code to write in Specified virtual address. |
Quote:
Quote:
Quote:
Those registers are not usable. You will need somewhere else. I don't know enough about the constraints on what you are trying (the meaning of "don't change any program this place") to even think about what might fit your needs. |
Tanx my friend
I’m using a software like hypervisor ; but this environment is not a fully featured hypervisor. An OS is running on this software; Same time I’m running a program in guest kernel . I want this program save six (four bytes ) operands in somewhere that cant any other programs change these operands. After this I want to context switch to underline running software and read these operands. I allocated some pages in guest kernel , how I can save these operands in this page using assembly code. |
All times are GMT -5. The time now is 06:30 AM. |