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 <sys/param.h>
 #include <sys/kdb.h>
+#include <sys/endian.h>
 
 #include <ddb/ddb.h>
 #include <ddb/db_access.h>
@@ -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 <machine/frame.h>
 #include <machine/trap.h>
-#include <machine/endian.h>
 
 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 <machine/frame.h>
 #include <machine/trap.h>
 
-#define        BYTE_MSF        (1)
-
 typedef vm_offset_t    db_addr_t;
 typedef long           db_expr_t;
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to