diff options
-rw-r--r-- | TODO | 7 | ||||
-rw-r--r-- | src/util.h | 12 |
2 files changed, 9 insertions, 10 deletions
@@ -1,10 +1,7 @@ Find out why ubuntu compiles are failing. Find work around. -See if it is better to tell gcc that call16 clobbers all registers -instead of having the code call pushal/popal. - -The __call16 code does a long jump to the interrupt handlers - this is -unnecessary. +The __call16 code does a long jump to the interrupt trampolines - this +is unnecessary. Fix makefiles so that they rebuild the required files automatically. @@ -65,16 +65,18 @@ static inline void call16(struct bregs *callregs) { asm volatile( - "pushfl\n" // Save flags - "pushal\n" // Save registers + "pushl %%ebp\n" // Save state + "pushfl\n" #ifdef MODE16 "calll __call16\n" #else "calll __call16_from32\n" #endif - "popal\n" - "popfl\n" - : : "a" (callregs), "m" (*callregs)); + "popfl\n" // Restore state + "popl %%ebp\n" + : "=a" (callregs), "=m" (*callregs) + : "a" (callregs), "m" (*callregs) + : "ebx", "ecx", "edx", "esi", "edi"); } static inline |