ObjFW  Check-in [fa3c89f802]

Overview
Comment:OFMatrix4x4: Add #pragma GCC target("3dnow")
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: fa3c89f802a12f2416fe37f5d2a0a4cded38d0fcb6f946446076db6ed5273056
User & Date: js on 2023-10-31 22:14:33
Other Links: manifest | tags
Context
2023-10-31
22:27
Move x86/ELF assembly back to AT&T syntax check-in: 4c866f0320 user: js tags: trunk
22:14
OFMatrix4x4: Add #pragma GCC target("3dnow") check-in: fa3c89f802 user: js tags: trunk
20:38
Move AMD64/ELF assembly back to AT&T syntax check-in: da613d0cb5 user: js tags: trunk
Changes

Modified src/OFMatrix4x4.m from [b494f24572] to [240d8b02dd].

26
27
28
29
30
31
32




33
34
35
36
37
38
39
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43







+
+
+
+







	{ 0, 1, 0, 0 },
	{ 0, 0, 1, 0 },
	{ 0, 0, 0, 1 }
};

@implementation OFMatrix4x4
#if defined(OF_AMD64) || defined(OF_X86)
# ifndef __clang__
#  pragma GCC push_options
#  pragma GCC target("3dnow")
# endif
static void
multiplyWithMatrix_3DNow(OFMatrix4x4 *self, SEL _cmd, OFMatrix4x4 *matrix)
{
	float result[4][4];

	for (uint_fast8_t i = 0; i < 4; i++) {
		for (uint_fast8_t j = 0; j < 4; j++) {
113
114
115
116
117
118
119



120
121
122
123
124
125
126
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133







+
+
+







	    "femms"
	    :: "r"(&result), "r"(&self->_values), "r"(&vector)
	    : "mm0", "mm1", "mm2", "mm3", "mm4", "memory"
	);

	return result;
}
# ifndef __clang__
#  pragma GCC pop_options
# endif

+ (void)initialize
{
	if (self != [OFMatrix4x4 class])
		return;

	if ([OFSystemInfo supports3DNow]) {