lib/tests: Take RISC-V into account in size conditionals.
* lib/tests/scaffold/76-pointer-arithmetic.c (main): Use the right sizes in the test for RISC-V architectures. * lib/tests/scaffold/7k-for-each-elem.c (main): Same. * lib/tests/scaffold/85-sizeof.c: Same.
This commit is contained in:
parent
04e6fdad13
commit
9d7360cca6
|
@ -1,6 +1,7 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2021 W. J. van der Laan <laanwj@protonmail.com>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -56,10 +57,10 @@ main ()
|
|||
oputs (itoa (foo_size));
|
||||
oputs ("\n");
|
||||
// FIXME: add *14, *18
|
||||
#if __i386__ || __arm__
|
||||
#if __i386__ || __arm__ || __riscv_xlen == 32
|
||||
int foo_size_14 = 224;
|
||||
int foo_size_18 = 288;
|
||||
#elif __x86_64__
|
||||
#elif __x86_64__ || __riscv_xlen == 64
|
||||
int foo_size_14 = 336;
|
||||
int foo_size_18 = 432;
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2021 W. J. van der Laan <laanwj@protonmail.com>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -47,11 +48,11 @@ struct section section;
|
|||
int
|
||||
main ()
|
||||
{
|
||||
#if __i386__ || __arm__
|
||||
#if __i386__ || __arm__ || __riscv_xlen == 32
|
||||
int sym_size = 8;
|
||||
#elif __GNUC__ && __x86_64__
|
||||
#elif __GNUC__ && (__x86_64__ || __riscv_xlen == 64)
|
||||
int sym_size = 16;
|
||||
#elif __MESC__ && __x86_64__
|
||||
#elif __MESC__ && (__x86_64__ || __riscv_xlen == 64)
|
||||
int sym_size = 12;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2021 W. J. van der Laan <laanwj@protonmail.com>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -34,11 +35,11 @@ struct bar
|
|||
};
|
||||
};
|
||||
|
||||
#if __i386__ || __arm__
|
||||
#if __i386__ || __arm__ || __riscv_xlen == 32
|
||||
#define ptr_size 4
|
||||
#define foo_size 20
|
||||
#define bar_size 12
|
||||
#elif __x86_64__
|
||||
#elif __x86_64__ || __riscv_xlen == 64
|
||||
#define ptr_size 8
|
||||
#define foo_size 24
|
||||
#define bar_size 12
|
||||
|
|
Loading…
Reference in a new issue