RISC-V: Fix amoadd call arguments

Update __atomic_add_fetch arguments to be a pointer and value rather
than two pointers.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/amo/amo-table-a-6-amo-add-1.c: Update
	__atomic_add_fetch args.
	* gcc.target/riscv/amo/amo-table-a-6-amo-add-2.c: Ditto.
	* gcc.target/riscv/amo/amo-table-a-6-amo-add-3.c: Ditto.
	* gcc.target/riscv/amo/amo-table-a-6-amo-add-4.c: Ditto.
	* gcc.target/riscv/amo/amo-table-a-6-amo-add-5.c: Ditto.
	* gcc.target/riscv/amo/amo-table-a-6-subword-amo-add-1.c: Ditto.
	* gcc.target/riscv/amo/amo-table-a-6-subword-amo-add-2.c: Ditto.
	* gcc.target/riscv/amo/amo-table-a-6-subword-amo-add-3.c: Ditto.
	* gcc.target/riscv/amo/amo-table-a-6-subword-amo-add-4.c: Ditto.
	* gcc.target/riscv/amo/amo-table-a-6-subword-amo-add-5.c: Ditto.
	* gcc.target/riscv/amo/amo-table-ztso-amo-add-1.c: Ditto.
	* gcc.target/riscv/amo/amo-table-ztso-amo-add-2.c: Ditto.
	* gcc.target/riscv/amo/amo-table-ztso-amo-add-3.c: Ditto.
	* gcc.target/riscv/amo/amo-table-ztso-amo-add-4.c: Ditto.
	* gcc.target/riscv/amo/amo-table-ztso-amo-add-5.c: Ditto.
	* gcc.target/riscv/amo/amo-table-ztso-subword-amo-add-1.c: Ditto.
	* gcc.target/riscv/amo/amo-table-ztso-subword-amo-add-2.c: Ditto.
	* gcc.target/riscv/amo/amo-table-ztso-subword-amo-add-3.c: Ditto.
	* gcc.target/riscv/amo/amo-table-ztso-subword-amo-add-4.c: Ditto.
	* gcc.target/riscv/amo/amo-table-ztso-subword-amo-add-5.c: Ditto.
	* gcc.target/riscv/amo/amo-zaamo-preferred-over-zalrsc.c: Ditto.
	* gcc.target/riscv/amo/amo-zalrsc-amo-add-1.c: Ditto.
	* gcc.target/riscv/amo/amo-zalrsc-amo-add-2.c: Ditto.
	* gcc.target/riscv/amo/amo-zalrsc-amo-add-3.c: Ditto.
	* gcc.target/riscv/amo/amo-zalrsc-amo-add-4.c: Ditto.
	* gcc.target/riscv/amo/amo-zalrsc-amo-add-5.c: Ditto.

Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
This commit is contained in:
Patrick O'Neill
2024-06-12 11:19:12 -07:00
parent 8c944f2559
commit 6343adcef7
26 changed files with 26 additions and 26 deletions
@@ -10,7 +10,7 @@
** amoadd\.w\tzero,a1,0\(a0\)
** ret
*/
void foo (int* bar, int* baz)
void foo (int* bar, int baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_RELAXED);
}
@@ -10,7 +10,7 @@
** amoadd\.w\.aq\tzero,a1,0\(a0\)
** ret
*/
void foo (int* bar, int* baz)
void foo (int* bar, int baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_ACQUIRE);
}
@@ -10,7 +10,7 @@
** amoadd\.w\.rl\tzero,a1,0\(a0\)
** ret
*/
void foo (int* bar, int* baz)
void foo (int* bar, int baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_RELEASE);
}
@@ -10,7 +10,7 @@
** amoadd\.w\.aqrl\tzero,a1,0\(a0\)
** ret
*/
void foo (int* bar, int* baz)
void foo (int* bar, int baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_ACQ_REL);
}
@@ -10,7 +10,7 @@
** amoadd\.w\.aqrl\tzero,a1,0\(a0\)
** ret
*/
void foo (int* bar, int* baz)
void foo (int* bar, int baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_SEQ_CST);
}
@@ -4,7 +4,7 @@
/* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
/* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
void foo (short* bar, short* baz)
void foo (short* bar, short baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_RELAXED);
}
@@ -4,7 +4,7 @@
/* { dg-final { scan-assembler-times "lr.w.aq\t" 1 } } */
/* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
void foo (short* bar, short* baz)
void foo (short* bar, short baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_ACQUIRE);
}
@@ -4,7 +4,7 @@
/* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
/* { dg-final { scan-assembler-times "sc.w.rl\t" 1 } } */
void foo (short* bar, short* baz)
void foo (short* bar, short baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_RELEASE);
}
@@ -4,7 +4,7 @@
/* { dg-final { scan-assembler-times "lr.w.aq\t" 1 } } */
/* { dg-final { scan-assembler-times "sc.w.rl\t" 1 } } */
void foo (short* bar, short* baz)
void foo (short* bar, short baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_ACQ_REL);
}
@@ -4,7 +4,7 @@
/* { dg-final { scan-assembler-times "lr.w.aqrl\t" 1 } } */
/* { dg-final { scan-assembler-times "sc.w.rl\t" 1 } } */
void foo (short* bar, short* baz)
void foo (short* bar, short baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_SEQ_CST);
}
@@ -11,7 +11,7 @@
** amoadd\.w\tzero,a1,0\(a0\)
** ret
*/
void foo (int* bar, int* baz)
void foo (int* bar, int baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_RELAXED);
}
@@ -11,7 +11,7 @@
** amoadd\.w\tzero,a1,0\(a0\)
** ret
*/
void foo (int* bar, int* baz)
void foo (int* bar, int baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_ACQUIRE);
}
@@ -11,7 +11,7 @@
** amoadd\.w\tzero,a1,0\(a0\)
** ret
*/
void foo (int* bar, int* baz)
void foo (int* bar, int baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_RELEASE);
}
@@ -11,7 +11,7 @@
** amoadd\.w\tzero,a1,0\(a0\)
** ret
*/
void foo (int* bar, int* baz)
void foo (int* bar, int baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_ACQ_REL);
}
@@ -11,7 +11,7 @@
** amoadd\.w\tzero,a1,0\(a0\)
** ret
*/
void foo (int* bar, int* baz)
void foo (int* bar, int baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_SEQ_CST);
}
@@ -5,7 +5,7 @@
/* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
/* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
void foo (short* bar, short* baz)
void foo (short* bar, short baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_RELAXED);
}
@@ -5,7 +5,7 @@
/* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
/* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
void foo (short* bar, short* baz)
void foo (short* bar, short baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_ACQUIRE);
}
@@ -5,7 +5,7 @@
/* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
/* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
void foo (short* bar, short* baz)
void foo (short* bar, short baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_RELEASE);
}
@@ -5,7 +5,7 @@
/* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
/* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
void foo (short* bar, short* baz)
void foo (short* bar, short baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_ACQ_REL);
}
@@ -5,7 +5,7 @@
/* { dg-final { scan-assembler-times "lr.w.aqrl\t" 1 } } */
/* { dg-final { scan-assembler-times "sc.w.rl\t" 1 } } */
void foo (short* bar, short* baz)
void foo (short* bar, short baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_SEQ_CST);
}
@@ -11,7 +11,7 @@
** amoadd\.w\tzero,a1,0\(a0\)
** ret
*/
void foo (int* bar, int* baz)
void foo (int* bar, int baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_RELAXED);
}
@@ -13,7 +13,7 @@
** bnez\t[atx][0-9]+, 1b
** ret
*/
void foo (int* bar, int* baz)
void foo (int* bar, int baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_RELAXED);
}
@@ -13,7 +13,7 @@
** bnez\t[atx][0-9]+, 1b
** ret
*/
void foo (int* bar, int* baz)
void foo (int* bar, int baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_ACQUIRE);
}
@@ -13,7 +13,7 @@
** bnez\t[atx][0-9]+, 1b
** ret
*/
void foo (int* bar, int* baz)
void foo (int* bar, int baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_RELEASE);
}
@@ -13,7 +13,7 @@
** bnez\t[atx][0-9]+, 1b
** ret
*/
void foo (int* bar, int* baz)
void foo (int* bar, int baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_ACQ_REL);
}
@@ -13,7 +13,7 @@
** bnez\t[atx][0-9]+, 1b
** ret
*/
void foo (int* bar, int* baz)
void foo (int* bar, int baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_SEQ_CST);
}