ObjFW  Diff

Differences From Artifact [88de548cfa]:

To Artifact [4ca3a2659e]:


374
375
376
377
378
379
380
















381
382
383
384
385
386
387
	      "=d" (regs.edx)
	    : "c" (ecx)
	);

	return regs;
}
#endif

















@implementation OFSystemInfo
+ (void)initialize
{
	long tmp;

	if (self != [OFSystemInfo class])







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
	      "=d" (regs.edx)
	    : "c" (ecx)
	);

	return regs;
}
#endif

#ifdef OF_LOONGARCH64
static uint32_t
cpucfg(uint32_t word)
{
	uint32_t ret;

	__asm__ (
	    "cpucfg	%0, %1"
	    : "=r" (ret)
	    : "r" (word)
	);

	return ret;
}
#endif

@implementation OFSystemInfo
+ (void)initialize
{
	long tmp;

	if (self != [OFSystemInfo class])
1023
1024
1025
1026
1027
1028
1029












1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
	    SYSTEMINFOTYPE_PPC_ALTIVEC, TAG_DONE) > 0)
		return supportsAltiVec;
# endif

	return false;
}
#endif













#ifdef OF_WINDOWS
+ (bool)isWindowsNT
{
	return !(GetVersion() & 0x80000000);
}
#endif

- (instancetype)init
{
	OF_INVALID_INIT_METHOD
}
@end







>
>
>
>
>
>
>
>
>
>
>
>













1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
	    SYSTEMINFOTYPE_PPC_ALTIVEC, TAG_DONE) > 0)
		return supportsAltiVec;
# endif

	return false;
}
#endif

#ifdef OF_LOONGARCH64
+ (bool)supportsLSX
{
	return cpucfg(2) & (1 << 6);
}

+ (bool)supportsLASX
{
	return cpucfg(2) & (1 << 7);
}
#endif

#ifdef OF_WINDOWS
+ (bool)isWindowsNT
{
	return !(GetVersion() & 0x80000000);
}
#endif

- (instancetype)init
{
	OF_INVALID_INIT_METHOD
}
@end