fpsimdmacros.h (e700ac213a0f793fb4f83098413303e3dd080892) | fpsimdmacros.h (9f5848665788a0f07bc175cb2cdd06d367b7556e) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * FP/SIMD state saving and restoring macros 4 * 5 * Copyright (C) 2012 ARM Ltd. 6 * Author: Catalin Marinas <catalin.marinas@arm.com> 7 */ 8 --- 203 unchanged lines hidden (view full) --- 212.macro _sve_flush_z nz 213 _sve_check_zreg \nz 214 mov v\nz\().16b, v\nz\().16b 215.endm 216 217.macro sve_flush_z 218 _for n, 0, 31, _sve_flush_z \n 219.endm | 1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * FP/SIMD state saving and restoring macros 4 * 5 * Copyright (C) 2012 ARM Ltd. 6 * Author: Catalin Marinas <catalin.marinas@arm.com> 7 */ 8 --- 203 unchanged lines hidden (view full) --- 212.macro _sve_flush_z nz 213 _sve_check_zreg \nz 214 mov v\nz\().16b, v\nz\().16b 215.endm 216 217.macro sve_flush_z 218 _for n, 0, 31, _sve_flush_z \n 219.endm |
220.macro sve_flush_p_ffr | 220.macro sve_flush_p |
221 _for n, 0, 15, _sve_pfalse \n | 221 _for n, 0, 15, _sve_pfalse \n |
222.endm 223.macro sve_flush_ffr |
|
222 _sve_wrffr 0 223.endm 224 | 224 _sve_wrffr 0 225.endm 226 |
225.macro sve_save nxbase, xpfpsr, nxtmp | 227.macro sve_save nxbase, xpfpsr, save_ffr, nxtmp |
226 _for n, 0, 31, _sve_str_v \n, \nxbase, \n - 34 227 _for n, 0, 15, _sve_str_p \n, \nxbase, \n - 16 | 228 _for n, 0, 31, _sve_str_v \n, \nxbase, \n - 34 229 _for n, 0, 15, _sve_str_p \n, \nxbase, \n - 16 |
230 cbz \save_ffr, 921f |
|
228 _sve_rdffr 0 229 _sve_str_p 0, \nxbase 230 _sve_ldr_p 0, \nxbase, -16 | 231 _sve_rdffr 0 232 _sve_str_p 0, \nxbase 233 _sve_ldr_p 0, \nxbase, -16 |
231 | 234 b 922f 235921: 236 str xzr, [x\nxbase] // Zero out FFR 237922: |
232 mrs x\nxtmp, fpsr 233 str w\nxtmp, [\xpfpsr] 234 mrs x\nxtmp, fpcr 235 str w\nxtmp, [\xpfpsr, #4] 236.endm 237 | 238 mrs x\nxtmp, fpsr 239 str w\nxtmp, [\xpfpsr] 240 mrs x\nxtmp, fpcr 241 str w\nxtmp, [\xpfpsr, #4] 242.endm 243 |
238.macro __sve_load nxbase, xpfpsr, nxtmp | 244.macro __sve_load nxbase, xpfpsr, restore_ffr, nxtmp |
239 _for n, 0, 31, _sve_ldr_v \n, \nxbase, \n - 34 | 245 _for n, 0, 31, _sve_ldr_v \n, \nxbase, \n - 34 |
246 cbz \restore_ffr, 921f |
|
240 _sve_ldr_p 0, \nxbase 241 _sve_wrffr 0 | 247 _sve_ldr_p 0, \nxbase 248 _sve_wrffr 0 |
249921: |
|
242 _for n, 0, 15, _sve_ldr_p \n, \nxbase, \n - 16 243 244 ldr w\nxtmp, [\xpfpsr] 245 msr fpsr, x\nxtmp 246 ldr w\nxtmp, [\xpfpsr, #4] 247 msr fpcr, x\nxtmp 248.endm 249 | 250 _for n, 0, 15, _sve_ldr_p \n, \nxbase, \n - 16 251 252 ldr w\nxtmp, [\xpfpsr] 253 msr fpsr, x\nxtmp 254 ldr w\nxtmp, [\xpfpsr, #4] 255 msr fpcr, x\nxtmp 256.endm 257 |
250.macro sve_load nxbase, xpfpsr, xvqminus1, nxtmp, xtmp2 | 258.macro sve_load nxbase, xpfpsr, restore_ffr, xvqminus1, nxtmp, xtmp2 |
251 sve_load_vq \xvqminus1, x\nxtmp, \xtmp2 | 259 sve_load_vq \xvqminus1, x\nxtmp, \xtmp2 |
252 __sve_load \nxbase, \xpfpsr, \nxtmp | 260 __sve_load \nxbase, \xpfpsr, \restore_ffr, \nxtmp |
253.endm | 261.endm |