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
1eb9bc80
Commit
1eb9bc80
authored
33 years ago
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial revision
From-SVN: r358
parent
230d793d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
0 deletions
+72
-0
gcc/config/i386/mach.h
+72
-0
No files found.
gcc/config/i386/mach.h
0 → 100644
View file @
1eb9bc80
/* Configuration for an i386 running Mach as the target machine. */
#include "i386gas.h"
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dunix -Di386 -DMACH"
/* Specify extra dir to search for include files. */
#define SYSTEM_INCLUDE_DIR "/usr/mach/include"
/* Defines to be able to build libgcc.a with GCC. */
#define perform_udivsi3(a,b) \
{ \
register int dx asm("dx"); \
register int ax asm("ax"); \
\
dx = 0; \
ax = a; \
asm ("divl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b), "d" (dx)); \
return ax; \
}
#define perform_divsi3(a,b) \
{ \
register int dx asm("dx"); \
register int ax asm("ax"); \
\
ax = a; \
asm ("cltd\n\tidivl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b)); \
return ax; \
}
#define perform_umodsi3(a,b) \
{ \
register int dx asm("dx"); \
register int ax asm("ax"); \
\
dx = 0; \
ax = a; \
asm ("divl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b), "d" (dx)); \
return dx; \
}
#define perform_modsi3(a,b) \
{ \
register int dx asm("dx"); \
register int ax asm("ax"); \
\
ax = a; \
asm ("cltd\n\tidivl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b)); \
return dx; \
}
#define perform_fix_truncdfsi2(a) \
{ \
auto unsigned short ostatus; \
auto unsigned short nstatus; \
auto int ret; \
\
&ostatus;
/* guarantee these land in memory */
\
&nstatus; \
&ret; \
\
asm volatile ("fnstcw %0" : "=m" (ostatus)); \
nstatus = ostatus | 0x0c00; \
asm volatile ("fldcw %0" :
/* no outputs */
: "m" (nstatus)); \
asm volatile ("fldl %0" :
/* no outputs */
: "m" (a)); \
asm volatile ("fistpl %0" : "=m" (ret)); \
asm volatile ("fldcw %0" :
/* no outputs */
: "m" (nstatus)); \
\
return ret; \
}
This diff is collapsed.
Click to expand it.
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