| 9de8272e | 25-Mar-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
Remove deprecated ldm/stm instructions
Some uses of SP, PC and LR in the register list of Load/Store Multiple instructions is forbidden (Thumb) or deprecated (ARM) as per the ARM ARM DDI 0406 C.d. F
Remove deprecated ldm/stm instructions
Some uses of SP, PC and LR in the register list of Load/Store Multiple instructions is forbidden (Thumb) or deprecated (ARM) as per the ARM ARM DDI 0406 C.d. For the LDM instructions, SP should not be in the list, and the list should not contain both PC and LR. See sections:
[A8.8.58] LDM/LDMIA/LDMFD (Thumb) [A8.8.59] LDM/LDMIA/LDMFD (ARM) [A8.8.60] LDMDA/LDMFA [A8.8.61] LDMDB/LDMEA [A8.8.62] LDMIB/LDMED
For the STM instructions, neither SP nor PC should be in the list. See sections:
[A8.8.200] STM (STMIA, STMEA) [A8.8.201] STMDA (STMED) [A8.8.202] STMDB (STMFD) [A8.8.203] STMIB (STMFA)
Clang warns on the deprecated constructs. Use ldr/str instead.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b6d69a43 | 25-Mar-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutils: ctype.h: do not define functions as builtins
Our <ctype.h> defines a number of functions as macros that evaluate to the builtin function of the same name, for instance:
#define isalpha(_
libutils: ctype.h: do not define functions as builtins
Our <ctype.h> defines a number of functions as macros that evaluate to the builtin function of the same name, for instance:
#define isalpha(__c) __builtin_isalpha(__c)
There are two problems with this:
1. It gets in the way of the application developer and makes some compiler flags irrelevant (-fno-builtin*, [1]). 2. Different compilers do not support the same set of builtin functions so having the defines can result in build errors.
Therefore, user regular prototypes in <ctype.h>. Also build libutils without the -ffreestanding flag because it implies -fno-builtin and therefore may needlessly disable optimizations. The libutils environment cannot be considered "free standing" since it implements the standard header files with the expected semantics.
Our implementations of the <ctypes.h> functions (isalnum(), isalpha(), etc.) are defined with the __builtin_ prefix. This is not needed and is arguably wrong. Indeed, we want the functions in libutils to be present without the prefix, which GCC happens to be doing regardless. However, this __builtin_ prefix in the .c files makes things more complicated to support Clang. Therefore, remove it.
Link: [1] https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html (-fno-builtin) Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b1f3797d | 06-Feb-2019 |
Volodymyr Babchuk <vlad.babchuk@gmail.com> |
bget: fix nex_ pool building with disabled stats
gen_malloc_reset_stats() and gen_malloc_get_stats() are only available when BufStats is defined.
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmai
bget: fix nex_ pool building with disabled stats
gen_malloc_reset_stats() and gen_malloc_get_stats() are only available when BufStats is defined.
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 386fc264 | 05-Feb-2018 |
Volodymyr Babchuk <vlad.babchuk@gmail.com> |
bget_malloc: add nex_malloc pool
If virtualization enabled, this pool will be used to allocate memory for OP-TEE nexus needs. Without virtualization, generic malloc pool will be used.
Signed-off-by
bget_malloc: add nex_malloc pool
If virtualization enabled, this pool will be used to allocate memory for OP-TEE nexus needs. Without virtualization, generic malloc pool will be used.
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 741b437f | 05-Feb-2018 |
Volodymyr Babchuk <vlad.babchuk@gmail.com> |
bget_malloc: hold all malloc state in malloc_ctx structure
This patch moves all bget_malloc.c state into malloc_ctx structure. malloc_lock.c is removed because spinlock now is also stored in malloc_
bget_malloc: hold all malloc state in malloc_ctx structure
This patch moves all bget_malloc.c state into malloc_ctx structure. malloc_lock.c is removed because spinlock now is also stored in malloc_ctx.
Multiple malloc pools can be used now.
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|