loongarch: testsuite: adapt stack-usage-1.c for LP64

LoongArch backend allocates two additional 8-byte stack slots for LP64,
one for saving $fp and another for saving the temporary value "1".
Ideally they are both unneeded, but (1) we're using -O0 so the code is
suboptimized by the nature; (2) any improvement (if possible) should be
deferred to GCC 13.  So for now simply adjust the test to make it pass.

gcc/testsuite/

	* gcc.dg/stack-usage-1.c: Adjust for LoongArch LP64.
This commit is contained in:
Xi Ruoyao 2022-04-09 01:58:40 +08:00
parent 6e34507862
commit c8f7324e81
No known key found for this signature in database
GPG Key ID: D95E4716CCBB34DC
1 changed files with 2 additions and 0 deletions

View File

@ -105,6 +105,8 @@
# define SIZE 252
#elif defined (__CRIS__)
# define SIZE 252
#elif defined (__loongarch_lp64)
# define SIZE 240 /* 256 - 8 bytes for $fp, and 8 bytes for a temp value */
#else
# define SIZE 256
#endif