Mail Archives: djgpp-workers/1999/05/03/05:12:46
On Mon, 3 May 1999, I wrote:
> cmpw %cs:___djgpp_ds_alias,32(%ebp) <<<< new line
> je stack_ok <<<< new line
Sorry, this won't even assemble (blush). Also, leaving the DS alias in
SS is a bad idea, since the alias selector is freed by our exit code, so
if the signal handler exits, it will bomb right after freeing the alias.
Here's a solution that seems to work. It forces the normal DS selector
into SS if it finds SS holding the DS alias. Comments?
*** src/libc/go32/exceptn.S~ Mon May 3 11:04:26 1999
--- src/libc/go32exceptn.S Mon May 3 11:38:28 1999
***************
*** 127,132 ****
--- 127,138 ----
je 1f
cmpw %ax,32(%ebp)
je stack_ok
+ .byte 0x2e /* CS: */
+ movw ___djgpp_ds_alias,%di
+ cmpw %di,32(%ebp)
+ jne 1f
+ movw %ax,32(%ebp)
+ jmp stack_ok
1: movl $exception_stack+8000, 28(%ebp)
movw %ax, 32(%ebp)
stack_ok:
- Raw text -