~ubuntu-branches/ubuntu/trusty/grub2/trusty-updates

« back to all changes in this revision

Viewing changes to lib/mips/relocator_asm.S

Tags: upstream-1.99~20101122
ImportĀ upstreamĀ versionĀ 1.99~20101122

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *  GRUB  --  GRand Unified Bootloader
3
 
 *  Copyright (C) 2009  Free Software Foundation, Inc.
4
 
 *
5
 
 *  GRUB is free software: you can redistribute it and/or modify
6
 
 *  it under the terms of the GNU General Public License as published by
7
 
 *  the Free Software Foundation, either version 3 of the License, or
8
 
 *  (at your option) any later version.
9
 
 *
10
 
 *  GRUB is distributed in the hope that it will be useful,
11
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 *  GNU General Public License for more details.
14
 
 *
15
 
 *  You should have received a copy of the GNU General Public License
16
 
 *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
17
 
 */
18
 
 
19
 
#include <grub/symbol.h>
20
 
        
21
 
        .p2align        4       /* force 16-byte alignment */
22
 
 
23
 
VARIABLE (grub_relocator32_forward_start)
24
 
        move $a0, $9
25
 
        move $a1, $10
26
 
 
27
 
copycont1:      
28
 
        lb $11,0($8)
29
 
        sb $11,0($9)
30
 
        addiu $8, $8, 0x1
31
 
        addiu $9, $9, 0x1
32
 
        addiu $10, $10, 0xffff
33
 
        bne $10, $0, copycont1
34
 
 
35
 
#include "../../kern/mips/cache_flush.S"
36
 
 
37
 
VARIABLE (grub_relocator32_forward_end)
38
 
 
39
 
VARIABLE (grub_relocator32_backward_start)
40
 
        move $a0, $9
41
 
        move $a1, $10
42
 
 
43
 
        addu $9, $9, $10
44
 
        addu $8, $8, $10
45
 
        /* Backward movsl is implicitly off-by-one.  compensate that.  */
46
 
        addiu $9, $9, 0xffff
47
 
        addiu $8, $8, 0xffff
48
 
copycont2:      
49
 
        lb $11,0($8)
50
 
        sb $11,0($9)
51
 
        addiu $8, $8, 0xffff
52
 
        addiu $9, $9, 0xffff
53
 
        addiu $10, 0xffff
54
 
        bne $10, $0, copycont2
55
 
 
56
 
#include "../../kern/mips/cache_flush.S"
57
 
 
58
 
VARIABLE (grub_relocator32_backward_end)