ObjFW  Check-in [ab9656d550]

Overview
Comment:lookup-asm-powerpc-elf.S: Support for baserel
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ab9656d5500b4e952d196ee45e542149424a908652cc22e723de6e62e16e52a6
User & Date: js on 2020-11-25 01:59:11
Other Links: manifest | tags
Context
2020-11-26
01:44
runtime: Register frames of Amiga lib on MorphOS check-in: bc1275562e user: js tags: trunk
2020-11-25
01:59
lookup-asm-powerpc-elf.S: Support for baserel check-in: ab9656d550 user: js tags: trunk
00:40
Clean up unnecessary build variables check-in: 590bbe7203 user: js tags: trunk
Changes

Modified configure.ac from [cc7f28eb04] to [28e2b81d48].

392
393
394
395
396
397
398
399
400


401

402
403
404



405
406
407
408
409
410
411
412
	TESTS_LIBS="-L../src/runtime -L../src/runtime/linklib $TESTS_LIBS"
	TESTS_LIBS="-L../src -lobjfw $TESTS_LIBS"
])

AC_ARG_ENABLE(amiga-lib,
	AS_HELP_STRING([--disable-amiga-lib], [do not build Amiga library]))
AS_IF([test x"$supports_amiga_lib" != x"yes"], [enable_amiga_lib="no"])

AS_IF([test x"$enable_shared" = x"no" -a x"$enable_amiga_lib" = x"no"], [


	enable_static="yes"

])

AC_ARG_ENABLE(static, AS_HELP_STRING([--enable-static], [build static library]))



AS_IF([test x"$enable_static" = x"yes" -o x"$enable_amiga_lib" != x"no"], [
	AC_SUBST(OBJFW_STATIC_LIB, "libobjfw.a")
	AC_SUBST(EXCEPTIONS_A, "exceptions.a")
	AC_SUBST(FORWARDING_A, "forwarding.a")
	AC_SUBST(INVOCATION_A, "invocation.a")
	AC_SUBST(LOOKUP_ASM_A, "lookup-asm.a")
])








|
|
>
>
|
>



>
>
>
|







392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
	TESTS_LIBS="-L../src/runtime -L../src/runtime/linklib $TESTS_LIBS"
	TESTS_LIBS="-L../src -lobjfw $TESTS_LIBS"
])

AC_ARG_ENABLE(amiga-lib,
	AS_HELP_STRING([--disable-amiga-lib], [do not build Amiga library]))
AS_IF([test x"$supports_amiga_lib" != x"yes"], [enable_amiga_lib="no"])
AS_IF([test x"$enable_amiga_lib" != x"no"], [
	AC_SUBST(OBJFW_STATIC_LIB, "libobjfw.a")
	AC_SUBST(EXCEPTIONS_A, "exceptions.a")
	AC_SUBST(FORWARDING_A, "forwarding.a")
	AC_SUBST(INVOCATION_A, "invocation.a")
	AC_SUBST(LOOKUP_ASM_AMIGALIB_A, "lookup-asm.amigalib.a")
])

AC_ARG_ENABLE(static, AS_HELP_STRING([--enable-static], [build static library]))
AS_IF([test x"$enable_shared" = x"no" -a x"$enable_amiga_lib" = x"no"], [
	enable_static="yes"
])
AS_IF([test x"$enable_static" = x"yes"], [
	AC_SUBST(OBJFW_STATIC_LIB, "libobjfw.a")
	AC_SUBST(EXCEPTIONS_A, "exceptions.a")
	AC_SUBST(FORWARDING_A, "forwarding.a")
	AC_SUBST(INVOCATION_A, "invocation.a")
	AC_SUBST(LOOKUP_ASM_A, "lookup-asm.a")
])

Modified extra.mk.in from [bc71d2f893] to [0e1d9eeba5].

35
36
37
38
39
40
41

42
43
44
45
46
47
48
LIBOBJFWRT_DEP = @LIBOBJFWRT_DEP@
LIBOBJFWRT_DEP_LVL2 = @LIBOBJFWRT_DEP_LVL2@
LIBOBJFW_DEP = @LIBOBJFW_DEP@
LIBOBJFW_DEP_LVL2 = @LIBOBJFW_DEP_LVL2@
LINKLIB = @LINKLIB@
LOOKUP_ASM_A = @LOOKUP_ASM_A@
LOOKUP_ASM_LIB_A = @LOOKUP_ASM_LIB_A@

MAP_LDFLAGS = @MAP_LDFLAGS@
OFARC = @OFARC@
OFDNS = @OFDNS@
OFHASH = @OFHASH@
OFHTTP = @OFHTTP@
OFSOCK = @OFSOCK@
OF_BLOCK_TESTS_M = @OF_BLOCK_TESTS_M@







>







35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
LIBOBJFWRT_DEP = @LIBOBJFWRT_DEP@
LIBOBJFWRT_DEP_LVL2 = @LIBOBJFWRT_DEP_LVL2@
LIBOBJFW_DEP = @LIBOBJFW_DEP@
LIBOBJFW_DEP_LVL2 = @LIBOBJFW_DEP_LVL2@
LINKLIB = @LINKLIB@
LOOKUP_ASM_A = @LOOKUP_ASM_A@
LOOKUP_ASM_LIB_A = @LOOKUP_ASM_LIB_A@
LOOKUP_ASM_AMIGALIB_A = @LOOKUP_ASM_AMIGALIB_A@
MAP_LDFLAGS = @MAP_LDFLAGS@
OFARC = @OFARC@
OFDNS = @OFDNS@
OFHASH = @OFHASH@
OFHTTP = @OFHTTP@
OFSOCK = @OFSOCK@
OF_BLOCK_TESTS_M = @OF_BLOCK_TESTS_M@

