URL
https://opencores.org/ocsvn/plasma/plasma/trunk
[/] [plasma/] [trunk/] [tools/] [boot.asm] - Diff between revs 194 and 200
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 194 |
Rev 200 |
Line 14... |
Line 14... |
.globl entry
|
.globl entry
|
.ent entry
|
.ent entry
|
entry:
|
entry:
|
.set noreorder
|
.set noreorder
|
|
|
#These eight instructions must be the first instructions.
|
#These eight instructions should be the first instructions.
|
#convert.exe will correctly initialize $gp, .sbss_start, .bss_end, $sp
|
#convert.exe previously initialized $gp, .sbss_start, .bss_end, $sp
|
lui $gp, 0
|
la $gp, _gp #initialize stack pointer
|
ori $gp, $gp, 0 #initialize $gp
|
la $4, __bss_start #$4 = .sbss_start
|
lui $4, 0
|
la $5, _end #$5 = .bss_end
|
ori $4, $4, 0 #$4 = .sbss_start
|
la $sp, InitStack+488 #initialize stack pointer
|
lui $5, 0
|
|
ori $5, $5, 0 #$5 = .bss_end
|
|
lui $sp, 0
|
|
ori $sp, $sp, 0xfff0 #initialize stack pointer
|
|
|
|
$BSS_CLEAR:
|
$BSS_CLEAR:
|
sw $0, 0($4)
|
sw $0, 0($4)
|
slt $3, $4, $5
|
slt $3, $4, $5
|
bnez $3, $BSS_CLEAR
|
bnez $3, $BSS_CLEAR
|
Line 49... |
Line 45... |
.set noreorder
|
.set noreorder
|
.set noat
|
.set noat
|
|
|
#Registers $26 and $27 are reserved for the OS
|
#Registers $26 and $27 are reserved for the OS
|
#Save all temporary registers
|
#Save all temporary registers
|
|
#Slots 0($29) through 12($29) reserved for saving a0-a3
|
addi $29, $29, -104 #adjust sp
|
addi $29, $29, -104 #adjust sp
|
sw $1, 16($29) #at
|
sw $1, 16($29) #at
|
sw $2, 20($29) #v0
|
sw $2, 20($29) #v0
|
sw $3, 24($29) #v1
|
sw $3, 24($29) #v1
|
sw $4, 28($29) #a0
|
sw $4, 28($29) #a0
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.