]> git.eshelyaron.com Git - emacs.git/commitdiff
* exec/loader-mips64el.s (rest_of_exec): Deal with assembler bugs.
authorPo Lu <luangruo@yahoo.com>
Tue, 15 Apr 2025 09:11:56 +0000 (17:11 +0800)
committerEshel Yaron <me@eshelyaron.com>
Wed, 16 Apr 2025 07:34:45 +0000 (09:34 +0200)
(cherry picked from commit 19b6e36a22513b437b86d4b6418ce31f551902cc)

exec/loader-mips64el.s

index be978d8b18b86feee7a7af051b69800d014be09d..cab80d5e19f3bec57077ffd05b891e94f5d17b09 100644 (file)
@@ -175,13 +175,15 @@ rest_of_exec:
        dadd    $s1, $s1, $t0           # s1 = start of envp
 skip_environ:
        /* Locate the auxiliary vector.  */
+       li      $t8, 8                  # DADDI2 isn't appropriate in delay slots.
 1:     ld      $t0, ($s1)              # t0 = *s1
        bnez    $t0, 1b                 # skip environment entry
-       daddi   $s1, $s1, 8             # s1++
+       dadd    $s1, $s1, $t8           # s1++
        move    $s2, $s1                # s2 = end of environment
+       li      $t8, 16
 1:     ld      $t0, ($s1)              # t0 = s1->a_type
        bnez    $t0, 1b                 # skip auxiliary vector entry
-       daddi   $s1, $s1, 16            # (Elf64_auxv_t *) s1++
+       dadd    $s1, $s1, $t8           # (Elf64_auxv_t *) s1++
        /* Decide how many bytes must be copied and where to
           save the file name.  Move the stack pointer to a safe
           position below any data that must be preserved.  */