Import gx, PadClamp, rest of mtx, TRK 2.6 and MSL (#525)
* Match mtx and Padclamp.c * Match the rest of GX * Import TRK 2.6 * Import MSL headers and files * Merge some MSL headers into ours
This commit is contained in:
parent
a79294aac0
commit
cdb1d1fc37
113 changed files with 11219 additions and 394 deletions
44
include/PowerPC_EABI_Support/Runtime/MWCPlusLib.h
Normal file
44
include/PowerPC_EABI_Support/Runtime/MWCPlusLib.h
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef _RUNTIME_MWCPLUSLIB_H
|
||||
#define _RUNTIME_MWCPLUSLIB_H
|
||||
|
||||
#include "stddef.h"
|
||||
|
||||
#define CTORARG_TYPE int
|
||||
#define CTORARG_PARTIAL (0)
|
||||
#define CTORARG_COMPLETE (1)
|
||||
|
||||
#define CTORCALL_COMPLETE(ctor, objptr) \
|
||||
(((void (*)(void*, CTORARG_TYPE))ctor)(objptr, CTORARG_COMPLETE))
|
||||
|
||||
#define DTORARG_TYPE int
|
||||
|
||||
#define DTORCALL_COMPLETE(dtor, objptr) \
|
||||
(((void (*)(void*, DTORARG_TYPE))dtor)(objptr, -1))
|
||||
#define DTORCALL_PARTIAL(dtor, objptr) \
|
||||
(((void (*)(void*, DTORARG_TYPE))dtor)(objptr, 0))
|
||||
|
||||
typedef void* ConstructorDestructor;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void* __copy(char* to, char* from, size_t size);
|
||||
|
||||
extern void __construct_array(void* ptr, ConstructorDestructor ctor,
|
||||
ConstructorDestructor dtor, size_t size,
|
||||
size_t n);
|
||||
extern void __destroy_arr(void* block, ConstructorDestructor* dtor, size_t size,
|
||||
size_t n);
|
||||
extern void* __construct_new_array(void* block, ConstructorDestructor ctor,
|
||||
ConstructorDestructor dtor_arg, size_t size,
|
||||
size_t n);
|
||||
extern void __destroy_new_array(void* block, ConstructorDestructor dtor);
|
||||
extern void __destroy_new_array2();
|
||||
extern void __destroy_new_array3();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
43
include/PowerPC_EABI_Support/Runtime/NMWException.h
Normal file
43
include/PowerPC_EABI_Support/Runtime/NMWException.h
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#ifndef _NMWEXCEPTION
|
||||
#define _NMWEXCEPTION
|
||||
|
||||
typedef short vbase_ctor_arg_type;
|
||||
typedef char local_cond_type;
|
||||
|
||||
typedef struct CatchInfo {
|
||||
void* location;
|
||||
void* typeinfo;
|
||||
void* dtor;
|
||||
void* sublocation;
|
||||
long pointercopy;
|
||||
void* stacktop;
|
||||
} CatchInfo;
|
||||
|
||||
typedef struct DestructorChain {
|
||||
struct DestructorChain* next;
|
||||
void* destructor;
|
||||
void* object;
|
||||
} DestructorChain;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void* __register_global_object(void* object, void* destructor,
|
||||
void* registration);
|
||||
extern void __destroy_global_chain(void);
|
||||
|
||||
extern void __end__catch(CatchInfo* catchinfo);
|
||||
extern void __throw(char* throwtype, void* location, void* dtor);
|
||||
extern char __throw_catch_compare(const char* throwtype, const char* catchtype,
|
||||
long* offset_result);
|
||||
extern void __unexpected(CatchInfo* catchinfo);
|
||||
|
||||
extern int __register_fragment(struct __eti_init_info* info, char* TOC);
|
||||
extern void __unregister_fragment(int fragmentID);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _NMWEXCEPTION
|
||||
17
include/PowerPC_EABI_Support/Runtime/__mem.h
Normal file
17
include/PowerPC_EABI_Support/Runtime/__mem.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef _RUNTIME_MEM_H
|
||||
#define _RUNTIME_MEM_H
|
||||
|
||||
#include "stddef.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
__declspec(section ".init") void* memcpy(void* dest, const void* src, size_t n);
|
||||
__declspec(section ".init") void* memset(void* dest, int val, size_t count);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
72
include/PowerPC_EABI_Support/Runtime/__ppc_eabi_linker.h
Normal file
72
include/PowerPC_EABI_Support/Runtime/__ppc_eabi_linker.h
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
#ifndef __PPC_EABI_LINKER
|
||||
#define __PPC_EABI_LINKER
|
||||
|
||||
__declspec(section ".init") extern char _stack_addr[];
|
||||
__declspec(section ".init") extern char _stack_end[];
|
||||
__declspec(section ".init") extern char _heap_addr[];
|
||||
__declspec(section ".init") extern char _heap_end[];
|
||||
__declspec(section ".init") extern const char _fextabindex_rom[];
|
||||
__declspec(section ".init") extern char _fextabindex[];
|
||||
__declspec(section ".init") extern char _eextabindex[];
|
||||
|
||||
__declspec(section ".init") extern char _SDA_BASE_[];
|
||||
|
||||
__declspec(section ".init") extern char _SDA2_BASE_[];
|
||||
|
||||
typedef struct __rom_copy_info {
|
||||
char* rom;
|
||||
char* addr;
|
||||
unsigned int size;
|
||||
} __rom_copy_info;
|
||||
|
||||
__declspec(section ".init") extern __rom_copy_info _rom_copy_info[];
|
||||
|
||||
typedef struct __bss_init_info {
|
||||
char* addr;
|
||||
unsigned int size;
|
||||
} __bss_init_info;
|
||||
|
||||
__declspec(section ".init") extern __bss_init_info _bss_init_info[];
|
||||
|
||||
typedef struct __eti_init_info {
|
||||
void* eti_start;
|
||||
void* eti_end;
|
||||
void* code_start;
|
||||
unsigned long code_size;
|
||||
} __eti_init_info;
|
||||
|
||||
__declspec(section ".init") extern __eti_init_info _eti_init_info[];
|
||||
__declspec(section ".init") extern const char _f_init_rom[];
|
||||
__declspec(section ".init") extern char _f_init[];
|
||||
__declspec(section ".init") extern char _e_init[];
|
||||
__declspec(section ".init") extern const char _f_text_rom[];
|
||||
__declspec(section ".init") extern char _f_text[];
|
||||
__declspec(section ".init") extern char _e_text[];
|
||||
__declspec(section ".init") extern const char _f_rodata_rom[];
|
||||
__declspec(section ".init") extern char _f_rodata[];
|
||||
__declspec(section ".init") extern char _e_rodata[];
|
||||
__declspec(section ".init") extern const char _fextab_rom[];
|
||||
__declspec(section ".init") extern char _fextab[];
|
||||
__declspec(section ".init") extern char _eextab[];
|
||||
__declspec(section ".init") extern const char _f_data_rom[];
|
||||
__declspec(section ".init") extern char _f_data[];
|
||||
__declspec(section ".init") extern char _e_data[];
|
||||
__declspec(section ".init") extern char _f_bss[];
|
||||
__declspec(section ".init") extern char _e_bss[];
|
||||
__declspec(section ".init") extern const char _f_sdata_rom[];
|
||||
__declspec(section ".init") extern char _f_sdata[];
|
||||
__declspec(section ".init") extern char _e_sdata[];
|
||||
__declspec(section ".init") extern char _f_sbss[];
|
||||
__declspec(section ".init") extern char _e_sbss[];
|
||||
__declspec(section ".init") extern const char _f_sdata2_rom[];
|
||||
__declspec(section ".init") extern char _f_sdata2[];
|
||||
__declspec(section ".init") extern char _e_sdata2[];
|
||||
__declspec(section ".init") extern char _f_sbss2[];
|
||||
__declspec(section ".init") extern char _e_sbss2[];
|
||||
__declspec(section ".init") extern const char _f_PPC_EMB_sdata0_rom[];
|
||||
__declspec(section ".init") extern char _f_PPC_EMB_sdata0[];
|
||||
__declspec(section ".init") extern char _e_PPC_EMB_sdata0[];
|
||||
__declspec(section ".init") extern char _f_PPC_EMB_sbss0[];
|
||||
__declspec(section ".init") extern char _e_PPC_EMB_sbss0[];
|
||||
|
||||
#endif // __PPC_EABI_LINKER
|
||||
Loading…
Add table
Add a link
Reference in a new issue