]> git.baikalelectronics.ru Git - uboot.git/commit
armv8: shrink exception table code
authorAndre Przywara <andre.przywara@arm.com>
Mon, 27 Nov 2017 00:47:09 +0000 (00:47 +0000)
committerTom Rini <trini@konsulko.com>
Mon, 4 Dec 2017 14:59:02 +0000 (09:59 -0500)
commit10016fccc4e0b927b90be3a00d69075a56f7e52d
tree01f9799164ebc662da9d956fdc643219e6306c00
parent387996b3dbaa7ae073ea294931dc2ae8de4662dd
armv8: shrink exception table code

In the moment our exception entry code needs 34 instructions, so we
can't use put it directly into the table entry, which offers "only"
32 instructions there. Right now we just put an unconditional branch
there, then use a macro to place the 34 instructions *per entry* after
that. That effectivly doubles the size of our exception table, which
is quite a waste, given that we use it mostly for debugging purposes.

Since the register saving part is actually identical, let's just convert
that macro into a function, and "bl" into it directly from the exception
slot, of course after having saved at least the original LR.
This saves us about 950 bytes of code, which is quite a relief for some
tight SPLs, in particular the 64-bit Allwinner ones.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
arch/arm/cpu/armv8/exceptions.S