]>
git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blob - tools/testing/selftests/powerpc/ptrace/ptrace-gpr.h
c5cd53181e2e2087e7ba386aadc0af900c067c5b
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
15 #define FPR_1_REP 0x3f50624de0000000
16 #define FPR_2_REP 0x3f60624de0000000
17 #define FPR_3_REP 0x3f689374c0000000
18 #define FPR_4_REP 0x3f70624de0000000
20 /* Buffer must have 18 elements */
21 int validate_gpr(unsigned long *gpr
, unsigned long val
)
25 for (i
= 0; i
< 18; i
++) {
27 printf("GPR[%d]: %lx Expected: %lx\n",
38 /* Buffer must have 32 elements */
39 int validate_fpr(unsigned long *fpr
, unsigned long val
)
43 for (i
= 0; i
< 32; i
++) {
45 printf("FPR[%d]: %lx Expected: %lx\n", i
, fpr
[i
], val
);
55 /* Buffer must have 32 elements */
56 int validate_fpr_float(float *fpr
, float val
)
60 for (i
= 0; i
< 32; i
++) {
62 printf("FPR[%d]: %f Expected: %f\n", i
, fpr
[i
], val
);