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
0be1f0e1
Commit
0be1f0e1
authored
Apr 24, 1997
by
Jim Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Add
TARGET_5200 support. From-SVN: r13978
parent
1974bfb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
8 deletions
+48
-8
gcc/config/m68k/m68k.h
+48
-8
No files found.
gcc/config/m68k/m68k.h
View file @
0be1f0e1
...
@@ -988,24 +988,64 @@ while(0)
...
@@ -988,24 +988,64 @@ while(0)
#ifdef MOTOROLA
#ifdef MOTOROLA
#define MACHINE_STATE_SAVE(id) \
#define MACHINE_STATE_SAVE(id) \
asm ("move.w %ccr,-(%sp)"); \
if (TARGET_5200) \
asm ("movm.l &0xc0c0,-(%sp)");
{ \
asm ("sub.l 20,%sp"); \
asm ("movm.l &0x0303,4(%sp)"); \
asm ("move.w %ccr,%d0"); \
asm ("movm.l &0x0001,(%sp)"); \
} \
else \
{ \
asm ("move.w %ccr,-(%sp)"); \
asm ("movm.l &0xc0c0,-(%sp)"); \
}
#else
#else
#define MACHINE_STATE_SAVE(id) \
#define MACHINE_STATE_SAVE(id) \
asm ("movew cc,sp@-"); \
if (TARGET_5200) \
asm ("moveml d0/d1/a0/a1,sp@-");
{ \
asm ("subl 20,sp"); \
asm ("movml d0/d1/a0/a1,sp@(4)"); \
asm ("movew cc,d0"); \
asm ("movml d0,sp@"); \
} \
else \
{ \
asm ("movew cc,sp@-"); \
asm ("moveml d0/d1/a0/a1,sp@-"); \
}
#endif
#endif
/* Restore all registers saved by MACHINE_STATE_SAVE. */
/* Restore all registers saved by MACHINE_STATE_SAVE. */
#ifdef MOTOROLA
#ifdef MOTOROLA
#define MACHINE_STATE_RESTORE(id) \
#define MACHINE_STATE_RESTORE(id) \
asm ("movm.l (%sp)+,&0x0303"); \
if (TARGET_5200) \
asm ("move.w (%sp)+,%ccr");
{ \
asm ("movm.l (%sp),&0x0001"); \
asm ("move.w %d0,%ccr"); \
asm ("movm.l 4(%sp),&0x0303"); \
asm ("add.l 20,%sp"); \
} \
else \
{ \
asm ("movm.l (%sp)+,&0x0303"); \
asm ("move.w (%sp)+,%ccr"); \
}
#else
#else
#define MACHINE_STATE_RESTORE(id) \
#define MACHINE_STATE_RESTORE(id) \
asm ("moveml sp@+,d0/d1/a0/a1"); \
if (TARGET_5200) \
asm ("movew sp@+,cc");
{ \
asm ("movml sp@,d0"); \
asm ("movew d0,cc"); \
asm ("movml sp@(4),d0/d1/a0/a1"); \
asm ("addl 20,sp"); \
} \
else \
{ \
asm ("moveml sp@+,d0/d1/a0/a1"); \
asm ("movew sp@+,cc"); \
}
#endif
#endif
/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
...
...
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