I have a little problem with gcc and it's aggresive optimizations "-O3".
I have an "idt" variable that I set up with the appropiate offset and limit of my idt table and then pass it's address to lidt like this:
Code: Select all
asm volatile ("lidt (%0)" : : "r"(&idt));
I can workaround the problem using a "noinline" load_idt() function but that's not very elegant.
I thought GCC was aware of the stuff I do with "extended asm" but it doesn't seem to be.
Any suggestions?
Thanks!!