Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
8ac20578
Commit
8ac20578
authored
Oct 04, 1993
by
James Van Artsdalen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(ASM_OUTPUT_DOUBLE,ASM_OUTPUT_FLOAT): Use REAL_VALUE_ macros.
(ASM_OUTPUT_LONG_DOUBLE): New macro. From-SVN: r5575
parent
4a37b939
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
27 deletions
+62
-27
gcc/config/i386/osfrose.h
+32
-22
gcc/config/i386/sysv4.h
+30
-5
No files found.
gcc/config/i386/osfrose.h
View file @
8ac20578
...
...
@@ -756,47 +756,57 @@ while (0)
Use "word" pseudos to avoid printing NaNs, infinity, etc. */
/* This is how to output an assembler line defining a `double' constant. */
#undef ASM_OUTPUT_DOUBLE
#ifndef CROSS_COMPILE
#define ASM_OUTPUT_DOUBLE(STREAM, VALUE) \
do \
{ \
long value_long[2]; \
char dstr[30]; \
REAL_VALUE_TO_TARGET_DOUBLE (VALUE, value_long); \
\
fprintf (STREAM, "\t.long\t0x%08lx\t\t# %.20g\n\t.long\t0x%08lx\n", \
value_long[0], VALUE, value_long[1]); \
REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \
if (sizeof (int) == sizeof (long)) \
fprintf (STREAM, "\t.long\t0x%08x\t\t# %s\n\t.long\t0x%08x\n", \
value_long[0], dstr, value_long[1]); \
else \
fprintf (STREAM, "\t.long\t0x%08lx\t\t# %s\n\t.long\t0x%08lx\n", \
value_long[0], dstr, value_long[1]); \
} \
while (0)
#else
#define ASM_OUTPUT_DOUBLE(STREAM, VALUE) \
fprintf (STREAM, "\t.double\t%.20g\n", VALUE)
#endif
/* This is how to output an assembler line defining a `float' constant. */
#undef ASM_OUTPUT_FLOAT
#ifndef CROSS_COMPILE
#define ASM_OUTPUT_FLOAT(STREAM, VALUE) \
do \
{ \
long value_long; \
char dstr[30]; \
REAL_VALUE_TO_TARGET_SINGLE (VALUE, value_long); \
\
fprintf (STREAM, "\t.long\t0x%08lx\t\t# %.12g (float)\n", \
value_long, VALUE); \
REAL_VALUE_TO_DECIMAL (VALUE, "%.12g", dstr); \
if (sizeof (int) == sizeof (long)) \
fprintf (STREAM, "\t.long\t0x%08x\t\t# %s (float)\n", \
value_long, dstr); \
else \
fprintf (STREAM, "\t.long\t0x%08lx\t\t# %s (float)\n", \
value_long, dstr); \
} \
while (0)
#else
#define ASM_OUTPUT_FLOAT(STREAM, VALUE) \
fprintf (STREAM, "\t.float\t%.12g\n", VALUE)
#endif
/* This is how to output an assembler line for a `long double' constant. */
#undef ASM_OUTPUT_LONG_DOUBLE
#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
do { long l[3]; \
char dstr[30]; \
REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \
REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \
if (sizeof (int) == sizeof (long)) \
fprintf (FILE, \
"\t.long\t0x%08x\t\t# %s\n\t.long\t0x%08x\n\t.long\t0x%08x\n", \
l[0], dstr, l[1], l[2]); \
else \
fprintf (FILE, \
"\t.long\t0x%08lx\t\t# %s\n\t.long\t0x%08lx\n\t.long\t0x%08lx\n", \
l[0], dstr, l[1], l[2]); \
} while (0)
/* Generate calls to memcpy, etc., not bcopy, etc. */
#define TARGET_MEM_FUNCTIONS
...
...
gcc/config/i386/sysv4.h
View file @
8ac20578
...
...
@@ -39,9 +39,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define CPP_PREDEFINES \
"-Di386 -Dunix -D__svr4__ -Asystem(unix) -Asystem(svr4) -Acpu(i386) -Amachine(i386)"
/* If the host and target formats match, output the floats as hex. */
#if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
#if defined (HOST_WORDS_BIG_ENDIAN) == WORDS_BIG_ENDIAN
/* This is how to output assembly code to define a `float' constant.
We always have to use a .long pseudo-op to do this because the native
SVR4 ELF assembler is buggy and it generates incorrect values when we
...
...
@@ -51,7 +48,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
do { long value; \
REAL_VALUE_TO_TARGET_SINGLE ((VALUE), value); \
if (sizeof (int) == sizeof (long)) \
fprintf((FILE), "%s\t0x%x\n", ASM_LONG, value); \
else \
fprintf((FILE), "%s\t0x%lx\n", ASM_LONG, value); \
} while (0)
/* This is how to output assembly code to define a `double' constant.
...
...
@@ -63,11 +63,36 @@ do { long value; \
#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
do { long value[2]; \
REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), value); \
if (sizeof (int) == sizeof (long)) \
{ \
fprintf((FILE), "%s\t0x%x\n", ASM_LONG, value[0]); \
fprintf((FILE), "%s\t0x%x\n", ASM_LONG, value[1]); \
} \
else \
{ \
fprintf((FILE), "%s\t0x%lx\n", ASM_LONG, value[0]); \
fprintf((FILE), "%s\t0x%lx\n", ASM_LONG, value[1]); \
} \
} while (0)
#undef ASM_OUTPUT_LONG_DOUBLE
#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
do { long value[3]; \
REAL_VALUE_TO_TARGET_LONG_DOUBLE ((VALUE), value); \
if (sizeof (int) == sizeof (long)) \
{ \
fprintf((FILE), "%s\t0x%x\n", ASM_LONG, value[0]); \
fprintf((FILE), "%s\t0x%x\n", ASM_LONG, value[1]); \
fprintf((FILE), "%s\t0x%x\n", ASM_LONG, value[2]); \
} \
else \
{ \
fprintf((FILE), "%s\t0x%lx\n", ASM_LONG, value[0]); \
fprintf((FILE), "%s\t0x%lx\n", ASM_LONG, value[1]); \
fprintf((FILE), "%s\t0x%lx\n", ASM_LONG, value[2]); \
} \
} while (0)
#endif
/* word order matches */
#endif
/* HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT */
/* Output at beginning of assembler file. */
/* The .file command should always begin the output. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment