| OLD | NEW |
| 1 /* s390-dis.c -- Disassemble S390 instructions | 1 /* s390-dis.c -- Disassemble S390 instructions |
| 2 Copyright 2000, 2001, 2002, 2003, 2005, 2007, 2008, 2012 | 2 Copyright 2000, 2001, 2002, 2003, 2005, 2007, 2008, 2012 |
| 3 Free Software Foundation, Inc. | 3 Free Software Foundation, Inc. |
| 4 Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). | 4 Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). |
| 5 | 5 |
| 6 This file is part of the GNU opcodes library. | 6 This file is part of the GNU opcodes library. |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or modify | 8 This library is free software; you can redistribute it and/or modify |
| 9 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
| 10 the Free Software Foundation; either version 3, or (at your option) | 10 the Free Software Foundation; either version 3, or (at your option) |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 current_arch_mask = 1 << S390_OPCODE_ZARCH; | 58 current_arch_mask = 1 << S390_OPCODE_ZARCH; |
| 59 else | 59 else |
| 60 fprintf (stderr, "Unknown S/390 disassembler option: %s\n", p); | 60 fprintf (stderr, "Unknown S/390 disassembler option: %s\n", p); |
| 61 | 61 |
| 62 p = strchr (p, ','); | 62 p = strchr (p, ','); |
| 63 if (p != NULL) | 63 if (p != NULL) |
| 64 p++; | 64 p++; |
| 65 } | 65 } |
| 66 | 66 |
| 67 if (!current_arch_mask) | 67 if (!current_arch_mask) |
| 68 switch (info->mach) | 68 current_arch_mask = 1 << S390_OPCODE_ZARCH; |
| 69 { | |
| 70 case bfd_mach_s390_31: | |
| 71 » current_arch_mask = 1 << S390_OPCODE_ESA; | |
| 72 » break; | |
| 73 case bfd_mach_s390_64: | |
| 74 » current_arch_mask = 1 << S390_OPCODE_ZARCH; | |
| 75 » break; | |
| 76 default: | |
| 77 » abort (); | |
| 78 } | |
| 79 | 69 |
| 80 init_flag = 1; | 70 init_flag = 1; |
| 81 } | 71 } |
| 82 | 72 |
| 83 /* Extracts an operand value from an instruction. */ | 73 /* Extracts an operand value from an instruction. */ |
| 84 /* We do not perform the shift operation for larl-type address | 74 /* We do not perform the shift operation for larl-type address |
| 85 operands here since that would lead to an overflow of the 32 bit | 75 operands here since that would lead to an overflow of the 32 bit |
| 86 integer value. Instead the shift operation is done when printing | 76 integer value. Instead the shift operation is done when printing |
| 87 the operand in print_insn_s390. */ | 77 the operand in print_insn_s390. */ |
| 88 | 78 |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 void | 288 void |
| 299 print_s390_disassembler_options (FILE *stream) | 289 print_s390_disassembler_options (FILE *stream) |
| 300 { | 290 { |
| 301 fprintf (stream, _("\n\ | 291 fprintf (stream, _("\n\ |
| 302 The following S/390 specific disassembler options are supported for use\n\ | 292 The following S/390 specific disassembler options are supported for use\n\ |
| 303 with the -M switch (multiple options should be separated by commas):\n")); | 293 with the -M switch (multiple options should be separated by commas):\n")); |
| 304 | 294 |
| 305 fprintf (stream, _(" esa Disassemble in ESA architecture mode\n")); | 295 fprintf (stream, _(" esa Disassemble in ESA architecture mode\n")); |
| 306 fprintf (stream, _(" zarch Disassemble in z/Architecture mode\n")); | 296 fprintf (stream, _(" zarch Disassemble in z/Architecture mode\n")); |
| 307 } | 297 } |
| OLD | NEW |