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
06737be4
Commit
06737be4
authored
Aug 14, 1996
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix varargs/stdarg on PowerPC Windows NT
From-SVN: r12637
parent
c7c27cd3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
3 deletions
+58
-3
gcc/ginclude/stdarg.h
+1
-1
gcc/ginclude/va-ppc.h
+56
-1
gcc/ginclude/varargs.h
+1
-1
No files found.
gcc/ginclude/stdarg.h
View file @
06737be4
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
#if defined (__H8300__) || defined (__H8300H__) || defined (__H8300S__)
#if defined (__H8300__) || defined (__H8300H__) || defined (__H8300S__)
#include <va-h8300.h>
#include <va-h8300.h>
#else
#else
#if defined (__PPC__) &&
defined (_CALL_SYSV
)
#if defined (__PPC__) &&
(defined (_CALL_SYSV) || defined (__WIN32__)
)
#include <va-ppc.h>
#include <va-ppc.h>
#else
#else
#ifdef __sh__
#ifdef __sh__
...
...
gcc/ginclude/va-ppc.h
View file @
06737be4
/* GNU C varargs support for the PowerPC with
V.4 calling sequence
*/
/* GNU C varargs support for the PowerPC with
either the V.4 or Windows NT calling sequences
*/
#ifndef __WIN32__
/* System V.4 support */
/* Define __gnuc_va_list. */
/* Define __gnuc_va_list. */
#ifndef __GNUC_VA_LIST
#ifndef __GNUC_VA_LIST
...
@@ -167,3 +169,56 @@ __extension__ (*({ \
...
@@ -167,3 +169,56 @@ __extension__ (*({ \
#define va_end(AP) ((void)0)
#define va_end(AP) ((void)0)
#endif
/* defined (_STDARG_H) || defined (_VARARGS_H) */
#endif
/* defined (_STDARG_H) || defined (_VARARGS_H) */
#else
/* Windows NT */
/* Define __gnuc_va_list. */
#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST
typedef
char
*
__gnuc_va_list
;
#endif
/* not __GNUC_VA_LIST */
/* If this is for internal libc use, don't define anything but
__gnuc_va_list. */
#if defined (_STDARG_H) || defined (_VARARGS_H)
#define __va_start_common(AP, LASTARG, FAKE) \
((__builtin_saveregs ()), ((AP) = ((char *) &LASTARG) + __va_rounded_size (AP)), 0)
#ifdef _STDARG_H
/* stdarg.h support */
/* Calling __builtin_next_arg gives the proper error message if LASTARG is
not indeed the last argument. */
#define va_start(AP,LASTARG) \
(__builtin_saveregs (), \
(AP) = __builtin_next_arg (LASTARG), \
0)
#else
/* varargs.h support */
#define va_start(AP) \
(__builtin_saveregs (), \
(AP) = __builtin_next_arg (__va_1st_arg) - sizeof (int), \
0)
#define va_alist __va_1st_arg
#define va_dcl register int __va_1st_arg; ...
#endif
/* _STDARG_H */
#define __va_rounded_size(TYPE) ((sizeof (TYPE) + 3) & ~3)
#define __va_align(AP, TYPE) \
((((unsigned long)(AP)) + ((sizeof (TYPE) >= 8) ? 7 : 3)) \
& ~((sizeof (TYPE) >= 8) ? 7 : 3))
#define va_arg(AP,TYPE) \
( *(TYPE *)((AP = (char *) (__va_align(AP, TYPE) \
+ __va_rounded_size(TYPE))) \
- __va_rounded_size(TYPE)))
#define va_end(AP) ((void)0)
#endif
/* defined (_STDARG_H) || defined (_VARARGS_H) */
#endif
/* Windows NT */
gcc/ginclude/varargs.h
View file @
06737be4
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
#if defined (__H8300__) || defined (__H8300H__) || defined (__H8300S__)
#if defined (__H8300__) || defined (__H8300H__) || defined (__H8300S__)
#include <va-h8300.h>
#include <va-h8300.h>
#else
#else
#if defined (__PPC__) &&
defined (_CALL_SYSV
)
#if defined (__PPC__) &&
(defined (_CALL_SYSV) || defined (__WIN32__)
)
#include <va-ppc.h>
#include <va-ppc.h>
#else
#else
#ifdef __sh__
#ifdef __sh__
...
...
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