@@ -18,11 +18,11 @@ #include "config.h" #import "ObjFW_RT.h" #import "private.h" -#ifdef OF_AMIGAOS3 +#ifdef OF_AMIGAOS_M68K # define INTUITION_CLASSES_H #endif #include #include @@ -31,18 +31,18 @@ #define CONCAT_VERSION2(major, minor) #major "." #minor #define CONCAT_VERSION(major, minor) CONCAT_VERSION2(major, minor) #define VERSION_STRING CONCAT_VERSION(OBJFW_RT_LIB_MAJOR, OBJFW_RT_LIB_MINOR) -#if defined(OF_AMIGAOS3) +#if defined(OF_AMIGAOS_M68K) # define DATA_OFFSET 0x7FFE #elif defined(OF_MORPHOS) # define DATA_OFFSET 0x8000 #endif -#ifdef OF_AMIGAOS3 -# define OBJC_M68K_REG(reg) __asm__ (#reg) +#ifdef OF_AMIGAOS_M68K +# define OBJC_M68K_REG(reg) __asm__(#reg) #else # define OBJC_M68K_REG(reg) #endif /* This always needs to be the first thing in the file. */ @@ -58,11 +58,11 @@ struct ObjFWRTBase *parent; char *data_seg; bool initialized; }; -#ifdef OF_AMIGAOS3 +#ifdef OF_AMIGAOS_M68K extern uintptr_t __CTOR_LIST__[]; extern const void *_EH_FRAME_BEGINS__; extern void *_EH_FRAME_OBJECTS__; #endif @@ -139,11 +139,11 @@ struct ExecBase *SysBase; struct objc_libc libc; FILE *stdout; FILE *stderr; -#if defined(OF_AMIGAOS3) +#if defined(OF_AMIGAOS_M68K) __asm__ ( ".text\n" ".globl ___restore_a4\n" ".align 1\n" "___restore_a4:\n" @@ -167,11 +167,11 @@ static OF_INLINE char * get_data_seg(void) { char *data_seg; -#if defined(OF_AMIGAOS3) +#if defined(OF_AMIGAOS_M68K) __asm__ ( "move.l #___a4_init, %0" : "=r"(data_seg) ); #elif defined(OF_MORPHOS) @@ -188,11 +188,11 @@ static OF_INLINE size_t get_data_size(void) { size_t data_size; -#if defined(OF_AMIGAOS3) +#if defined(OF_AMIGAOS_M68K) __asm__ ( "move.l #___data_size, %0" : "=r"(data_size) ); #elif defined(OF_MORPHOS) @@ -213,11 +213,11 @@ static OF_INLINE size_t * get_datadata_relocs(void) { size_t *datadata_relocs; -#if defined(OF_AMIGAOS3) +#if defined(OF_AMIGAOS_M68K) __asm__ ( "move.l #___datadata_relocs, %0" : "=r"(datadata_relocs) ); #elif defined(OF_MORPHOS) @@ -234,11 +234,11 @@ static struct Library * lib_init(struct ObjFWRTBase *base OBJC_M68K_REG(d0), void *seg_list OBJC_M68K_REG(a0), struct ExecBase *sys_base OBJC_M68K_REG(a6)) { -#if defined(OF_AMIGAOS3) +#if defined(OF_AMIGAOS_M68K) __asm__ __volatile__ ( "move.l a6, _SysBase" :: "a"(sys_base) ); #elif defined(OF_MORPHOS) @@ -349,11 +349,11 @@ OBJC_M68K_ARG(struct ObjFWRTBase *, base, a6) if (base->parent != NULL) { struct ObjFWRTBase *parent; -#ifdef OF_AMIGAOS3 +#ifdef OF_AMIGAOS_M68K if (base->initialized) for (size_t i = 1; i <= (size_t)_EH_FRAME_BEGINS__; i++) libc.__deregister_frame_info( (&_EH_FRAME_BEGINS__)[i]); #endif @@ -396,11 +396,11 @@ memcpy(&libc, libc_, sizeof(libc)); stdout = stdout_; stderr = stderr_; -#ifdef OF_AMIGAOS3 +#ifdef OF_AMIGAOS_M68K if ((size_t)_EH_FRAME_BEGINS__ != (size_t)_EH_FRAME_OBJECTS__) return false; for (size_t i = 1; i <= (size_t)_EH_FRAME_BEGINS__; i++) libc.__register_frame_info((&_EH_FRAME_BEGINS__)[i], @@ -605,15 +605,12 @@ struct Resident resident = { .rt_MatchWord = RTC_MATCHWORD, .rt_MatchTag = &resident, .rt_EndSkip = &resident + 1, .rt_Flags = RTF_AUTOINIT -#ifndef OF_AMIGAOS3 - | RTF_PPC -#endif #ifdef OF_MORPHOS - | RTF_EXTENDED + | RTF_PPC | RTF_EXTENDED #endif , .rt_Version = OBJFW_RT_LIB_MAJOR, .rt_Type = NT_LIBRARY, .rt_Pri = 0,