Mercurial > hg > CbC > CbC_gcc
diff gcc/config/arm/netbsd-elf.h @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
line wrap: on
line diff
--- a/gcc/config/arm/netbsd-elf.h Thu Oct 25 07:37:49 2018 +0900 +++ b/gcc/config/arm/netbsd-elf.h Thu Feb 13 11:34:05 2020 +0900 @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler, NetBSD/arm ELF version. - Copyright (C) 2002-2018 Free Software Foundation, Inc. + Copyright (C) 2002-2020 Free Software Foundation, Inc. Contributed by Wasabi Systems, Inc. This file is part of GCC. @@ -43,6 +43,7 @@ #undef ARM_DEFAULT_ABI #define ARM_DEFAULT_ABI ARM_ABI_ATPCS +#undef TARGET_OS_CPP_BUILTINS #define TARGET_OS_CPP_BUILTINS() \ do \ { \ @@ -55,7 +56,7 @@ #undef SUBTARGET_EXTRA_ASM_SPEC #define SUBTARGET_EXTRA_ASM_SPEC \ - "-matpcs %{" FPIE_OR_FPIC_SPEC ":-k}" + "%{" FPIE_OR_FPIC_SPEC ":-k}" /* Default to full VFP if -mfloat-abi=hard is specified. */ #undef SUBTARGET_ASM_FLOAT_SPEC @@ -87,13 +88,13 @@ /* We don't have any limit on the length as out debugger is GDB. */ #undef DBX_CONTIN_LENGTH -/* NetBSD does its profiling differently to the Acorn compiler. We +/* NetBSD does its profiling differently to the Acorn compiler. We don't need a word following the mcount call; and to skip it - requires either an assembly stub or use of fomit-frame-pointer when + requires either an assembly stub or use of fomit-frame-pointer when compiling the profiling functions. Since we break Acorn CC compatibility below a little more won't hurt. */ - -#undef ARM_FUNCTION_PROFILER + +#undef ARM_FUNCTION_PROFILER #define ARM_FUNCTION_PROFILER(STREAM,LABELNO) \ { \ asm_fprintf (STREAM, "\tmov\t%Rip, %Rlr\n"); \ @@ -110,22 +111,22 @@ boundary. However this causes problems with bugged NetBSD kernel code (possibly userland code as well - I have not checked every binary). The nature of this bugged code is to rely on sizeof() - returning the correct size of various structures rounded to the + returning the correct size of various structures rounded to the nearest byte (SCSI and ether code are two examples, the vm system is another). This code breaks when the structure alignment is 32 - as sizeof() will report a word=rounded size. By changing the + as sizeof() will report a word=rounded size. By changing the structure alignment to 8. GCC will conform to what is expected by NetBSD. - + This has several side effects that should be considered. 1. Structures will only be aligned to the size of the largest member. i.e. structures containing only bytes will be byte aligned. - structures containing shorts will be half word aligned. - structures containing ints will be word aligned. - + structures containing shorts will be half word aligned. + structures containing ints will be word aligned. + This means structures should be padded to a word boundary if alignment of 32 is required for byte structures etc. - + 2. A potential performance penalty may exist if strings are no longer word aligned. GCC will not be able to use word load/stores to copy short strings. @@ -137,6 +138,8 @@ #undef DEFAULT_STRUCTURE_SIZE_BOUNDARY #define DEFAULT_STRUCTURE_SIZE_BOUNDARY 8 +#define SYSARCH_ARM_SYNC_ICACHE 0 + /* Clear the instruction cache from `BEG' to `END'. This makes a call to the ARM_SYNC_ICACHE architecture specific syscall. */ #define CLEAR_INSN_CACHE(BEG, END) \ @@ -150,6 +153,6 @@ } s; \ s.addr = (unsigned int)(BEG); \ s.len = (END) - (BEG); \ - (void) sysarch (0, &s); \ + (void) sysarch (SYSARCH_ARM_SYNC_ICACHE, &s); \ } \ while (0)