Modified src/runtime/Makefile from [7975b339f9] to [db9b1528cf].

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
	       tlskey.m
INCLUDES = ObjFWRT.h
includesubdir = ObjFWRT

OBJS_EXTRA = lookup-asm/lookup-asm.a
LIB_OBJS_EXTRA = lookup-asm/lookup-asm.lib.a
AMIGA_LIB_OBJS_START = amiga-library.amigalib.o
AMIGA_LIB_OBJS_EXTRA = amiga-glue.amigalib.o	\
		       lookup-asm/lookup-asm.a	\
		       amiga-end.amigalib.o

include ../../buildsys.mk

${OBJFWRT_AMIGA_LIB}: inline.h

${SFDC_INLINE_H}: ${SFD_FILE}







|
|







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
	       tlskey.m
INCLUDES = ObjFWRT.h
includesubdir = ObjFWRT

OBJS_EXTRA = lookup-asm/lookup-asm.a
LIB_OBJS_EXTRA = lookup-asm/lookup-asm.lib.a
AMIGA_LIB_OBJS_START = amiga-library.amigalib.o
AMIGA_LIB_OBJS_EXTRA = amiga-glue.amigalib.o		\
		       lookup-asm/lookup-asm.amigalib.a	\
		       amiga-end.amigalib.o

include ../../buildsys.mk

${OBJFWRT_AMIGA_LIB}: inline.h

${SFDC_INLINE_H}: ${SFD_FILE}

Modified src/runtime/lookup-asm/Makefile from [a8b7579307] to [3c7b7f7fc1].

1
2
3

4
5
6
7
8
9
10

include ../../../extra.mk

STATIC_PIC_LIB_NOINST = ${LOOKUP_ASM_LIB_A}

STATIC_LIB_NOINST = ${LOOKUP_ASM_A}

SRCS = lookup-asm.S

include ../../../buildsys.mk

ASFLAGS += -I../../.. -I../..




>







>
1
2
3
4
5
6
7
8
9
10
11
12
include ../../../extra.mk

STATIC_PIC_LIB_NOINST = ${LOOKUP_ASM_LIB_A}
STATIC_AMIGA_LIB_NOINST = ${LOOKUP_ASM_AMIGALIB_A}
STATIC_LIB_NOINST = ${LOOKUP_ASM_A}

SRCS = lookup-asm.S

include ../../../buildsys.mk

ASFLAGS += -I../../.. -I../..
ASFLAGS_lookup-asm.amigalib.o += -DOF_BASEREL

Modified src/runtime/lookup-asm/lookup-asm-powerpc-elf.S from [b5f4644a75] to [acb778889a].

81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97




98
99
100
101
102
103
104
105
106
107



108
109
110
111
112
113
114
	addi	%r1, %r1, 16
	mtlr	%r0

	bctr
#endif

.Ltagged_pointer_\name:
#ifdef OF_PIC
	mflr	%r7
	bl	0f
0:
	mflr	%r6
	mtlr	%r7
	addis	%r6, %r6, .Lbiased_got2-0b@ha
	addi	%r6, %r6, .Lbiased_got2-0b@l

	lwz	%r5, .Lgot_objc_tagged_pointer_secret-.Lbiased_got2(%r6)




#else
	lis	%r5, objc_tagged_pointer_secret@ha
	addi	%r5, %r5, objc_tagged_pointer_secret@l
#endif
	lwz	%r5, 0(%r5)
	xor	%r5, %r3, %r5
	rlwinm	%r5, %r5, 1, 0x1C

#ifdef OF_PIC
	lwz	%r6, .Lgot_objc_tagged_pointer_classes-.Lbiased_got2(%r6)



#else
	lis	%r6, objc_tagged_pointer_classes@ha
	addi	%r6, %r6, objc_tagged_pointer_classes@l
#endif
	lwzx	%r5, %r6, %r5
	lwz	%r5, 32(%r5)








|









>
>
>
>


|

<



|

>
>
>







81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
	addi	%r1, %r1, 16
	mtlr	%r0

	bctr
#endif

.Ltagged_pointer_\name:
#if defined(OF_PIC)
	mflr	%r7
	bl	0f
0:
	mflr	%r6
	mtlr	%r7
	addis	%r6, %r6, .Lbiased_got2-0b@ha
	addi	%r6, %r6, .Lbiased_got2-0b@l

	lwz	%r5, .Lgot_objc_tagged_pointer_secret-.Lbiased_got2(%r6)
	lwz	%r5, 0(%r5)
#elif defined(OF_BASEREL)
	addis	%r5, %r13, objc_tagged_pointer_secret@drel@ha
	lwz	%r5, objc_tagged_pointer_secret@drel@l(%r5)
#else
	lis	%r5, objc_tagged_pointer_secret@ha
	lwz	%r5, objc_tagged_pointer_secret@l(%r5)
#endif

	xor	%r5, %r3, %r5
	rlwinm	%r5, %r5, 1, 0x1C

#if defined(OF_PIC)
	lwz	%r6, .Lgot_objc_tagged_pointer_classes-.Lbiased_got2(%r6)
#elif defined(OF_BASEREL)
	addis	%r6, %r13, objc_tagged_pointer_classes@drel@ha
	addi	%r6, %r6, objc_tagged_pointer_classes@drel@l
#else
	lis	%r6, objc_tagged_pointer_classes@ha
	addi	%r6, %r6, objc_tagged_pointer_classes@l
#endif
	lwzx	%r5, %r6, %r5
	lwz	%r5, 32(%r5)