Browse Source

* the Ptr(sel,ofs) parameters changed from longint to word on i8086

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

+ 2 - 2
rtl/i8086/i8086.inc

@@ -25,11 +25,11 @@ asm
 end;
 end;
 
 
 {$define FPC_SYSTEM_HAS_PTR}
 {$define FPC_SYSTEM_HAS_PTR}
-function Ptr(sel,off: LongInt):farpointer;{$ifdef SYSTEMINLINE}inline;{$endif}assembler;nostackframe;
+function Ptr(sel,off: Word):farpointer;{$ifdef SYSTEMINLINE}inline;{$endif}assembler;nostackframe;
 asm
 asm
   mov si, sp
   mov si, sp
   mov ax, ss:[si + 2 + extra_param_offset]  // off
   mov ax, ss:[si + 2 + extra_param_offset]  // off
-  mov dx, ss:[si + 6 + extra_param_offset]  // sel
+  mov dx, ss:[si + 4 + extra_param_offset]  // sel
 end;
 end;
 
 
 {$define FPC_SYSTEM_HAS_CSEG}
 {$define FPC_SYSTEM_HAS_CSEG}

+ 1 - 1
rtl/inc/systemh.inc

@@ -1029,7 +1029,7 @@ function PopCnt(Const AValue : QWord): QWord;[internproc:fpc_in_popcnt_x];
                          Addr/Pointer Handling
                          Addr/Pointer Handling
 ****************************************************************************}
 ****************************************************************************}
 
 
-Function  ptr(sel,off:Longint):farpointer;[internconst:fpc_in_const_ptr];{$ifdef SYSTEMINLINE}inline;{$endif}
+Function  ptr(sel,off:{$ifdef CPU16}Word{$else}Longint{$endif}):farpointer;[internconst:fpc_in_const_ptr];{$ifdef SYSTEMINLINE}inline;{$endif}
 Function  Cseg:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
 Function  Cseg:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
 Function  Dseg:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
 Function  Dseg:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
 Function  Sseg:Word;{$ifdef SYSTEMINLINE}inline;{$endif}
 Function  Sseg:Word;{$ifdef SYSTEMINLINE}inline;{$endif}