tests/tcg/xtensa: support configurations w/o vecbase
commit906da882911415b493378ed1f8d7925d1871a02e
authorMax Filippov <jcmvbkbc@gmail.com>
Mon, 18 Feb 2019 14:04:51 +0000 (18 06:04 -0800)
committerMax Filippov <jcmvbkbc@gmail.com>
Thu, 28 Feb 2019 12:43:22 +0000 (28 04:43 -0800)
treeea6794d5efa03fabc6e2d6d425e9514889f24b91
parent0ed040db363bd61bf70f9a464e98229095788bc4
tests/tcg/xtensa: support configurations w/o vecbase

Configurations w/o vecbase may have vectors not grouped together and not
in fixed order. They may not always be grouped into single output
sections by assigning next offset to dot, as it may sometimes move dot
backwards and sometimes they may even belong to different memory region.
Don't group vectors into single output section. Instead put each vector
into its own section ant put it at its default virtual address.
Reserve 4KBytes from the default vectors base and put rest of the code
and data starting from there. Mark vectors sections as executable,
otherwise their contents is discarded. There may be as little as 16
bytes reserved for some vectors, load handler address into a0 and use
ret.n to jump there to make vector code fit into this 16 byte space.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
tests/tcg/xtensa/Makefile
tests/tcg/xtensa/linker.ld.S
tests/tcg/xtensa/vectors.S