]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - sim/ppc/emul_generic.c
sim: unify -Werror build settings
[thirdparty/binutils-gdb.git] / sim / ppc / emul_generic.c
index dc0b2cf1e0930ffb33f694e01ebb4a1c06920584..9d57bc6c01aec2b6c6ab6cb9e84ecd12e5930c24 100644 (file)
@@ -64,7 +64,7 @@ emul_read_gpr64(cpu *processor,
 {
   unsigned32 hi;
   unsigned32 lo;
-  if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) {
+  if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) {
     hi = cpu_registers(processor)->gpr[g];
     lo = cpu_registers(processor)->gpr[g+1];
   }
@@ -83,7 +83,7 @@ emul_write_gpr64(cpu *processor,
 {
   unsigned32 hi = EXTRACTED64(val, 0, 31);
   unsigned32 lo = EXTRACTED64(val, 32, 63);
-  if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) {
+  if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) {
     cpu_registers(processor)->gpr[g] = hi;
     cpu_registers(processor)->gpr[g+1] = lo;
   }
@@ -120,10 +120,10 @@ emul_read_string(char *dest,
 INLINE_EMUL_GENERIC void
 emul_write_status(cpu *processor,
                  int status,
-                 int errno)
+                 int err)
 {
-  if (status == -1 && errno != 0) {
-    cpu_registers(processor)->gpr[3] = errno;
+  if (status == -1 && err != 0) {
+    cpu_registers(processor)->gpr[3] = err;
     CR_SET(0, cr_i_summary_overflow);
   }
   else {
@@ -137,10 +137,10 @@ INLINE_EMUL_GENERIC void
 emul_write2_status(cpu *processor,
                   int status1,
                   int status2,
-                  int errno)
+                  int err)
 {
-  if (status1 == -1 && errno != 0) {
-    cpu_registers(processor)->gpr[3] = errno;
+  if (status1 == -1 && err != 0) {
+    cpu_registers(processor)->gpr[3] = err;
     CR_SET(0, cr_i_summary_overflow);
   }
   else {
@@ -262,12 +262,7 @@ emul_add_tree_options(device *tree,
   if (tree_find_property(tree, "/options/little-endian?"))
     little_endian = tree_find_boolean_property(tree, "/options/little-endian?");
   else {
-#ifdef bfd_little_endian       /* new bfd */
     little_endian = (image != NULL && bfd_little_endian(image));
-#else
-    little_endian = (image != NULL &&
-                    !image->xvec->byteorder_big_p);
-#endif
     tree_parse(tree, "/options/little-endian? %s",
               little_endian ? "true" : "false");
   }