ObjFW  Diff

Differences From Artifact [5e255cd58a]:

To Artifact [8a6730d0a3]:


39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# 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. */
int
_start()
{
	return -1;
}

#ifdef OF_AMIGAOS_M68K
void
__init_eh(void)







|







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# 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. */
int
_start(void)
{
	return -1;
}

#ifdef OF_AMIGAOS_M68K
void
__init_eh(void)
290
291
292
293
294
295
296
297

298
299
300
301
302
303
304
305
306
	OBJC_M68K_ARG(struct ObjFWRTBase *, base, a6)

	if (base->parent != NULL) {
		struct ObjFWRTBase *parent;

#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

		parent = base->parent;

		FreeMem(base->dataSeg - DATA_OFFSET, getDataSize());
		FreeMem((char *)base - base->library.lib_NegSize,
		    base->library.lib_NegSize + base->library.lib_PosSize);







|
>
|
<







290
291
292
293
294
295
296
297
298
299

300
301
302
303
304
305
306
	OBJC_M68K_ARG(struct ObjFWRTBase *, base, a6)

	if (base->parent != NULL) {
		struct ObjFWRTBase *parent;

#ifdef OF_AMIGAOS_M68K
		if (base->initialized)
			for (void *const *frame = _EH_FRAME_BEGINS__;
			    *frame != NULL;)
				libc.__deregister_frame_info(*frame++);

#endif

		parent = base->parent;

		FreeMem(base->dataSeg - DATA_OFFSET, getDataSize());
		FreeMem((char *)base - base->library.lib_NegSize,
		    base->library.lib_NegSize + base->library.lib_PosSize);
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360

	if (base->initialized)
		return true;

	memcpy(&libc, libc_, sizeof(libc));

#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],
		    (&_EH_FRAME_OBJECTS__)[i]);

	iter0 = &__CTOR_LIST__[1];
#elif defined(OF_MORPHOS)
	__asm__ (
	    "lis	%0, __EH_FRAME_BEGIN__@ha\n\t"
	    "la		%0, __EH_FRAME_BEGIN__@l(%0)\n\t"
	    "lis	%1, __CTOR_LIST__@ha\n\t"







|
<
|
<
|
<







341
342
343
344
345
346
347
348

349

350

351
352
353
354
355
356
357

	if (base->initialized)
		return true;

	memcpy(&libc, libc_, sizeof(libc));

#ifdef OF_AMIGAOS_M68K
	for (void *const *frame = _EH_FRAME_OBJECTS__,

	    **object = _EH_FRAME_OBJECTS__; *frame != NULL;)

		libc.__register_frame_info(*frame++, *object++);


	iter0 = &__CTOR_LIST__[1];
#elif defined(OF_MORPHOS)
	__asm__ (
	    "lis	%0, __EH_FRAME_BEGIN__@ha\n\t"
	    "la		%0, __EH_FRAME_BEGIN__@l(%0)\n\t"
	    "lis	%1, __CTOR_LIST__@ha\n\t"