diff options
| author | matt <matt@NetBSD.org> | 2013-10-26 18:07:52 +0000 |
|---|---|---|
| committer | matt <matt@NetBSD.org> | 2013-10-26 18:07:52 +0000 |
| commit | 235ebe2017906b2aed723e60eb574a79c8df48bf (patch) | |
| tree | b7d448b74e3489e8e44b65bf858473023fddde2f /sys/arch/arm/include/param.h | |
| parent | 624a9f4753d6ad510d69873e6899d73ccab4782a (diff) | |
Use CPP symbols to determine the right MACHINE_ARCH
Diffstat (limited to 'sys/arch/arm/include/param.h')
| -rw-r--r-- | sys/arch/arm/include/param.h | 58 |
1 files changed, 53 insertions, 5 deletions
diff --git a/sys/arch/arm/include/param.h b/sys/arch/arm/include/param.h index 51822bffa10..16090852b2e 100644 --- a/sys/arch/arm/include/param.h +++ b/sys/arch/arm/include/param.h @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.18 2013/04/22 07:53:29 matt Exp $ */ +/* $NetBSD: param.h,v 1.19 2013/10/26 18:07:52 matt Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -80,16 +80,64 @@ # define MACHINE "arm" # ifndef __ARMEB__ # ifdef __ARM_EABI__ -# define _MACHINE_ARCH earm -# define MACHINE_ARCH "earm" +# ifdef __ARM_PCS_VFP +# ifdef _ARM_ARCH_7 +# define _MACHINE_ARCH earmv7hf +# define MACHINE_ARCH "earmv7hf" +# elif defined(_ARM_ARCH_6) +# define _MACHINE_ARCH earmv6hf +# define MACHINE_ARCH "earmv6hf" +# else +# define _MACHINE_ARCH earmhf +# define MACHINE_ARCH "earmhf" +# endif +# else +# ifdef _ARM_ARCH_7 +# define _MACHINE_ARCH earmv7 +# define MACHINE_ARCH "earmv7" +# elif defined(_ARM_ARCH_6) +# define _MACHINE_ARCH earmv6 +# define MACHINE_ARCH "earmv6" +# elif !defined(_ARM_ARCH_5T) +# define _MACHINE_ARCH earmv4 +# define MACHINE_ARCH "earmv4" +# else +# define _MACHINE_ARCH earm +# define MACHINE_ARCH "earm" +# endif +# endif # else # define _MACHINE_ARCH arm # define MACHINE_ARCH "arm" # endif # else # ifdef __ARM_EABI__ -# define _MACHINE_ARCH earmeb -# define MACHINE_ARCH "earmeb" +# ifdef __ARM_PCS_VFP +# ifdef _ARM_ARCH_7 +# define _MACHINE_ARCH earmv7hfeb +# define MACHINE_ARCH "earmv7hfeb" +# elif defined(_ARM_ARCH_6) +# define _MACHINE_ARCH earmv6hfeb +# define MACHINE_ARCH "earmv6hfeb" +# else +# define _MACHINE_ARCH earmhfeb +# define MACHINE_ARCH "earmhfeb" +# endif +# else +# ifdef _ARM_ARCH_7 +# define _MACHINE_ARCH earmv7eb +# define MACHINE_ARCH "earmv7eb" +# elif defined(_ARM_ARCH_6) +# define _MACHINE_ARCH earmv6eb +# define MACHINE_ARCH "earmv6eb" +# elif !defined(_ARM_ARCH_5T) +# define _MACHINE_ARCH earmv4eb +# define MACHINE_ARCH "earmv4eb" +# else +# define _MACHINE_ARCH earmeb +# define MACHINE_ARCH "earmeb" +# endif +# endif # else # define _MACHINE_ARCH armeb # define MACHINE_ARCH "armeb" |
