ObjFW  Check-in [8e553c7d8a]

Overview
Comment:src/amiga-library.m: Adjust for new Amiga GCC
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | amiga-library
Files: files | file ages | folders
SHA3-256: 8e553c7d8a80825de5a926d35006718832cc096055050a292b613d988eddcec9
User & Date: js on 2022-11-06 19:07:48
Other Links: branch diff | manifest | tags
Context
2022-11-06
19:16
Merge trunk into branch "amiga-library" check-in: 82bc531357 user: js tags: amiga-library
19:07
src/amiga-library.m: Adjust for new Amiga GCC check-in: 8e553c7d8a user: js tags: amiga-library
19:07
src/linklib/init.m: Update class list check-in: b19b7d4868 user: js tags: amiga-library
Changes

Modified src/amiga-library.m from [e21a361b93] to [87f8097e13].

43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# define OF_M68K_REG(reg) __asm__(#reg)
#else
# define OF_M68K_REG(reg)
#endif

/* This always needs to be the first thing in the file. */
int
_start()
{
	return -1;
}

struct ObjFWBase {
	struct Library library;
	void *segList;







|







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# define OF_M68K_REG(reg) __asm__(#reg)
#else
# define OF_M68K_REG(reg)
#endif

/* This always needs to be the first thing in the file. */
int
_start(void)
{
	return -1;
}

struct ObjFWBase {
	struct Library library;
	void *segList;
297
298
299
300
301
302
303
304

305
306
307
308
309
310
311
312
313
	OF_M68K_ARG(struct ObjFWBase *, base, a6)

	if (base->parent != NULL) {
		struct ObjFWBase *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);







|
>
|
<







297
298
299
300
301
302
303
304
305
306

307
308
309
310
311
312
313
	OF_M68K_ARG(struct ObjFWBase *, base, a6)

	if (base->parent != NULL) {
		struct ObjFWBase *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);
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
	if (base->initialized)
		return true;

	memcpy(&libC, libC_, sizeof(libC));
	__sF = sF;

#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"







|
<
|
<
|
<







349
350
351
352
353
354
355
356

357

358

359
360
361
362
363
364
365
	if (base->initialized)
		return true;

	memcpy(&libC, libC_, sizeof(libC));
	__sF = sF;

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

	    **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"