Browse Source

* updated the CSeg, DSeg and SSeg rtl functions on i8086 to use the new x86
intrinsics for reading the segment registers

git-svn-id: trunk@39434 -

nickysn 7 years ago
parent
commit
a8f466c400
1 changed files with 9 additions and 9 deletions
  1. 9 9
      rtl/i8086/i8086.inc

+ 9 - 9
rtl/i8086/i8086.inc

@@ -518,21 +518,21 @@ asm
 end;
 
 {$define FPC_SYSTEM_HAS_CSEG}
-function CSeg: Word;{$ifdef SYSTEMINLINE}inline;{$endif}assembler;nostackframe;
-asm
-  mov ax, cs
+function CSeg: Word;{$ifdef SYSTEMINLINE}inline;{$endif}
+begin
+  CSeg:=fpc_x86_get_cs;
 end;
 
 {$define FPC_SYSTEM_HAS_DSEG}
-function DSeg: Word;{$ifdef SYSTEMINLINE}inline;{$endif}assembler;nostackframe;
-asm
-  mov ax, ds
+function DSeg: Word;{$ifdef SYSTEMINLINE}inline;{$endif}
+begin
+  DSeg:=fpc_x86_get_ds;
 end;
 
 {$define FPC_SYSTEM_HAS_SSEG}
-function SSeg: Word;{$ifdef SYSTEMINLINE}inline;{$endif}assembler;nostackframe;
-asm
-  mov ax, ss
+function SSeg: Word;{$ifdef SYSTEMINLINE}inline;{$endif}
+begin
+  SSeg:=fpc_x86_get_ss;
 end;
 
 {$IFNDEF INTERNAL_BACKTRACE}