Browse Source

* fixed get_caller_addr returning the wrong segment in i8086 medium memory model

git-svn-id: trunk@25859 -
nickysn 11 years ago
parent
commit
7489bfb56b
1 changed files with 2 additions and 3 deletions
  1. 2 3
      rtl/i8086/i8086.inc

+ 2 - 3
rtl/i8086/i8086.inc

@@ -132,12 +132,11 @@ asm
   mov ax, ss:[si + 4 + extra_param_offset + extra_param_offset]  // framebp
   or ax, ax
   jz @@Lg_a_null
-  xchg ax, bx
-  mov bx, [bx+2]
+  xchg ax, bx  // 1 byte shorter than a mov
+  mov ax, [bx+2]
 {$ifdef FPC_X86_CODE_FAR}
   mov dx, [bx+4]
 {$endif FPC_X86_CODE_FAR}
-  xchg ax, bx
 @@Lg_a_null:
 end;