Back to Raspberry Pi Os

To use FP/SIMD registers

exercises/lesson04/3/avenito/README.md

latest1.2 KB
Original Source

To use FP/SIMD registers

Remove the "-mgeneral-regs-only" option in Makefile.

FD/SIMD Registers

To use these registers, first of all (as in the Exercise 2 - Lesson 2) we have to use the 'cpacr_el1'. See 'boot.S'.

To switch the tasks we have to store and restore as exactly as we do to the CPU registers.

ARM Architecture Reference Manual ARMv8, for ARMv8-A architecture profile, available here, page 146 describes the 32 registers in the SIMD and floating-point register file, V0-V31.

ARM Cortex-A53 MPCore Processor Advanced SIMD and Floating-point Extension, available here, page 14 describes the processor Advanced SIMD and Floating-point system registers.

To save and restore the FP/SIMD registers

  1. Add a struct to save the registers in 'sched.h': 32 x 128 bits to V0-V31 + Floating-point Control Register (FPCR) + Floating-point Status Register (FPSR).
  2. Change also in INIT_TASK.
  3. Add code to store and restore the FP/SIMD register in 'sched.S'.