From owner-svn-src-head@freebsd.org Mon Apr 16 13:52:24 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 857EBF84EB4; Mon, 16 Apr 2018 13:52:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3719185D4B; Mon, 16 Apr 2018 13:52:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3051B1E359; Mon, 16 Apr 2018 13:52:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3GDqOdL021910; Mon, 16 Apr 2018 13:52:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3GDqNtM021905; Mon, 16 Apr 2018 13:52:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201804161352.w3GDqNtM021905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 16 Apr 2018 13:52:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332563 - in head/sys: arm/include ddb mips/include powerpc/include sparc64/include X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: arm/include ddb mips/include powerpc/include sparc64/include X-SVN-Commit-Revision: 332563 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Apr 2018 13:52:24 -0000 Author: imp Date: Mon Apr 16 13:52:23 2018 New Revision: 332563 URL: https://svnweb.freebsd.org/changeset/base/332563 Log: No need to force md code to define a macro that's the same as _BYTE_ORDER. Use that instead. Modified: head/sys/arm/include/db_machdep.h head/sys/ddb/db_access.c head/sys/mips/include/db_machdep.h head/sys/powerpc/include/db_machdep.h head/sys/sparc64/include/db_machdep.h Modified: head/sys/arm/include/db_machdep.h ============================================================================== --- head/sys/arm/include/db_machdep.h Mon Apr 16 13:50:01 2018 (r332562) +++ head/sys/arm/include/db_machdep.h Mon Apr 16 13:52:23 2018 (r332563) @@ -95,7 +95,4 @@ int db_validate_address(vm_offset_t); u_int branch_taken (u_int insn, db_addr_t pc); -#ifdef __ARMEB__ -#define BYTE_MSF (1) -#endif #endif /* !_MACHINE_DB_MACHDEP_H_ */ Modified: head/sys/ddb/db_access.c ============================================================================== --- head/sys/ddb/db_access.c Mon Apr 16 13:50:01 2018 (r332562) +++ head/sys/ddb/db_access.c Mon Apr 16 13:52:23 2018 (r332563) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -51,10 +52,6 @@ static unsigned db_extend[] = { /* table for sign-exte 0xFF800000U }; -#ifndef BYTE_MSF -#define BYTE_MSF 0 -#endif - db_expr_t db_get_value(db_addr_t addr, int size, bool is_signed) { @@ -69,9 +66,9 @@ db_get_value(db_addr_t addr, int size, bool is_signed) } value = 0; -#if BYTE_MSF +#if _BYTE_ORDER == _BIG_ENDIAN for (i = 0; i < size; i++) -#else /* BYTE_LSF */ +#else /* _LITTLE_ENDIAN */ for (i = size - 1; i >= 0; i--) #endif { @@ -91,9 +88,9 @@ db_put_value(db_addr_t addr, int size, db_expr_t value char data[sizeof(int)]; int i; -#if BYTE_MSF +#if _BYTE_ORDER == _BIG_ENDIAN for (i = size - 1; i >= 0; i--) -#else /* BYTE_LSF */ +#else /* _LITTLE_ENDIAN */ for (i = 0; i < size; i++) #endif { Modified: head/sys/mips/include/db_machdep.h ============================================================================== --- head/sys/mips/include/db_machdep.h Mon Apr 16 13:50:01 2018 (r332562) +++ head/sys/mips/include/db_machdep.h Mon Apr 16 13:52:23 2018 (r332563) @@ -41,17 +41,12 @@ #include #include -#include typedef struct trapframe db_regs_t; extern db_regs_t ddb_regs; /* register state */ typedef vm_offset_t db_addr_t; /* address - unsigned */ typedef register_t db_expr_t; /* expression - signed */ - -#if BYTE_ORDER == _BIG_ENDIAN -#define BYTE_MSF (1) -#endif #define SOFTWARE_SSTEP /* Need software single step */ #define SOFTWARE_SSTEP_EMUL /* next_instr_address() emulates 100% */ Modified: head/sys/powerpc/include/db_machdep.h ============================================================================== --- head/sys/powerpc/include/db_machdep.h Mon Apr 16 13:50:01 2018 (r332562) +++ head/sys/powerpc/include/db_machdep.h Mon Apr 16 13:52:23 2018 (r332563) @@ -40,8 +40,6 @@ #define DB_ELF_SYMBOLS #define DB_ELFSIZE __ELF_WORD_SIZE -#define BYTE_MSF (1) - typedef vm_offset_t db_addr_t; /* address - unsigned */ typedef intptr_t db_expr_t; /* expression - signed */ Modified: head/sys/sparc64/include/db_machdep.h ============================================================================== --- head/sys/sparc64/include/db_machdep.h Mon Apr 16 13:50:01 2018 (r332562) +++ head/sys/sparc64/include/db_machdep.h Mon Apr 16 13:52:23 2018 (r332563) @@ -33,8 +33,6 @@ #include #include -#define BYTE_MSF (1) - typedef vm_offset_t db_addr_t; typedef long db_expr_t;