]> git.lizzy.rs Git - plan9front.git/commitdiff
pc, pc64: fix off by one error in _multibootentry
authorcinap_lenrek <cinap_lenrek@felloff.net>
Mon, 18 Aug 2014 01:16:11 +0000 (03:16 +0200)
committercinap_lenrek <cinap_lenrek@felloff.net>
Mon, 18 Aug 2014 01:16:11 +0000 (03:16 +0200)
sys/src/9/pc/l.s
sys/src/9/pc64/l.s

index 0808bd5c268b163724ebdea4f28b93dae6f3ea21..663107e7a4b7ebe6fe919bdff9ae5f064abafe81 100644 (file)
@@ -67,9 +67,9 @@ TEXT _multibootentry(SB), $0
        SUBL    DI, CX
        ADDL    CX, SI
        ADDL    CX, DI
+       INCL    CX      /* one more for post decrement */
        STD
        REP; MOVSB
-       CLD
        ADDL    $KZERO, BX
        MOVL    BX, multiboot-KZERO(SB)
        MOVL    $_startPADDR(SB), AX
index f4c066a3c87a6a6cf710af42035f67e3a0cea28f..78171a1147b40de2ecfb24969acb634e4d1aa949 100644 (file)
@@ -62,9 +62,9 @@ TEXT _multibootentry<>(SB), 1, $-4
        SUBL    DI, CX
        ADDL    CX, SI
        ADDL    CX, DI
+       INCL    CX      /* one more for post decrement */
        STD
        REP; MOVSB
-       CLD
        MOVL    BX, multibootptr-KZERO(SB)
        MOVL    $_protected<>-KZERO(SB), AX
        JMP*    AX