瀏覽代碼

* some inconsistency regarding FPC_NONE usage fixed

git-svn-id: trunk@43770 -
florian 5 年之前
父節點
當前提交
e332c17bbd
共有 2 個文件被更改,包括 31 次插入21 次删除
  1. 8 2
      rtl/arm/thumb.inc
  2. 23 19
      rtl/inc/systemh.inc

+ 8 - 2
rtl/arm/thumb.inc

@@ -18,14 +18,18 @@
 {$define FPC_SYSTEM_HAS_SYSINITFPU}
 Procedure SysInitFPU;{$ifdef SYSTEMINLINE}inline;{$endif}
 begin
-  softfloat_exception_mask:=[float_flag_underflow,float_flag_inexact,float_flag_denormal];
-  softfloat_exception_flags:=[];
+{$ifndef FPUNONE}
+    softfloat_exception_mask:=[float_flag_underflow,float_flag_inexact,float_flag_denormal];
+    softfloat_exception_flags:=[];
+{$endif FPUNONE}
 end;
 
 
 procedure fpc_cpuinit;
 begin
+{$ifndef FPUNONE}
   SysInitFPU;
+{$endif FPUNONE}
 end;
 
 
@@ -37,7 +41,9 @@ end;
 {$define FPC_SYSTEM_HAS_SYSRESETFPU}
 Procedure SysResetFPU;{$ifdef SYSTEMINLINE}inline;{$endif}
 begin
+{$ifndef FPUNONE}
   softfloat_exception_flags:=[];
+{$endif FPUNONE}
 end;
 
 

+ 23 - 19
rtl/inc/systemh.inc

@@ -254,12 +254,12 @@ Type
 {$ifdef CPUSPARC}
   {$define DEFAULT_DOUBLE}
 
-  {$define SUPPORT_SINGLE}
-  {$define SUPPORT_DOUBLE}
-
   {$define FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
 
   {$ifndef FPUNONE}
+    {$define SUPPORT_SINGLE}
+    {$define SUPPORT_DOUBLE}
+
     ValReal = Double;
   {$endif}
 
@@ -273,10 +273,10 @@ Type
 {$ifdef CPUSPARC64}
   {$define DEFAULT_DOUBLE}
 
-  {$define SUPPORT_SINGLE}
-  {$define SUPPORT_DOUBLE}
-
   {$ifndef FPUNONE}
+    {$define SUPPORT_SINGLE}
+    {$define SUPPORT_DOUBLE}
+
     ValReal = Double;
   {$endif}
 
@@ -290,13 +290,14 @@ Type
 {$if defined(CPUMIPS32) or defined(CPUMIPSEL32)}
   {$define DEFAULT_DOUBLE}
 
-  {$define SUPPORT_SINGLE}
-  {$define SUPPORT_DOUBLE}
-
   {$define FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
 
   {$ifndef FPUNONE}
+    {$define SUPPORT_SINGLE}
+    {$define SUPPORT_DOUBLE}
+
     {$define FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE}
+
     ValReal = Double;
   {$endif}
 
@@ -311,14 +312,15 @@ Type
 {$ifdef CPUARM}
   {$define DEFAULT_DOUBLE}
 
-  {$define SUPPORT_SINGLE}
-  {$define SUPPORT_DOUBLE}
-
   {$define FPC_INCLUDE_SOFTWARE_MOD_DIV}
   {$define FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
-  {$define FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE}
 
   {$ifndef FPUNONE}
+    {$define SUPPORT_SINGLE}
+    {$define SUPPORT_DOUBLE}
+
+    {$define FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE}
+
     ValReal = Real;
   {$endif}
 
@@ -370,16 +372,17 @@ Type
 {$ifdef CPURISCV32}
   {$define DEFAULT_DOUBLE}
 
-  {$define SUPPORT_SINGLE}
-  {$define SUPPORT_DOUBLE}
-
   {$define FPC_INCLUDE_SOFTWARE_MOD_DIV}
   {$define FPC_INCLUDE_SOFTWARE_MUL}
   {$define FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
   {$define FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE}
 
   {$ifndef FPUNONE}
+    {$define SUPPORT_SINGLE}
+    {$define SUPPORT_DOUBLE}
+
     {$define FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE}
+
     ValReal = Double;
   {$endif}
 
@@ -393,15 +396,16 @@ Type
 {$ifdef CPURISCV64}
   {$define DEFAULT_DOUBLE}
 
-  {$define SUPPORT_SINGLE}
-  {$define SUPPORT_DOUBLE}
-
   {$define FPC_INCLUDE_SOFTWARE_MOD_DIV}
   {$define FPC_INCLUDE_SOFTWARE_MUL}
   {$define FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE}
 
   {$ifndef FPUNONE}
+    {$define SUPPORT_SINGLE}
+    {$define SUPPORT_DOUBLE}
+
     {$define FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE}
+
     ValReal = Double;
   {$endif}