Commit 802a0058 by Michael Meissner

Fix problems in float/int conversion in inline functions

From-SVN: r12122
parent 18496203
...@@ -21,6 +21,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ...@@ -21,6 +21,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "rs6000/sysv4le.h" #include "rs6000/sysv4le.h"
/* Default ABI to use */
#undef RS6000_ABI_NAME
#define RS6000_ABI_NAME "solaris"
#undef CPP_PREDEFINES #undef CPP_PREDEFINES
#define CPP_PREDEFINES \ #define CPP_PREDEFINES \
"-Dsun=1 -Dunix -D__svr4__ -DSVR4 -DPPC \ "-Dsun=1 -Dunix -D__svr4__ -DSVR4 -DPPC \
...@@ -82,6 +86,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ...@@ -82,6 +86,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
#if 0
#undef ASM_OUTPUT_ALIGNED_LOCAL #undef ASM_OUTPUT_ALIGNED_LOCAL
#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
do { \ do { \
...@@ -89,7 +94,7 @@ do { \ ...@@ -89,7 +94,7 @@ do { \
assemble_name ((FILE), (NAME)); \ assemble_name ((FILE), (NAME)); \
fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \ fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
} while (0) } while (0)
#endif
/* Like block addresses, stabs line numbers are relative to the /* Like block addresses, stabs line numbers are relative to the
current function. */ current function. */
......
...@@ -795,17 +795,22 @@ do { \ ...@@ -795,17 +795,22 @@ do { \
fputs (_name, FILE); \ fputs (_name, FILE); \
} while (0) } while (0)
#if 0
/* The Solaris 2.51 linker has a bug in that it doesn't properly
resolve references from the .init and .fini sections. So fall
back to the old way of handling constructors and destructors. */
#undef ASM_OUTPUT_CONSTRUCTOR #undef ASM_OUTPUT_CONSTRUCTOR
#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
do { \ do { \
if (DEFAULT_ABI != ABI_SOLARIS) \
{ \
ctors_section (); \
fprintf (FILE, "\t%s\t ", INT_ASM_OP); \
assemble_name (FILE, NAME); \
} \
else \
{ \
init_section (); \ init_section (); \
fputs ("\tbl ", FILE); \ fputs ("\tbl ", FILE); \
assemble_name (FILE, NAME); \ assemble_name (FILE, NAME); \
fputs ((flag_pic) ? "@plt\n" : "\n", FILE); \ } \
fputs ("\n", FILE); \
} while (0) } while (0)
/* A C statement (sans semicolon) to output an element in the table of /* A C statement (sans semicolon) to output an element in the table of
...@@ -813,12 +818,20 @@ do { \ ...@@ -813,12 +818,20 @@ do { \
#undef ASM_OUTPUT_DESTRUCTOR #undef ASM_OUTPUT_DESTRUCTOR
#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
do { \ do { \
if (DEFAULT_ABI != ABI_SOLARIS) \
{ \
dtors_section (); \
fprintf (FILE, "\t%s\t ", INT_ASM_OP); \
assemble_name (FILE, NAME); \
} \
else \
{ \
fini_section (); \ fini_section (); \
fputs ("\tbl ", FILE); \ fputs ("\tbl ", FILE); \
assemble_name (FILE, NAME); \ assemble_name (FILE, NAME); \
fputs ((flag_pic) ? "@plt\n" : "\n", FILE); \ } \
fputs ("\n", FILE); \
} while (0) } while (0)
#endif
/* But, to make this work, we have to output the stabs for the function /* But, to make this work, we have to output the stabs for the function
name *first*... */ name *first*... */
...@@ -836,7 +849,7 @@ do { \ ...@@ -836,7 +849,7 @@ do { \
/* Pass various options to the assembler */ /* Pass various options to the assembler */
#undef ASM_SPEC #undef ASM_SPEC
#define ASM_SPEC "-u %(asm_cpu) %{mregnames} \ #define ASM_SPEC "%(asm_cpu) %{mregnames} \
%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \ %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \
%{mrelocatable} %{mrelocatable-lib} \ %{mrelocatable} %{mrelocatable-lib} \
%{memb} %{!memb: %{msdata: -memb} %{msdata=eabi: -memb}} \ %{memb} %{!memb: %{msdata: -memb} %{msdata=eabi: -memb}} \
...@@ -856,6 +869,7 @@ do { \ ...@@ -856,6 +869,7 @@ do { \
%{mno-sdata: -msdata=none } \ %{mno-sdata: -msdata=none } \
%{meabi: %{!mcall-*: -mcall-sysv }} \ %{meabi: %{!mcall-*: -mcall-sysv }} \
%{!meabi: %{!mno-eabi: \ %{!meabi: %{!mno-eabi: \
%{mrelocatable: -meabi } \
%{mcall-solaris: -mno-eabi } \ %{mcall-solaris: -mno-eabi } \
%{mcall-linux: -mno-eabi }}}" %{mcall-linux: -mno-eabi }}}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment