Reworked VC4 relocations and some of the instruction encoding to be actually correct. Now generating what could be real code!

--HG--
branch : dtrg-videocore
This commit is contained in:
David Given
2013-05-21 23:17:30 +01:00
parent 1312fe298b
commit 5e9102955c
4 changed files with 187 additions and 53 deletions

View File

@@ -16,6 +16,10 @@
.sect .text
begtext:
lea r15, begtext
st sp, .returnsp
st lr, .returnlr
#if 0
! Wipe the bss. (I'm a little suprised that __m_a_i_n doesn't do this.)
@@ -33,6 +37,12 @@ begtext:
#endif
b __m_a_i_n
.define __exit
__exit:
ld sp, .returnsp
ld lr, .returnlr
b lr
! Define symbols at the beginning of our various segments, so that we can find
! them. (Except .text, which has already been done.)
@@ -47,3 +57,9 @@ begtext:
.comm .trppc, 4
.comm .ignmask, 4
.comm _errno, 4
! We store the stack pointer and return address on entry so that we can
! cleanly exit.
.comm .returnsp, 4
.comm .returnlr, 4