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
1112eea2
Commit
1112eea2
authored
Oct 26, 1990
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial revision
From-SVN: r15
parent
1fa2d22f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
0 deletions
+55
-0
gcc/ginclude/va-spur.h
+55
-0
No files found.
gcc/ginclude/va-spur.h
0 → 100644
View file @
1112eea2
/* varargs.h for SPUR */
/* NB. This is NOT the definition needed for the new ANSI proposed
standard */
struct
__va_struct
{
char
__regs
[
20
];
};
#define va_alist __va_regs, __va_stack
/* In GCC version 2, we want an ellipsis at the end of the declaration
of the argument list. GCC version 1 can't parse it. */
#if __GNUC__ > 1
#define __va_ellipsis ...
#else
#define __va_ellipsis
#endif
/* The ... causes current_function_varargs to be set in cc1. */
#define va_dcl struct __va_struct __va_regs; int __va_stack;
typedef
struct
{
int
__pnt
;
char
*
__regs
;
char
*
__stack
;
}
va_list
;
#define va_start(pvar) \
((pvar).__pnt = 0, (pvar).__regs = __va_regs.__regs, \
(pvar).__stack = (char *) &__va_stack)
#define va_end(pvar)
#define va_arg(pvar,type) \
({ type __va_result; \
if ((pvar).__pnt >= 20) { \
__va_result = *( (type *) ((pvar).__stack + (pvar).__pnt - 20)); \
(pvar).__pnt += (sizeof(type) + 7) & ~7; \
} \
else if ((pvar).__pnt + sizeof(type) > 20) { \
__va_result = * (type *) (pvar).__stack; \
(pvar).__pnt = 20 + ( (sizeof(type) + 7) & ~7); \
} \
else if (sizeof(type) == 8) { \
union {double d; int i[2];} __u; \
__u.i[0] = *(int *) ((pvar).__regs + (pvar).__pnt); \
__u.i[1] = *(int *) ((pvar).__regs + (pvar).__pnt + 4); \
__va_result = * (type *) &__u; \
(pvar).__pnt += 8; \
} \
else { \
__va_result = * (type *) ((pvar).__regs + (pvar).__pnt); \
(pvar).__pnt += (sizeof(type) + 3) & ~3; \
} \
__va_result; })
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