summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Oshmyan <chortos@inbox.lv>2021-09-18 23:36:17 +0300
committerOleg Oshmyan <chortos@inbox.lv>2022-02-12 19:40:24 +0200
commitfe296cb5930d12b323237089bd2da42de1790ae0 (patch)
tree44e2dc6582a75c33637b85a55c8d84884004391b
parentc809820d6d24192e61f53702c9e13ed6b7f13a48 (diff)
downloadlibass-fe296cb5930d12b323237089bd2da42de1790ae0.tar.bz2
libass-fe296cb5930d12b323237089bd2da42de1790ae0.tar.xz
build: use `X86` as the generic name for whole x86 family
Currently, we use `INTEL` to denote any supported x86 variant and `X64` to denote specifically x86-64 (and previously used `X86` to denote 32-bit x86). `INTEL` is a subpar name for two reasons: * Intel has produced notable non-x86 architectures (Itanium). * x86-64 was designed and patented not by Intel but by AMD. This is currently only used in configure.ac and Makefile.am, so it does not matter much. However, the next commit will expose a config.h macro flagging the whole x86 family, which non-Autotools users will have to set manually, so this will cease being a purely internal choice and will start confusing users. Instead, the most generic name for the whole family that is in common use and does not suffer from such problems is "x86", so use `X86`. The switch is slightly complicated by the fact our configure.ac and Makefile.am used to use `X86` as in Microsoft's naming scheme, where "x86" means "32-bit x86". Ideally, we would use another equally good name for the family that is free from this ambiguity; however, I know no such name. (Indeed, `X86` as a name for 32-bit x86 is problematic even if one disregards x86-64, because 16-bit x86 exists as well. This commit technically leaves configure.ac to lie about 16-bit x86 by setting `X86=false`, but we have no 16-bit assembler code, so the new use of `X86` should be viewed as a name for "any *supported* variant of x86".) To somewhat highlight that we're no longer using Microsoft's scheme, also switch the name for the x86-64 architecture from `X64` to `X86_64`. This should also make it more intuitively obvious that one (X86_64) is a subset of the other (X86). This is also a more standard name with a clearer etymology, and we already use this name in our `ASFLAGS`.
-rw-r--r--configure.ac18
-rw-r--r--libass/Makefile.am8
-rw-r--r--libass/x86/cpuid.h4
3 files changed, 15 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index c84a260..7186578 100644
--- a/configure.ac
+++ b/configure.ac
@@ -214,34 +214,34 @@ can_asm=false
AS_IF([test "x$enable_asm" != xno], [
AS_CASE([$host],
[i?86-*], [
- INTEL=true
AS=nasm
+ X86=true
BITS=32
BITTYPE=32
ASFLAGS="$ASFLAGS -DARCH_X86_64=0"
],
[x86_64-*-gnux32|amd64-*-gnux32], [
AS=nasm
- INTEL=true
- X64=true
+ X86=true
+ X86_64=true
BITS=64
BITTYPE=x32
ASFLAGS="$ASFLAGS -DARCH_X86_64=1"
],
[x86_64-*|amd64-*], [
AS=nasm
- INTEL=true
- X64=true
+ X86=true
+ X86_64=true
BITS=64
BITTYPE=64
ASFLAGS="$ASFLAGS -DARCH_X86_64=1"
],
[ # default
- INTEL=false
+ X86=false
AC_MSG_NOTICE([Assembly optimizations are not yet supported on this architecture; disabling.])
]
)
- AS_IF([test "x$INTEL" = xtrue], [
+ AS_IF([test "x$X86" = xtrue], [
AC_CHECK_PROG([nasm_check], [$AS], [yes])
AS_IF([test "x$nasm_check" != xyes], [
AC_MSG_WARN(nasm was not found; ASM functions are disabled.)
@@ -306,8 +306,8 @@ AC_SUBST([PKG_REQUIRES_PRIVATE], [${pkg_requires}])
## Setup conditionals for use in Makefiles
AM_CONDITIONAL([ASM], [test "x$can_asm" = xtrue])
-AM_CONDITIONAL([INTEL], [test "x$INTEL" = xtrue])
-AM_CONDITIONAL([X64], [test "x$X64" = xtrue])
+AM_CONDITIONAL([X86], [test "x$X86" = xtrue])
+AM_CONDITIONAL([X86_64], [test "x$X86_64" = xtrue])
AM_CONDITIONAL([ENABLE_LARGE_TILES], [test "x$enable_large_tiles" = xyes])
diff --git a/libass/Makefile.am b/libass/Makefile.am
index 207fe27..a088130 100644
--- a/libass/Makefile.am
+++ b/libass/Makefile.am
@@ -14,8 +14,8 @@ nasm_verbose_0 = @echo " NASM " $@;
.asm.lo:
$(nasm_verbose)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(top_srcdir)/ltnasm.sh $(AS) $(ASFLAGS) -I$(srcdir)/ -Dprivate_prefix=ass -o $@ $<
-SRC_INTEL = x86/rasterizer.asm x86/blend_bitmaps.asm x86/be_blur.asm x86/blur.asm x86/cpuid.asm \
- x86/cpuid.h
+SRC_X86 = x86/rasterizer.asm x86/blend_bitmaps.asm x86/be_blur.asm x86/blur.asm x86/cpuid.asm \
+ x86/cpuid.h
SRC_FONTCONFIG = ass_fontconfig.c ass_fontconfig.h
SRC_DIRECTWRITE = ass_directwrite.c ass_directwrite.h ass_directwrite_info_template.h dwrite_c.h
@@ -48,8 +48,8 @@ libass_la_SOURCES += $(SRC_CORETEXT)
endif
if ASM
-if INTEL
-libass_la_SOURCES += $(SRC_INTEL)
+if X86
+libass_la_SOURCES += $(SRC_X86)
endif
endif
diff --git a/libass/x86/cpuid.h b/libass/x86/cpuid.h
index 59467bc..ab50292 100644
--- a/libass/x86/cpuid.h
+++ b/libass/x86/cpuid.h
@@ -16,8 +16,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifndef INTEL_CPUID_H
-#define INTEL_CPUID_H
+#ifndef LIBASS_X86_CPUID_H
+#define LIBASS_X86_CPUID_H
#include <stdint.h>