This repository has been archived by the owner on May 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rvp: fix wrong format in maddr32 and msubr32
- Loading branch information
1 parent
da54bac
commit 932a619
Showing
4 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
gcc/testsuite/gcc.target/riscv/rvp32_scan/builtin-rvp-mul32.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* This is a test program for maddr32, msubr32 instruction. */ | ||
/* { dg-do compile { target riscv32*-*-* } } */ | ||
/* { dg-options "-march=rv32gc_zpn -mabi=ilp32d -O0" } */ | ||
|
||
#include <rvp_intrinsic.h> | ||
#include <stdlib.h> | ||
|
||
static __attribute__ ((noinline)) | ||
int32_t madd (int32_t ra, int32_t rb, int32_t rc) | ||
{ | ||
return __rv_maddr32 (ra, rb, rc); | ||
} | ||
|
||
static __attribute__ ((noinline)) | ||
int32_t msub (int32_t ra, int32_t rb, int32_t rc) | ||
{ | ||
return __rv_msubr32 (ra, rb, rc); | ||
} | ||
|
||
/* { dg-final { scan-assembler-times "msubr32" 1 } } */ | ||
/* { dg-final { scan-assembler-times "maddr32" 1 } } */ | ||
/* { dg-final { scan-assembler-times "builtin_riscv" 0 } } */ |