diff options
| author | Anup Patel <[email protected]> | 2020-03-11 19:25:24 +0530 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2020-03-13 12:18:51 +0530 |
| commit | eeae3d95827ec33e74d853596b89ee49d83ff751 (patch) | |
| tree | f4e59fba89bf08c118d57ef5bddc806bf11c1c87 /lib | |
| parent | f92147c2b2fd01bd32debe4d6cb0375705dceeac (diff) | |
firmware: fw_base: Optimize _hartid_to_scratch() implementation
This patch optimizes _hartid_to_scratch() in following ways:
1. Use caller saved registers instead of callee saved registers
so that we don't need to save/restore registers on stack
2. Remove second redundant mul instruction by re-arranging
instructions
Overall, we reduce 9 instructions in _hartid_to_scratch()
implementation.
Signed-off-by: Anup Patel <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions
