thread: fix reported lr from undef-abort

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
arm32.h: make all asm statements volatile

The compiler can sometimes discard asm statements as an optimization,
adding volatile prevents that.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
bugfix cache_maintenance_l1() range selection

Bugfix for cache_maintenance_l1() which did the cache operation also
on the word following the specified area.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Fix compile errors for core_self_tests.c

* Fixes compile errors when compiling core_self_tests.c with
  debug prints
* Reduces allocation and alignment sizes in memalign() tests to work
  with a smaller heap.
* Checks that returned buffers has required alignment

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU virt and FVP)
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)