]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Remove addr32
authorVladimir Serbinenko <phcoder@gmail.com>
Tue, 24 Dec 2013 00:11:32 +0000 (01:11 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Tue, 24 Dec 2013 00:11:32 +0000 (01:11 +0100)
acinclude.m4
config.h.in
configure.ac
grub-core/kern/i386/realmode.S
grub-core/modinfo.sh.in

index 2ce95460baf6e7c9189b3d3940243e8a32bd229a..89b17109b8c92a749469b96ec2470e4968f913c7 100644 (file)
@@ -210,77 +210,6 @@ fi
 ])
 
 
-dnl Mass confusion!
-dnl Older versions of GAS interpret `.code16' to mean ``generate 32-bit
-dnl instructions, but implicitly insert addr32 and data32 bytes so
-dnl that the code works in real mode''.
-dnl
-dnl Newer versions of GAS interpret `.code16' to mean ``generate 16-bit
-dnl instructions,'' which seems right.  This requires the programmer
-dnl to explicitly insert addr32 and data32 instructions when they want
-dnl them.
-dnl
-dnl We only support the newer versions, because the old versions cause
-dnl major pain, by requiring manual assembly to get 16-bit instructions into
-dnl asm files.
-AC_DEFUN([grub_I386_ASM_ADDR32],
-[AC_REQUIRE([AC_PROG_CC])
-AC_REQUIRE([grub_I386_ASM_PREFIX_REQUIREMENT])
-AC_MSG_CHECKING([for .code16 addr32 assembler support])
-AC_CACHE_VAL(grub_cv_i386_asm_addr32,
-[cat > conftest.s.in <<\EOF
-       .code16
-l1:    @ADDR32@        movb    %al, l1
-EOF
-
-if test "x$grub_cv_i386_asm_prefix_requirement" = xyes; then
-  sed -e s/@ADDR32@/addr32/ < conftest.s.in > conftest.s
-else
-  sed -e s/@ADDR32@/addr32\;/ < conftest.s.in > conftest.s
-fi
-
-if AC_TRY_COMMAND([${CC-cc} ${TARGET_CCASFLAGS} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then
-  grub_cv_i386_asm_addr32=yes
-else
-  grub_cv_i386_asm_addr32=no
-fi
-
-rm -f conftest*])
-
-AC_MSG_RESULT([$grub_cv_i386_asm_addr32])])
-
-dnl Later versions of GAS requires that addr32 and data32 prefixes
-dnl appear in the same lines as the instructions they modify, while
-dnl earlier versions requires that they appear in separate lines.
-AC_DEFUN([grub_I386_ASM_PREFIX_REQUIREMENT],
-[AC_REQUIRE([AC_PROG_CC])
-AC_MSG_CHECKING(dnl
-[whether addr32 must be in the same line as the instruction])
-AC_CACHE_VAL(grub_cv_i386_asm_prefix_requirement,
-[cat > conftest.s <<\EOF
-       .code16
-l1:    addr32  movb    %al, l1
-EOF
-
-if AC_TRY_COMMAND([${CC-cc} ${TARGET_CCASFLAGS} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then
-  grub_cv_i386_asm_prefix_requirement=yes
-else
-  grub_cv_i386_asm_prefix_requirement=no
-fi
-
-rm -f conftest*])
-
-if test "x$grub_cv_i386_asm_prefix_requirement" = xyes; then
-  grub_tmp_addr32="addr32"
-else
-  grub_tmp_addr32="addr32;"
-fi
-
-ADDR32=$grub_tmp_addr32
-
-AC_MSG_RESULT([$grub_cv_i386_asm_prefix_requirement])])
-
-
 dnl Check what symbol is defined as a bss start symbol.
 dnl Written by Michael Hohmoth and Yoshinori K. Okuji.
 AC_DEFUN([grub_CHECK_BSS_START_SYMBOL],
index 229cfb89c8dd03b3ced8da9e87882339d4ae193b..d93b687dcbccaf84de4eaa58ac19ba6ac176229f 100644 (file)
@@ -31,8 +31,6 @@
 #define HAVE_FONT_SOURCE @HAVE_FONT_SOURCE@
 /* Define if C symbols get an underscore after compilation. */
 #define HAVE_ASM_USCORE @HAVE_ASM_USCORE@
-/* Define it to \"addr32\" or \"addr32;\" to make GAS happy.  */
-#define ADDR32 @ADDR32@
 /* Define it to one of __bss_start, edata and _edata.  */
 #define BSS_START_SYMBOL @BSS_START_SYMBOL@
 /* Define it to either end or _end.  */
index 1f70a02148993638efc7ef3c4c4076106cc9633d..b25304f4246bdb9ba603cb4cee6ec5bcf2928601 100644 (file)
@@ -1046,8 +1046,6 @@ if test "x$target_cpu" = xi386; then
     grub_CHECK_END_SYMBOL
   fi
   CFLAGS="$TARGET_CFLAGS"
-  grub_I386_ASM_PREFIX_REQUIREMENT
-  grub_I386_ASM_ADDR32
 fi
 
 grub_PROG_NM_WORKS
@@ -1568,7 +1566,6 @@ AS_IF([test x$target_cpu = xi386 -a x$platform = xqemu],
            [AC_SUBST([GRUB_BOOT_MACHINE_LINK_ADDR], 0xffe00)])
 
 AC_SUBST(HAVE_ASM_USCORE)
-AC_SUBST(ADDR32)
 AC_SUBST(BSS_START_SYMBOL)
 AC_SUBST(END_SYMBOL)
 AC_SUBST(PACKAGE)
index 3eb85d7a346dc86c1373082f9028c9d3caa6a02c..1384d5220b193c82f5bd4e991f1a2edffbf29e06 100644 (file)
@@ -137,7 +137,7 @@ real_to_prot:
        /* load the GDT register */
        xorw    %ax, %ax
        movw    %ax, %ds
-       ADDR32  lgdtl   gdtdesc
+       lgdtl   gdtdesc
 
        /* turn on protected mode */
        movl    %cr0, %eax
index ac1db7cde5de1083dfc65d115f5156fd0091dc1e..ebe93bb9f869825c554d193765820b08aa07c7d2 100644 (file)
@@ -9,7 +9,6 @@ grub_have_font_source=@HAVE_FONT_SOURCE@
 
 # Autodetected config
 grub_have_asm_uscore=@HAVE_ASM_USCORE@
-grub_i8086_addr32="@ADDR32@"
 grub_bss_start_symbol="@BSS_START_SYMBOL@"
 grub_end_symbol="@END_SYMBOL@"