diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2021-08-15 00:34:05 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2021-08-15 00:34:05 -0400 |
| commit | 60cc83bf91bfc9bb02f6304b5d6c8234ba6d210f (patch) | |
| tree | fdc0be85a1ca35e34c3ae2c805fe9b718e3c1091 /gcc-1.40/va-i860.h | |
| parent | dd8dfab51b832a654365ed00c06bf802ff628bfa (diff) | |
| download | linux-0.01-distro-master.tar.gz linux-0.01-distro-master.tar.bz2 linux-0.01-distro-master.zip | |
Diffstat (limited to 'gcc-1.40/va-i860.h')
| -rw-r--r-- | gcc-1.40/va-i860.h | 53 |
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; \ + })); }) |
