|
From: <sv...@va...> - 2012-06-08 06:59:42
|
cborntra 2012-06-08 07:59:33 +0100 (Fri, 08 Jun 2012)
New Revision: 12622
Log:
s390: also fix the memcheck testcase for cdsg regarding alignment
Modified files:
trunk/memcheck/tests/s390x/cdsg.c
trunk/memcheck/tests/s390x/cdsg.stderr.exp
Modified: trunk/memcheck/tests/s390x/cdsg.stderr.exp (+6 -6)
===================================================================
--- trunk/memcheck/tests/s390x/cdsg.stderr.exp 2012-06-08 07:59:18 +01:00 (rev 12621)
+++ trunk/memcheck/tests/s390x/cdsg.stderr.exp 2012-06-08 07:59:33 +01:00 (rev 12622)
@@ -1,10 +1,10 @@
Conditional jump or move depends on uninitialised value(s)
- at 0x........: test (cdsg.c:17)
- by 0x........: op1_undefined (cdsg.c:35)
- by 0x........: main (cdsg.c:60)
+ at 0x........: test (cdsg.c:21)
+ by 0x........: op1_undefined (cdsg.c:39)
+ by 0x........: main (cdsg.c:64)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: test (cdsg.c:17)
- by 0x........: op2_undefined (cdsg.c:45)
- by 0x........: main (cdsg.c:61)
+ at 0x........: test (cdsg.c:21)
+ by 0x........: op2_undefined (cdsg.c:49)
+ by 0x........: main (cdsg.c:65)
Modified: trunk/memcheck/tests/s390x/cdsg.c (+9 -5)
===================================================================
--- trunk/memcheck/tests/s390x/cdsg.c 2012-06-08 07:59:18 +01:00 (rev 12621)
+++ trunk/memcheck/tests/s390x/cdsg.c 2012-06-08 07:59:33 +01:00 (rev 12622)
@@ -4,15 +4,19 @@
typedef struct {
uint64_t high;
uint64_t low;
-} quad_word;
+} __attribute__((aligned(16))) quad_word;
-void
+
+/* CDSG needs quad-word alignment */
+quad_word op1, op2, op3;
+
+void
test(quad_word op1_init, quad_word op2_init, quad_word op3_init)
{
int cc; // unused
- quad_word op1 = op1_init;
- quad_word op2 = op2_init;
- quad_word op3 = op3_init;
+ op1 = op1_init;
+ op2 = op2_init;
+ op3 = op3_init;
__asm__ volatile (
"lmg %%r0,%%r1,%1\n\t"
|