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
dbe9742d
Commit
dbe9742d
authored
Jun 02, 1992
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r1138
parent
d58c9875
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
12 deletions
+47
-12
gcc/config/mips/mips.c
+40
-0
gcc/config/mips/mips.h
+7
-12
No files found.
gcc/config/mips/mips.c
View file @
dbe9742d
...
@@ -3047,6 +3047,7 @@ mips_debugger_offset (addr, offset)
...
@@ -3047,6 +3047,7 @@ mips_debugger_offset (addr, offset)
return
offset
;
return
offset
;
}
}
/* A C compound statement to output to stdio stream STREAM the
/* A C compound statement to output to stdio stream STREAM the
assembler syntax for an instruction operand X. X is an RTL
assembler syntax for an instruction operand X. X is an RTL
...
@@ -3664,6 +3665,45 @@ mips_declare_object (stream, name, init_string, final_string, size)
...
@@ -3664,6 +3665,45 @@ mips_declare_object (stream, name, init_string, final_string, size)
}
}
/* Output a double precision value to the assembler. If both the
host and target are IEEE, emit the values in hex. */
void
mips_output_double
(
stream
,
value
)
FILE
*
stream
;
REAL_VALUE_TYPE
value
;
{
#ifdef REAL_VALUE_TO_TARGET_DOUBLE
long
value_long
[
2
];
REAL_VALUE_TO_TARGET_DOUBLE
(
value
,
value_long
);
fprintf
(
stream
,
"
\t
.word
\t
0x%08lx
\t\t
# %.20g
\n\t
.word
\t
0x%08lx
\n
"
,
value_long
[
0
],
value
,
value_long
[
1
]);
#else
fprintf
(
stream
,
"
\t
.double
\t
%.20g
\n
"
,
value
);
#endif
}
/* Output a single precision value to the assembler. If both the
host and target are IEEE, emit the values in hex. */
void
mips_output_float
(
stream
,
value
)
FILE
*
stream
;
REAL_VALUE_TYPE
value
;
{
#ifdef REAL_VALUE_TO_TARGET_SINGLE
long
value_long
;
REAL_VALUE_TO_TARGET_SINGLE
(
value
,
value_long
);
fprintf
(
stream
,
"
\t
.word
\t
0x%08lx
\t\t
# %.12g (float)
\n
"
,
value_long
,
value
);
#else
fprintf
(
stream
,
"
\t
.float
\t
%.12g
\n
"
,
value
);
#endif
}
/* Return the bytes needed to compute the frame pointer from the current
/* Return the bytes needed to compute the frame pointer from the current
stack pointer.
stack pointer.
...
...
gcc/config/mips/mips.h
View file @
dbe9742d
...
@@ -147,7 +147,9 @@ extern int mips_epilogue_delay_slots ();
...
@@ -147,7 +147,9 @@ extern int mips_epilogue_delay_slots ();
extern
char
*
mips_fill_delay_slot
();
extern
char
*
mips_fill_delay_slot
();
extern
char
*
mips_move_1word
();
extern
char
*
mips_move_1word
();
extern
char
*
mips_move_2words
();
extern
char
*
mips_move_2words
();
extern
void
mips_output_double
();
extern
int
mips_output_external
();
extern
int
mips_output_external
();
extern
void
mips_output_float
();
extern
void
mips_output_filename
();
extern
void
mips_output_filename
();
extern
void
mips_output_lineno
();
extern
void
mips_output_lineno
();
extern
char
*
output_block_move
();
extern
char
*
output_block_move
();
...
@@ -426,7 +428,7 @@ while (0)
...
@@ -426,7 +428,7 @@ while (0)
/* Print subsidiary information on the compiler version in use. */
/* Print subsidiary information on the compiler version in use. */
#define MIPS_VERSION "[AL 1.1, MM 1
8
]"
#define MIPS_VERSION "[AL 1.1, MM 1
9
]"
#ifndef MACHINE_TYPE
#ifndef MACHINE_TYPE
#define MACHINE_TYPE "BSD Mips"
#define MACHINE_TYPE "BSD Mips"
...
@@ -3006,21 +3008,14 @@ while (0)
...
@@ -3006,21 +3008,14 @@ while (0)
/* This is how to output an assembler line defining a `double' constant. */
/* This is how to output an assembler line defining a `double' constant. */
#define ASM_OUTPUT_DOUBLE(STREAM,VALUE) \
#define ASM_OUTPUT_DOUBLE(STREAM,VALUE) \
{ \
mips_output_double (STREAM, VALUE)
union { double d; long l[2]; } u2; \
u2.d = VALUE; \
fprintf (STREAM, "\t.word\t0x%08lx\t\t# %.20g\n\t.word\t0x%08lx\n", \
u2.l[0], u2.d, u2.l[1]); \
}
/* This is how to output an assembler line defining a `float' constant. */
/* This is how to output an assembler line defining a `float' constant. */
#define ASM_OUTPUT_FLOAT(STREAM,VALUE) \
#define ASM_OUTPUT_FLOAT(STREAM,VALUE) \
{ \
mips_output_float (STREAM, VALUE)
union { float f; long l; } u2; \
u2.f = VALUE; \
fprintf (STREAM, "\t.word\t0x%08lx\t\t# %.12g\n", u2.l, u2.f); \
}
/* This is how to output an assembler line defining an `int' constant. */
/* This is how to output an assembler line defining an `int' constant. */
...
...
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