mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
* os symbols * various variables * more variables * more cleanup * yeet HW_REG * OS_PHYSICAL_TO_K0 and other cleanups * Rename r4300.h * migrate pimgr data and cleanup on initialize.c * rename osFlash symbols * cleanup gu * vimodes * yeet rmon, do libc files * some os files * hardwareinterrupt * cleanup a lot of os files * cleanup osVirtualToPhysical * various io files * another io chunk * final io chunk * yeet hardware.h * yeet PHYSICAL_TO_VIRTUAL and VIRTUAL_TO_PHYSICAL * fix typo * fix merge * remove global.h from libultra files * fixes and format * brief explanation * review * review * review * review * SEGMENTED_TO_K0 * Revert "SEGMENTED_TO_K0" This reverts commit f8d62d670f91af401feb56489e1cbc45a1260049. * take two * bss * bss
29 lines
665 B
C
29 lines
665 B
C
#ifndef ALIGNMENT_H
|
|
#define ALIGNMENT_H
|
|
|
|
#include "attributes.h"
|
|
|
|
#define ALIGN8(val) (((val) + 7) & ~7)
|
|
#define ALIGN16(val) (((val) + 0xF) & ~0xF)
|
|
#define ALIGN32(val) (((val) + 0x1F) & ~0x1F)
|
|
#define ALIGN64(val) (((val) + 0x3F) & ~0x3F)
|
|
#define ALIGN256(val) (((val) + 0xFF) & ~0xFF)
|
|
|
|
#ifndef ALIGNED
|
|
#define ALIGNED(x) __attribute__ ((aligned (x)))
|
|
#endif
|
|
|
|
#ifdef __sgi /* IDO compiler */
|
|
#define ALIGNOF(x) __builtin_alignof(x)
|
|
#elif (__STDC_VERSION__ >= 201112L) /* C11 */
|
|
#define ALIGNOF(x) _Alignof(x)
|
|
#else /* __GNUC__ */
|
|
#define ALIGNOF(x) __alignof__(x)
|
|
#endif
|
|
|
|
#define ALIGN_MASK(n) (~((n) - 1))
|
|
|
|
#define ALIGNOF_MASK(x) ALIGN_MASK(ALIGNOF(x))
|
|
|
|
#endif
|