aboutsummaryrefslogtreecommitdiff
path: root/gcc-1.40/va-i860.h
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2021-08-15 00:34:05 -0400
committerAndrew Lee <alee14498@protonmail.com>2021-08-15 00:34:05 -0400
commit60cc83bf91bfc9bb02f6304b5d6c8234ba6d210f (patch)
treefdc0be85a1ca35e34c3ae2c805fe9b718e3c1091 /gcc-1.40/va-i860.h
parentdd8dfab51b832a654365ed00c06bf802ff628bfa (diff)
downloadlinux-0.01-distro-master.tar.gz
linux-0.01-distro-master.tar.bz2
linux-0.01-distro-master.zip
Added gccHEADmaster
Diffstat (limited to 'gcc-1.40/va-i860.h')
-rw-r--r--gcc-1.40/va-i860.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/gcc-1.40/va-i860.h b/gcc-1.40/va-i860.h
new file mode 100644
index 0000000..80ea8ce
--- /dev/null
+++ b/gcc-1.40/va-i860.h
@@ -0,0 +1,53 @@
+#ifndef _VA_LIST
+#define _VA_LIST
+struct __va_struct { int fixed[12]; int floating[8]; };
+
+typedef struct __va_ctl
+{
+ struct __va_struct *__regs;
+ void *__stack;
+ int __nfixed, __nfloating;
+} va_list;
+#endif /* _VA_LIST */
+
+#define va_alist
+
+#define va_dcl
+
+#define va_start(pvar) \
+ (memcpy (&(pvar), (struct __va_ctl *) __builtin_saveregs (), 16))
+#define va_end(pvar)
+
+#define va_arg(pvar,type) \
+({ type __va_temp; \
+ *((__builtin_classify_type (__va_temp) < 8 \
+ && sizeof __va_temp < 8) \
+ ? ((pvar).__nfixed < 12 \
+ ? (type *) &(pvar).__regs->fixed[(pvar).__nfixed++] \
+ : ({ \
+ int temp \
+ = ((int) ((pvar).__stack + __alignof__ (type) - 1) \
+ & ~(__alignof__ (type) - 1)); \
+ (pvar).__stack = (void *) (temp + sizeof (type)); \
+ (type *) temp; \
+ })) \
+ : __builtin_classify_type (__va_temp) < 9 \
+ ? ((pvar).__nfloating < 8 \
+ ? ((pvar).__nfloating \
+ = (((pvar).__nfloating + 2 * (sizeof __va_temp / 4) - 1) \
+ & ~(sizeof __va_temp / 4 - 1)), \
+ (type *) &(pvar).__regs->floating[(pvar).__nfloating - (sizeof __va_temp / 4)]) \
+ : ({ \
+ int temp \
+ = ((int) ((pvar).__stack + __alignof__ (type) - 1) \
+ & ~(__alignof__ (type) - 1)); \
+ (pvar).__stack = (void *) (temp + sizeof (type)); \
+ (type *) temp; \
+ })) \
+ : ({ \
+ int temp \
+ = ((int) ((pvar).__stack + __alignof__ (type) - 1) \
+ & ~(__alignof__ (type) - 1)); \
+ (pvar).__stack = (void *) (temp + sizeof (type)); \
+ (type *) temp; \
+ })); })