From 09de0738de7b607b22fe914efc8741141821ddba Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Thu, 16 Jan 2025 19:44:28 +1100 Subject: [PATCH] tests/trace: Add checks for SIAR and SDAR being set correctly Signed-off-by: Paul Mackerras --- tests/test_trace.bin | Bin 12348 -> 12492 bytes tests/trace/trace.c | 12 ++++++++++++ 2 files changed, 12 insertions(+) diff --git a/tests/test_trace.bin b/tests/test_trace.bin index 9ad843bdfd2582c39f0f03c773e4481590844869..8139a81460205a9dffaca390cc4aa1569758e21e 100755 GIT binary patch delta 1080 zcmb7CT}V@582-L(N1dWfn3SlvU$^Og>Blo2=mK%&MG9UhBu=N&g^7m5>lMLUOa>b-23x??O>Wn`^3<0&9J2nIueeFMwjQQ+u%j%ly88}plpUf?6AoJ@rDNc;U!X~NWVe;1 z4n#zfFb%eSWew8$>$rv_#B<0Q>kQn7d`Epe6_!Om<4#{djW;mdA&U-0^ZQM7%3`6S z1=M0h7PX4bK>Z1I`g_N|Kql(RE?HbubQWrNu|! zG)s)7pvk?Z)q;Ox05OctOMH@0USodn=tb2f+MJz7cD;C>5zIlGpX)-jEN_0!fM@y< zI#_U(3S-EwaHf5NOk81XnoorRmqxpa&aC1T3B{BU2@bl8gaES7Fou{d0CVXyDJ3yh24FL4iR%b>|ZHvWH@X#$?Ox zL(z!Ev50yKRD9^cVK2f0eF*}42qxrPMn0@RCS?!h=-0V=eToizxu4JBp2Oj{lB(+E zF{)I?S3BXpe9*0t0DIv~=RY<>M^J)0q8AidfwJW5@Lk}2B3Wm|@k&pSTZ|H&jqPj{ zTED?fIYygdQzE9F}^lr3v~BmZcc2!dK}Y zt;0C(alnjxTkZYAhX^4$X^|sdGO5klPE2?S?;~di^5}z4LNA zfi8|1tle?}{T;f?@+S0h+F-x_?9DsTwW|iJTYdn23w_OU7kX*bV6QEA6Wz|XM;AuA zp4f%bch2X5s%>r&U$!6P`vH&CqfI*E^Ia4SL=CQ~ox&Va%_P?fQs$>M+ajWEVYYWW z>#ASyQbLMA<9;ED)PMleFw!X)jE99HQVz0lS(rnbf`{0vA-#uX>@|>*P)Aa1giJ$g z;&}A@Z_dp-%<^EmF-zDh;@7MQM#FSNHW5qeJDi&xv&_GXm>l-HakE)wZwgataGo(6 GSbqV0m-@T_ diff --git a/tests/trace/trace.c b/tests/trace/trace.c index 764b3dd..e7d58ba 100644 --- a/tests/trace/trace.c +++ b/tests/trace/trace.c @@ -16,6 +16,8 @@ extern unsigned long callit(unsigned long arg1, unsigned long arg2, #define SPRG0 272 #define SPRG1 273 #define CIABR 187 +#define SIAR 780 +#define SDAR 781 static inline unsigned long mfmsr(void) { @@ -80,6 +82,8 @@ int trace_test_1(void) return ret + 2; if (regs[0] != 3 || regs[1] != 2) return 3; + if (mfspr(SIAR) != (unsigned long)&test1) + return 4; return 0; } @@ -98,6 +102,8 @@ int trace_test_2(void) return ret + 2; if (regs[0] != 3 || x != 3) return 3; + if (mfspr(SIAR) != (unsigned long)&test2 || mfspr(SDAR) != (unsigned long)&x) + return 4; return 0; } @@ -116,6 +122,8 @@ int trace_test_3(void) return ret + 2; if (regs[0] != 11 || x != 11) return 3; + if (mfspr(SIAR) != (unsigned long)&test3 || mfspr(SDAR) != (unsigned long)&x) + return 4; return 0; } @@ -169,6 +177,8 @@ int trace_test_6(void) return ret + 2; if (regs[0] != 11 || regs[1] != 55) return 3; + if (mfspr(SIAR) != (unsigned long)&test6 + 8) + return 4; return 0; } @@ -186,6 +196,8 @@ int trace_test_7(void) return ret + 2; if (regs[0] != 11 || regs[1] != 1) return 3; + if (mfspr(SIAR) != (unsigned long)&test7 + 8) + return 4; return 0; }