Searched hist:"921 af96fc6a21c892b42aaeca173ce0cc44e0f84" (Results 1 – 2 of 2) sorted by relevance
| /optee_os/core/arch/riscv/include/ |
| H A D | encoding.h | 921af96fc6a21c892b42aaeca173ce0cc44e0f84 Wed May 10 05:41:09 UTC 2023 Alvin Chang <alvinga@andestech.com> core: riscv: Refactor macros for inline assembly of CSR operations
Current CSR macros with inline assembly will lead to compilation error, because they use pre-processor stringizing not value substitution. The definitions such as CSR_XSTATUS are not sustituted to CSR encoding in CSR macros and compiler generates: Error: unknown CSR `CSR_XSTATUS'.
This patch fixes it by making the given CSR to be an assembly input operand with constraint "i", which is used to indicate the operand is an immediate integer operand. Thus, the CSR encoding can be correctly compiled.
Signed-off-by: Alvin Chang <alvinga@andestech.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
|
| H A D | riscv.h | 921af96fc6a21c892b42aaeca173ce0cc44e0f84 Wed May 10 05:41:09 UTC 2023 Alvin Chang <alvinga@andestech.com> core: riscv: Refactor macros for inline assembly of CSR operations
Current CSR macros with inline assembly will lead to compilation error, because they use pre-processor stringizing not value substitution. The definitions such as CSR_XSTATUS are not sustituted to CSR encoding in CSR macros and compiler generates: Error: unknown CSR `CSR_XSTATUS'.
This patch fixes it by making the given CSR to be an assembly input operand with constraint "i", which is used to indicate the operand is an immediate integer operand. Thus, the CSR encoding can be correctly compiled.
Signed-off-by: Alvin Chang <alvinga@andestech.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
|